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

Docker containers should not run as root #6

Closed
4 tasks done
bschmalhofer opened this issue Sep 5, 2020 · 5 comments
Closed
4 tasks done

Docker containers should not run as root #6

bschmalhofer opened this issue Sep 5, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bschmalhofer
Copy link
Contributor

bschmalhofer commented Sep 5, 2020

The containers should not run as root.

TODO:

  • otobo_db_1
  • otobo_elastic_1
  • otobo_nginx_1
  • otobo_redis_1
@bschmalhofer
Copy link
Contributor Author

Looks like otobo_db_1 can be run as mysql:mysql. This setting can be specied in docker-compose/otobo-base.yml.

otobo_elastic_1 already runs as elasticsearch:root . The group root has no special privileges on CentOS.

otobo_nginx_1: This is a bit more work, as only root has rights for ports below 1024. But according to http://pjdietz.com/2016/08/28/nginx-in-docker-without-root.html this can easily be handled.

otobo_redis_1: Looks like the user already drops down to the used redis. Specifyin redis:redis in docker-compose/otobo-base.yml should work

bschmalhofer added a commit that referenced this issue Sep 7, 2020
Issue #6: specify users for mysql and for redis
@bschmalhofer bschmalhofer changed the title Check whether docker container run as root Docker containers should not run as root Sep 8, 2020
@bschmalhofer
Copy link
Contributor Author

otobo_nginx_1 can keep running as root. Nginx runs only the master process as root, and then switches to a non-root user. Running as non-root would require that the SSL private key is also readable as non-root. And this is not helping with security.

bschmalhofer added a commit that referenced this issue Sep 8, 2020
Issue #6: internal port number are now greater 1024
bschmalhofer added a commit to RotherOSS/otobo that referenced this issue Sep 8, 2020
Avoid the ports that can only be run as root.
bschmalhofer added a commit to RotherOSS/otobo that referenced this issue Sep 8, 2020
@bschmalhofer
Copy link
Contributor Author

Checked the containers. Closing this issue.

@bschmalhofer bschmalhofer self-assigned this Sep 18, 2020
@bschmalhofer bschmalhofer added the enhancement New feature or request label Sep 18, 2020
@bschmalhofer bschmalhofer added this to the OTOBO 10.0.4 milestone Sep 18, 2020
@bschmalhofer
Copy link
Contributor Author

Reopening as the feature should be backported to 10.0.4

@bschmalhofer bschmalhofer reopened this Sep 18, 2020
bschmalhofer added a commit to RotherOSS/otobo that referenced this issue Sep 26, 2020
bschmalhofer added a commit to RotherOSS/otobo that referenced this issue Sep 26, 2020
…-nginx_config_port_8080

Issue RotherOSS/otobo-docker#6: grap changes from rel-10_1
@bschmalhofer
Copy link
Contributor Author

Looks good so far. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant