hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Badger (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-7221) Add security check for privileged docker container
Date Mon, 12 Feb 2018 17:39:00 GMT

    [ https://issues.apache.org/jira/browse/YARN-7221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16361138#comment-16361138
] 

Eric Badger commented on YARN-7221:
-----------------------------------

[~eyang], I'm not able to get this patch to work in my testing. In YARN-7516, we disable running
privileged containers if the registry is untrusted. However, if the registry is trusted then
we will bind-mount a whole bunch of directories, which we know won't work (since everything
is being written as root and permissions are messed up). 

Also, I'm not sure that the implementation works even if I could run a privileged container
with a trusted source. It looks like the sudo checking is checking the uid:gid pair, since
that is what is passed into the docker command file (i.e. what is passed to {{--user}}). 

How did you test this such that it worked? I can't get it to work in any of the circumstances
that I've tried.

> Add security check for privileged docker container
> --------------------------------------------------
>
>                 Key: YARN-7221
>                 URL: https://issues.apache.org/jira/browse/YARN-7221
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Eric Yang
>            Assignee: Eric Yang
>            Priority: Major
>         Attachments: YARN-7221.001.patch, YARN-7221.002.patch, YARN-7221.003.patch, YARN-7221.004.patch
>
>
> When a docker is running with privileges, majority of the use case is to have some program
running with root then drop privileges to another user.  i.e. httpd to start with privileged
and bind to port 80, then drop privileges to www user.  
> # We should add security check for submitting users, to verify they have "sudo" access
to run privileged container.  
> # We should remove --user=uid:gid for privileged containers.  
>  
> Docker can be launched with --privileged=true, and --user=uid:gid flag.  With this parameter
combinations, user will not have access to become root user.  All docker exec command will
be drop to uid:gid user to run instead of granting privileges.  User can gain root privileges
if container file system contains files that give user extra power, but this type of image
is considered as dangerous.  Non-privileged user can launch container with special bits to
acquire same level of root power.  Hence, we lose control of which image should be run with
--privileges, and who have sudo rights to use privileged container images.  As the result,
we should check for sudo access then decide to parameterize --privileged=true OR --user=uid:gid.
 This will avoid leading developer down the wrong path.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org


Mime
View raw message