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 the target allocator as non-root #2352

Merged
merged 3 commits into from
Nov 15, 2023

Conversation

dgl
Copy link
Contributor

@dgl dgl commented Nov 14, 2023

Description:

Add a USER directive to the Dockerfile so target allocator runs as non-root. This satisfies the restricted pod security standard.

Link to tracking Issue:

Not sure one is needed, similar was done in #738.

Testing:

Built and ran the target allocator image.

Documentation:

n/a

@dgl dgl requested a review from a team November 14, 2023 05:29
@@ -16,4 +16,7 @@ COPY --from=certificates /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-ce
# Copy binary built on the host
COPY bin/opampbridge_${TARGETARCH} ./main

# "nonroot"
USER 65532:65532
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note I used 65532 as it's the distroless nonroot user, which the main Dockerfile uses.

Copy link
Contributor

@swiatekm swiatekm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The changelog tool will complain unless you put an issue number in the changelog entry yaml, you can just use the issue you linked.

@jaronoff97 jaronoff97 merged commit 9255f75 into open-telemetry:main Nov 15, 2023
27 checks passed
ItielOlenick pushed a commit to ItielOlenick/opentelemetry-operator that referenced this pull request May 1, 2024
* Run the target allocator as non-root

Signed-off-by: David Leadbeater <[email protected]>

* Add issue to changelog

Signed-off-by: David Leadbeater <[email protected]>

---------

Signed-off-by: David Leadbeater <[email protected]>
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.

3 participants