Skip to content

Rootless#879

Open
ssinnott wants to merge 8 commits into
mainfrom
rootless
Open

Rootless#879
ssinnott wants to merge 8 commits into
mainfrom
rootless

Conversation

@ssinnott
Copy link
Copy Markdown
Contributor

@ssinnott ssinnott commented Jun 2, 2026

So idea here is to wire up a rootless version of workbench in the helm charts,

  1. There's a simple high level flag (pod. runAsRoot) this defaults to true (for now). But you can set it to false to basically wire in a pretty separate mode for workbench. Where,
    a. sssd is disabled - you need to use SCIM instead.
    b. Workbench and pods that it launches will use the service account instead.
    c. There's some other toggling which is more minor.

  2. If you're in the rootless mode you can also specify the service account user and uid. For this to really work though I think you would need to build your own version of the workbench image. The user + uid is baked into there with my other changes.

Closes https://github.com/rstudio/rstudio-pro/issues/10847

ssinnott added 8 commits June 1, 2026 15:27
- Run Workbench as non-root by default via serviceAccountUser
- Invoke supervisord with -u "" when running Workbench non-root
- Fix supervisord non-root workaround: pass -u <serviceAccountUser> instead of -u ""
- Fix non-root supervisord startup: emptyDir, path rewriting, fsGroup
- Simplify prestart-launcher.bash for non-root operation
- Simplify prestart-workbench.bash for non-root operation
- Update secrets test mode assertions for non-root default (0640)
- Document rootless prestart script simplification
- Drop supervisord non-root workaround, use image default command
- Add explicit config.sssd toggle, off by default
- Add non-root config defaults for launcher auth, PAM, provisioning
- Default serviceAccountUser to root, keep non-root opt-in
- Avoid contradictory root securityContext on user override
Previously sssd.enabled defaulted to false with a hard render failure
if set to true while running non-root. Now sssd.enabled defaults to true
and is silently skipped when serviceAccountUser is not root, preserving
existing root behavior with no BREAKING change.

Introduce rstudio-workbench.sssd.active helper to centralize the
effective-SSSD gate (enabled AND root) used across helpers, configmaps,
and NOTES.txt warnings.
…tUser

Add top-level runAsRoot: true (default) as the single binary control for
pod privilege. Previously, serviceAccountUser == "root" was the implicit
trigger for all root-vs-non-root behavior (securityContext, SSSD, secret
file modes, rserver.conf defaults), conflating the OS application user
with the Kubernetes security concept.

serviceAccountUser now solely controls server-user in rserver.conf.
All privilege-gating logic switches from eq serviceAccountUser "root"
to .Values.runAsRoot / not .Values.runAsRoot.
@ssinnott ssinnott requested review from GCRev and zachhannum as code owners June 2, 2026 15:31
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.

1 participant