chore(config): reconcile OAUTH_SUPER_ADMIN env var name with the code (PMS-682) #461
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/PMS-682-oauth-super-admin-env-drift"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reconciles the
OAUTH_SUPER_ADMIN_*env var drift found while investigating PMS-637.The code reads
OAUTH_SUPER_ADMIN_EMAILS(exact-email allowlist,src/main.rs:147, enforced byis_allowlisted_emailinsrc/modules/auth/service.rs), but.env.example,compose.dev.yml, anddocs/quickstart.mdall documentedOAUTH_SUPER_ADMIN_DOMAINSwith domain-allowlist wording. The documented var was dead and the effective var undocumented, so an operator copying the sample set a no-op var and could believe domain-level auto-promotion worked when only exact-email matches do.This PR renames every doc/config occurrence to
OAUTH_SUPER_ADMIN_EMAILSand rewrites the comments to state exact-email (not domain) semantics plus the fail-closed empty default.Behavior-preserving: the value is left empty. The old
_DOMAINS=niceguyit.biznever took effect because the code only ever read the unset_EMAILS, so dev was already fail-closed empty. A domain string as an exact-email would match nothing anyway.Docs-match-code (fix option 1 from the ticket). No Rust changes;
docker compose -f compose.dev.yml configvalidates. The quickstart'ssuper_adminverification uses theADMIN_EMAILbootstrap admin, not the Google allowlist, so it is unaffected.Acceptance:
.env.exampleand code agree on the env var name and exact-email semantics.Closes PMS-682.