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

No root users #675

Closed
wants to merge 3 commits into from
Closed

No root users #675

wants to merge 3 commits into from

Conversation

svrnm
Copy link
Member

@svrnm svrnm commented Jan 9, 2023

Changes

This fixes all services which are currently still running as root. The solution might not be perfect, that's why I start this of with a draft PR. A few alternatives:

  • Instead of creating a new user/new group an existing user like "nobody" could be used
  • Giving full permissions to the WORKDIR might not be necessary for all services, but testing that out requires a little bit more effort, since I don't know all the details of all services.

let me know what you think

Merge Requirements

  • CHANGELOG.md updated to document new feature additions
  • Appropriate documentation updates in the docs folder

Note

Here's a script I was using to find the services that run as root:

for IMAGE in $(docker images ghcr.io/open-telemetry/demo --format '{{.Repository}}:{{.Tag}}'); do echo ${IMAGE}; docker run --entrypoint whoami ${IMAGE}; done;

svrnm and others added 3 commits January 8, 2023 21:32
Signed-off-by: Severin Neumann <severin.neumann@altmuehlnet.de>
Signed-off-by: svrnm <neumanns@cisco.com>
@styblope
Copy link
Contributor

Ref. #615 where the idea was that we don't enforce non-root unless where necessary. We rather just enable the rest of containers so that they can execute either as root or non-root. The actual security context can then be set in via helm parameters, or it can be left up to the orchestrator's security policy enforcement (e.g. OpenShift likes to apply own non-root UIDs from a preset range)

@svrnm
Copy link
Member Author

svrnm commented Jan 11, 2023

Ref. #615 where the idea was that we don't enforce non-root unless where necessary. We rather just enable the rest of containers so that they can execute either as root or non-root. The actual security context can then be set in via helm parameters, or it can be left up to the orchestrator's security policy enforcement (e.g. OpenShift likes to apply own non-root UIDs from a preset range)

missed that one, thanks for clarification :)

@svrnm svrnm closed this Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants