-
Notifications
You must be signed in to change notification settings - Fork 600
Masked paths setting in the container #186
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
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
|
@crosbymichael @LK4D4 PTAL |
|
On Mon, Sep 14, 2015 at 02:25:03PM -0700, Mrunal Patel wrote:
Why not just have this in config.md: "mounts": [ And this in runtime.md: "mounts": { ? That way there's nothing to implement, and it doesn't seem like |
|
@wking Agree, but the idea is simplifying the config for some common cases/scenarios. If we agree it is not worth it I will close this :) |
|
On Wed, Sep 16, 2015 at 08:06:19AM -0700, Mrunal Patel wrote:
Fair. Some things to balance when deciding on whether adding a. Does it make it easier to write the config for a particular use Any pure addition is likely to do both, although refactoring things Perhaps we can mitigate (b) here by shifting syntactic sugar like this And to make life easier for implementors, it might be worth writing a |
| @@ -250,6 +250,16 @@ The actions and operators are strings that match the definitions in seccomp.h fr | |||
| } | |||
| ``` | |||
|
|
|||
| ## Masked Paths | |||
|
|
|||
| Masked paths allow hiding paths in the container by bind mounting `/dev/null` over them to prevent access by the container process. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps that mount approach is an implementation approach, but not the requirement?
If some runtime, cow fs, or future kernel feature allowed the filepath to just not exist, then those could be allowable as well. Not just an exclusive bitbucket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Fri, Sep 25, 2015 at 11:17:19AM -0700, Vincent Batts wrote:
+Masked paths allow hiding paths in the container by bind mounting
/dev/nullover them to prevent access by the container process.perhaps that mount approach is an implementation approach, but not
the requirement? If some … cow fs … feature allowed the filepath to
just not exist…
What would this look like? Looking for similar tech besides “bind
over it”, there's the device cgroups 1. But there the access is
bound to major/minor, and not by path. That's not a big deal though,
I could see something like that bound by path. But the cgroup
approach gives errors like:
cgcreate -g devices:/device-group
cgset -r devices.deny='c 1:3 mrw' device-group
cgexec -g devices:/device-group cat /dev/null
cat: /dev/null: Operation not permitted
cgdelete -g devices:/device-group
and not just an empty read. So I'd be cautious about saying “don't
worry about how it's implemented, just use this to block access”.
|
I like the idea, just need to open up the verbiage. |
|
I am closing this for now. We could use the existing facilities to achieve this. |
I still feel like these should be opt-in, but the consensus is that
they should be opt-out [1]. That is currently blocking on suggested
syntax around that opt-out. My suggestion [1] was to borrow the
maskedPaths syntax from [2], but I haven't heard any direct responses
to that.
[1]: Message-ID: <20151216215513.GG25571@odin.tremily.us>
Subject: Re: Linux: Don't mount /sys and /proc (i.e. rolling back specs#164)
Date: Wed, 16 Dec 2015 13:55:13 -0800
[2]: opencontainers/runtime-spec#186
Subject: Masked paths setting in the container
This allows one to hide files such as
/proc/kcorefrom the container process.Signed-off-by: Mrunal Patel mrunalp@gmail.com