-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Which capabilities are recommended to set? #6826
Comments
Based on latest test result the example security settings applied in forwarder-vpp image and test manifest file works with SR-IOV configuration also: |
@ljkiraly Is this still actual? |
…tworkservicemesh#6826) Related PRs: cmd-nsmgr/networkservicemesh#547 cmd-forwarder-vpp/networkservicemesh#681 Signed-off-by: Laszlo Kiraly <[email protected]>
…tworkservicemesh#6826) Related PRs: cmd-nsmgr/networkservicemesh#547 cmd-forwarder-vpp/networkservicemesh#681 Signed-off-by: Laszlo Kiraly <[email protected]>
Capability settings for binaries added to Dockerfiles used to build NSM images: Example manifests (forwarder-vpp, nsmgr) extended with security context settings to run as non-root user, with minimal set of privileges and capabilities: The latest PR depends on first two that's why in draft state. One more step is missing to completion: changing any example manifest in deployments-k8s/apps to test with restricted privileges. |
During the implementation of security hardening we found some settings which should be recommended for NSM users and maybe implemented by NSM.
The aim was to run containers and pods with least privileges.
When deploying NSM images the containers should run as non root user and with minimal set of capabilities. It is also preferred to prevent writing the root file system (readOnlyRootFilesystem: true).
Most of the elements does not need any extra capability. In some cases it is hard to find the minimum set of capabilities.
Using this example Dockerfile an image can be built based on forwarder-vpp. In this new image a user is created and set as default. Also a minimum set of capability was added to the binaries:
In example manifest files the security context properties should specify the user and the capabilities.
If no default user is set in the image the user and/or group can be configured by runAsUser/runAsGroup.
If the default user is specified in the container image this setting can be overridden with runAsUser/runAsGroup properties.
Note that these capabilities set in forwarder-vpp image were not fully tested with SR-IOV configuration (some help needed in this area to figure out if additional capabilities are required).
--
Laszlo
The text was updated successfully, but these errors were encountered: