Skip to content

fix!: Use new, non-colliding UID and GID for codejail app, sandbox users#113

Merged
timmc-edx merged 2 commits intomainfrom
timmc/cj-uid
Mar 19, 2025
Merged

fix!: Use new, non-colliding UID and GID for codejail app, sandbox users#113
timmc-edx merged 2 commits intomainfrom
timmc/cj-uid

Conversation

@timmc-edx
Copy link
Copy Markdown
Member

  • Don't bother deleting ubuntu user, as we won't be needing the UID 1000 any more.
  • While we're in these lines, remove unneeded braces from variable interpolation. They just create longer lines, here, and aren't actually needed for delimiting.
  • Don't create user home for app user -- wasn't needed.

Part of edx/edx-arch-experiments#983 and see openedx/codejail-service#30 for new docs.

- Don't bother deleting `ubuntu` user, as we won't be needing the UID
  1000 any more.
- While we're in these lines, remove unneeded braces from variable
  interpolation. They just create longer lines, here, and aren't actually
  needed for delimiting.
- Don't create user home for app user -- wasn't needed.

Part of edx/edx-arch-experiments#983 and see
openedx/codejail-service#30 for new docs.
Comment thread dockerfiles/codejail-service.Dockerfile Outdated
# RLIMIT_NPROC UID-global usage pool, and Docker not isolating UIDs.)
#
# Selected via: python3 -c 'import random; print(random.randrange(3000, 2 ** 31))'
ARG APP_UID_GID=206593644
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I was confused at first, even though this should be obvious. What if you have APP_UID and APP_GID separate, and just set the second to the first (either using the variable or repeating the id)?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sure, that would be reasonable.

Copy link
Copy Markdown

@robrap robrap left a comment

Choose a reason for hiding this comment

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

Nit or clarity.

@timmc-edx timmc-edx merged commit 00027a0 into main Mar 19, 2025
1 check passed
@timmc-edx timmc-edx deleted the timmc/cj-uid branch March 19, 2025 16:28
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