0011: A gated development login¶
- Status:
Accepted
- Date:
2026-10-19
Context¶
Developers and demos need to sign in as reader, reviewer or operator without an identity provider, but such a bypass must be impossible to enable by accident in production.
Decision¶
Follow module-dev-auth-bypass with independent gates:
the backend accepts HS256 tokens only when
ADRIANO_DEV_SHARED_SECRETis set, and selects the validator from the token’salgheader, so RS256 never reaches the dev path;the
/auth/devrouter (token minting and role presets) is imported and mounted only whenADRIANO_DEV_AUTH_ENABLEDis true and the secret is set;the frontend dev-login UI exists only when a build-time literal (
import.meta.env.DEVandVITE_DEV_AUTH) is true, never through runtime configuration.
Dev tokens carry the same aud and iss as real tokens and go
through the same claim mapping and authorization.
Consequences¶
Both flags are off by default and the secret has no default.
frontend/scripts/check-no-dev-auth.shfails the production build if dev-login code reachesdist/.With a real issuer configured, a dev token can impersonate any
issuer|subject; the secret must never be set in production. See Security.