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

fix(lib-inject): allow all users to read and modify installed packages [backport #6569 to 1.17] #6639

Merged
merged 3 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/lib-injection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ jobs:
# Wait for the app to start
sleep 60
docker-compose logs
- name: Check Permissions on ddtrace pkgs
run: |
cd lib-injection
# Ensure /datadog-lib/ddtrace_pkgs is a valid directory that is not empty
docker-compose run lib_inject find /datadog-init/ddtrace_pkgs -maxdepth 0 -empty | wc -l && if [ $? -ne 0 ]; then exit 1; fi
# Ensure non-datadog users have read and write permissions to files stored in /datadog-lib/ddtrace_pkgs
docker-compose run lib_inject find /datadog-init/ddtrace_pkgs ! -perm -a=rw | wc -l && if [ $? -ne 0 ]; then exit 1; fi
- name: Test the app
run: |
curl http://localhost:18080
Expand Down
1 change: 1 addition & 0 deletions docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ https
httpx
iPython
ini
InitContainer
initializer
integration
integrations
Expand Down
1 change: 1 addition & 0 deletions lib-injection/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ ARG UID=10000
RUN addgroup -g 10000 -S datadog && \
adduser -u ${UID} -S datadog -G datadog
RUN chown -R datadog:datadog /datadog-init/ddtrace_pkgs
RUN chmod -R a+rw /datadog-init/ddtrace_pkgs
USER ${UID}
WORKDIR /datadog-init
ADD sitecustomize.py /datadog-init/sitecustomize.py
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
fixes:
- |
lib-injection: Resolves permissions errors raised when ddtrace packages are copied from the InitContainer to the shared volume.
Loading