-
Notifications
You must be signed in to change notification settings - Fork 592
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
Can we run kong with non root privileges? #4102
Comments
Running as non-root is fine. All official images use a The chart has the ability to set Pod and container security contexts, but currently only does so for read-only root filesystems. In general, applying the context required for restricted to containers (it doesn't appear we need anything for Pods) is fine:
Although not exhaustively tested, the default configuration comes online with these restrictions, and I don't have reason to expect other configurations would break with those restrictions. The There's some gateway scaffolding code that suggests we do enforce a consistent UID, but I'm not familiar enough with the gateway image build process to confirm that is definitely the case. This security context is also applied across all our containers equally. The controller does not use UID 1000 (although it appears it sometimes did in the past? As a side note, this is not the case for our Kuma mesh by default (it requires root to do some iptables manipulation), but that can be sequestered in a dedicated iptables management deployment in a special namespace so that the sidecars do not need it in other namespaces. |
Hello,
We ran dry run of pod security admission(pod-security.kubernetes.io/enforce=restricted) on kong and received this warning
Warning: allowPrivilegeEscalation != false, unrestricted capabilities, runAsNonRoot != true, seccompProfile
Is it mandatory to keep it as is or we can run it with non root privileges. Does this impact the kong behavior.
The text was updated successfully, but these errors were encountered: