-
Notifications
You must be signed in to change notification settings - Fork 2.5k
containerd: Enable enable_unprivileged_ports and enable_unprivileged_… #5538
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
Conversation
This looks good, but can you rebase on to the recent changes for 1.24 and confirm that it's doing what you want? |
00166b4
to
9701dcd
Compare
@brandond done and afaiu CI fails from same reason why it is failing on master branch which have nothing to do with this PR. I updated testing guide to first message and here is log from testing which proof that pod is running as non-root without any capabilities and nginx is still able to listen port 80 and ping works.
|
I see that there's some concern from upstream about things breaking when these are enabled by default, see containerd/containerd#6170 (comment) Can you speak to that? It sounds like we may need to leave them off by default, but add a way to enable them - other than just having the user provide a config template, which is already possible. |
As far I understand those concerns are coming from Docker side and about some non-Kubernetes related issue which they have seen somewhere in past. Other challenge would be that if those would be enabled on containerd side then people might miss those release notes. Here that should't be issue if these would be enabled as part 1.24 release it would be easy highlight it on release notes. Those same settings was released as part of Docker 20.10.0 https://github.com/moby/moby/blob/v20.10.0/daemon/oci_linux.go#L763-L778
As compromise we might also consider to activate those by default only on RKE2 side first? As there rootless mode, etc are not supported and there any help to make it easier to get existing container images working with those security hardenings would be useful. And just FYI about where I got idea for adding those settings to containerd side https://twitter.com/ibuildthecloud/status/1333901962568368128 |
@manuelbuil perhaps you can be second reviewer for this? Would be nice to get it merged before first 1.24.x release version. |
It is too late for 1.24.1 at this point, we can evaluate it for 1.24.2. |
9701dcd
to
41aec65
Compare
…icmp by default Signed-off-by: Olli Janatuinen <[email protected]>
Rebased to master HEAD for CI fixes |
Proposed Changes
Make using hardened containers a bit easier by:
Types of Changes
Containerd configuration change.
Verification
Create test deployment based on standard NGINX image which wants to listen port 80 and would fail as non-root before this change:
Check that NGINX is running and listening port 80
Start debug session inside of same pod and test that ping works.
Linked Issues
Closes #4545
User-Facing Change
Further Comments
containerd 1.6.x is needed so waiting for #4761 to be merged first. PR which added those flags and discussion related to it can be found from containerd/containerd#6170