Skip to content
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

Run as non-root user #194

Closed
krancour opened this issue Feb 22, 2016 · 8 comments
Closed

Run as non-root user #194

krancour opened this issue Feb 22, 2016 · 8 comments

Comments

@krancour
Copy link
Contributor

This is a best practice we should follow wherever we can.

@arschles arschles added this to the v2.0-rc1 milestone Mar 4, 2016
@smothiki
Copy link
Contributor

@krancour I think we are running as a non root user ?

@krancour
Copy link
Contributor Author

krancour commented May 20, 2016

Does not seem it:

[kent@mbp ~]$ k exec -it deis-builder-5qn00 -- bash
bash-4.3# whoami
root

But let's hold off on doing anything with this until after the Dockerfile's been refactored for Ubuntu Slim-- which I am working on. Otherwise, there's just going to be an unresolvable merge conflict and we'll make extra work for ourselves.

@bacongobbler
Copy link
Member

Yeah I think openssh is running as root in order to bind to port 22.

@smothiki
Copy link
Contributor

@krancour I think the new ubuntu slim image is not running builder as root . Let me know if this isn;t fixed

@arschles
Copy link
Member

bumping from RC1, as this is not critical for the RC

@arschles arschles removed this from the v2.0-rc1 milestone May 24, 2016
@krancour
Copy link
Contributor Author

That's fine.

@bacongobbler
Copy link
Member

bacongobbler commented May 31, 2016

The server itself is still running as root, so this is not yet resolved. All processes should be run as non-root. If any of them are compromised, the user has root level access and could break out of the container onto the host.

root@deis-builder-ef12k:/# ps faux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        15  1.0  0.0  18288  3360 ?        Ss   17:53   0:00 bash
root        25  0.0  0.0  34428  2808 ?        R+   17:53   0:00  \_ ps faux
root         1  0.1  0.2 224688 23076 ?        Ssl  17:52   0:00 /usr/bin/boot s

@Cryptophobia
Copy link

This issue was moved to teamhephy/builder#32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants