nebari-dev / nebari-dev/data-science-pack
Security(H-02): chart fails open to DummyAuthenticator when OAuth URLs/config mount are absent
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5
- Forks
- 7
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 13
Description
Summary
The chart defaults to DummyAuthenticator, which accepts any username with any password. The custom auth module only replaces it when OAuth URLs resolve, so a missing hostname, a missing OAuth secret mount, or a values override that drops the config mount silently leaves the hub on dummy auth. Because home volumes are named claim-{username}, an attacker who supplies a victim's username can attach the victim's persistent volume.
Severity: High · CWE-306 (Missing Authentication for Critical Function)
Validation: Confirmed against HEAD f932d80 on 2026-07-14 (assessed at 69c84f7; unchanged since).
Evidence
values.yaml:527-532setsadmin_access: trueandauthenticator_class: dummy. With nopasswordconfigured, dummy auth admits any username/password pair.config/jupyterhub/00-gateway-auth.py:595-652: production wiring runs only when_resolve_oauth_urls()returns non-None (chart-substituted callback URL orOAUTH_CALLBACK_URL). When it returns None,configure()is never called and the dummy default stands. The comment at00-gateway-auth.py:611-615documents this intentionally.values.yaml:562-565warns that z2jh treatsextraVolumes/extraVolumeMountsas REPLACE (not merge). An override that drops thecustom-configmount (values.yaml:570-584) leavesjupyterhub_config.d/empty, so00-gateway-auth.pynever loads and dummy remains.- The spawner names home volumes
claim-{username}(config/jupyterhub/01-spawner.py, PVC naming), so identity and storage selection both derive from the dummy username.
Impact
When the fallback is reachable, an attacker submits a victim's username and any password, is accepted as that hub user, and mounts claim-victim. That exposes notebooks, source, data, shell startup files, SSH material, and any user-persisted credentials. Selecting an admin account may also grant admin hub authority. This is a fail-open posture: a configuration omission degrades to unauthenticated-equivalent access instead of failing closed.
Related behavior is discussed in #133 (hub currently crash-loops on a missing /etc/oauth secret rather than falling back), which notes that dummy-auth fallback "risks briefly exposing a dummy-auth hub on a real deployment."
Remediation
- Remove
DummyAuthenticatorfrom production defaults; keep it only in an explicit dev values file that is never externally routed. - Fail Helm rendering or hub startup when production mode lacks a real authenticator.
- Make the required config and OAuth secret mounts non-optional.
- Add schema validation so list-replacement cannot remove security-critical mounts.
- Reject
DummyAuthenticatorat startup unless an explicit unsafe-dev flag is set.
Acceptance criteria
- A default render cannot start with
DummyAuthenticator. - Omitting the config mount or OAuth material fails closed.
- Arbitrary username/password login fails in every routable profile.
- A victim username cannot attach the victim's PVC without a valid IdP session.
Related
- #133 (missing OAuth secret / dummy fallback behavior)
Source: data-science-pack 0.1.0 security assessment (pinned commit 69c84f72df259ec755ed40bfc83f20158c550d55), finding H-02.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with values.yaml:527-584 and config/jupyterhub/00-gateway-auth.py:595-652, then inspect the chart’s default render and startup path. Verify that missing OAuth material or the custom-config mount cannot leave DummyAuthenticator active, and use the acceptance criteria to confirm default renders, routable profiles, login behavior, and PVC access fail closed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes, python
- Domain
- authentication, devops, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100