Run CDN in a Box for Developers services as unprivileged users#7142
Run CDN in a Box for Developers services as unprivileged users#7142ocket8888 merged 20 commits intoapache:masterfrom
Conversation
43d96f0 to
a191575
Compare
|
This is something I've wanted for the dev environment since its inception, but I can't test it because of a bug in the TP/TPv2 containers that prevents them from fetching a resource from npm. I've had another developer confirm that the issue is not specific to my machine, but I still have no idea why that's happening. |
1d8666d to
2401344
Compare
|
Rebased onto master to get #7164 |
…t from a previous run
There was a problem hiding this comment.
Most things appear to be working, but it seems that the Go binaries it generates are still owned by root:
$ ls -lR . | grep -v "$(whoami)" | grep -vE '^\..*:$' | grep -vE '^$' | grep -vE '^total [0-9]+$'
-rwxr-xr-x 1 root root 6881051 Nov 9 10:57 t3c
-rwxr-xr-x 1 root root 9965720 Nov 9 10:57 t3c-apply
-rwxr-xr-x 1 root root 6876971 Nov 9 10:57 t3c-check
-rwxr-xr-x 1 root root 6958591 Nov 9 10:57 t3c-check-refs
-rwxr-xr-x 1 root root 6854750 Nov 9 10:57 t3c-check-reload
-rwxr-xr-x 1 root root 6958920 Nov 9 10:57 t3c-diff
-rwxr-xr-x 1 root root 8375868 Nov 9 10:57 t3c-generate
-rwxr-xr-x 1 root root 6960525 Nov 9 10:57 t3c-preprocess
-rwxr-xr-x 1 root root 10250226 Nov 9 10:57 t3c-request
-rwxr-xr-x 1 root root 7076256 Nov 9 10:57 t3c-tail
-rwxr-xr-x 1 root root 9794976 Nov 9 10:57 t3c-update
-rwxr-xr-x 1 root root 11172798 Nov 9 10:57 tc-health-client
-rwxr-xr-x 1 root root 7106164 Nov 9 10:56 admin| - 6443:443 | ||
| - 6444:6444 | ||
| sysctls: | ||
| - net.ipv4.ip_unprivileged_port_start=0 |
There was a problem hiding this comment.
Maybe should be changed to 23 so ssh port isnt exposed?
There was a problem hiding this comment.
This isn't which ports are exposed, it's which ports a non-root user is allowed to listen on.
Docker itself includes net.ipv4.ip_unprivileged_port_start = 0, just not containerd yet.
|
Oops, the condition checking if t3c's |
This PR makes it so that when the CDN in a Box for Developers services create new files (from
npm ci, building debug binaries, creating Traffic Router DBs, etc.), the files are owned by the user who owns the repository directory, rather than being owned by root.Which Traffic Control components are affected by this PR?
What is the best way to verify this PR?
Remove generated files and directories:
Build the CDN in a Box for Developers:
Start the Dev CiaB:
Verify that the generated files and directories are owned by you
PR submission checklist