Add support for NoNewPrivileges in docker#20727
Conversation
|
@crosbymichael @LK4D4 PTAL |
|
I like it |
|
Can you add that as a test case for your patch as well if others agree on the design |
|
@jfrazelle Not sure how to integrate this into the docker test suite. We need to compile C code and add a binary into an image. Is there an example of anything similar? |
|
YES the seccomp tests :) On Thu, Mar 3, 2016 at 12:12 PM, Mrunal Patel [email protected]
Jessie Frazelle |
|
@jfrazelle Thanks :) I will look into it. |
|
@mrunalp we reviewed this in the maintainers review session and liked this feature. There was a short discussion (sorry, again) if |
|
Code LGTM. Can we add some docs about this new option? |
|
Added tests. |
|
All green! :) |
|
LGTM, can move to docs review thanks! |
|
Alright, this probably needs docs in; Not sure where to put it below As it doesn't fit in apparmor or selinux, so do we need a separate document just for this? Can we expect more options for this? |
|
@thaJeztah I just added a commit for docs. |
|
@thaJeztah We can probably add a line for this in the same page. I will add it. |
|
Actually the security page looks like it has configuration that is set at engine level for all containers while this option is more of a runtime flag. |
|
@mrunalp can this option be set on the daemon? i.e. as a default for all containers? |
|
@thaJeztah We could add that feature later but it could potentially break images so better to opt-in at runtime to start with (as in this PR). |
|
@mrunalp oh, didn't mean to imply that, just wondering if it was a daemon level option as well |
|
No it is not. Sent from my iPhone
|
|
Can the windowsTP4 be related? |
|
No, it can't be. Sent from my iPhone
|
docs/reference/run.md
Outdated
There was a problem hiding this comment.
Can you move this above your example. Because this applies to the example above :-)
|
Thanks @mrunalp I left some suggestions; also, can you squash your commits? |
Signed-off-by: Mrunal Patel <[email protected]> Add tests for no-new-privileges Signed-off-by: Mrunal Patel <[email protected]> Update documentation for no-new-privileges Signed-off-by: Mrunal Patel <[email protected]>
|
@thaJeztah Updated and pushed |
|
Docs LGTM |
|
docs LGTM, thanks @mrunalp! |
|
The test failures don't look like they are related. |
|
All green! Merge? :) |
Add support for NoNewPrivileges in docker
|
Thanks @mrunalp! |
|
Does this break apparmor as point here. |
[--pids-limit](moby/moby#18697) [--security-opt=no-new-privileges](moby/moby#20727)
|
|
|
@anshupande what version of docker are you running? |
|
@thaJeztah : yes it was 1.9 and not 1.11 and this was addressed #22862 |
Addresses #20329
This PR adds support for setting the NoNewPrivileges in docker as a security-opt.
Here is how to run docker with this bit set.
Here is how to test it:
Signed-off-by: Mrunal Patel [email protected]