-
Notifications
You must be signed in to change notification settings - Fork 73
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
Cannot overwrite existing securityContext in podTemplate #344
Comments
@sroettger fixed this on #301 |
Actually looking at this more closely, the fix we made forces cap_sys_admin on you. |
Idea: add a |
that sounds good to me, but it should probably not say nsjail. Something like: "kctf_default_caps" or so? Can you drop privileges in your CMD as a workaround? |
Yep! That sounds good. We can bikesched the name a bit. I assume kctf is kindof redundant? What about: extra_hardening:
- apparmor_policy
- no_capabilities I dont like the ´no_capabilities´ is a negative, but wdyt of this? @sroettger |
Maybe For example capabilities: CAP_NET_ADMIN
extra_hardening:
- no_capabilities should still have net_admin at the end. |
For some web challenges where I don't need a nsjail, I would like to start the container without CAP_SYS_ADMIN. As a result, I modify the
securityContext
to remove any capabilities using the following:However, this does not remove the capabilities and the container is still deployed with CAP_SYS_ADMIN. This is because of a bug in kctf-operator code here:
https://github.com/google/kctf/blob/v1/kctf-operator/pkg/controller/challenge/deployment/deployment.go#L73
In the existing code, regardless of what the Capabilities is set to, it adds the CAP_SYS_ADMIN capability. I understand that this is needed by nsjail, but if I manually specify some capabiltiies, then it should not be overwritten by the kctf-operator.
I'm not sure what the best solution is here, but we should definitely be given an option to not start containers with CAP_SYS_ADMIN.
The text was updated successfully, but these errors were encountered: