Refuse to start OIDC mode with the default SESSION_SECRET #28
Labels
No labels
bug
decision
docs
enhancement
integration
ops
security
tech-debt
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/BatteryStorageCalculator#28
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
backend/src/config.js:10defaultssessionSecrettodev-only-change-me, anddocker-compose.full.yml:19bakes the same constant in as the env fallback, so an OIDC deployment that misses one env var signs its session cookies (backend/src/auth.js:9-19) with a value that is public on the internet. Sessions are the entire authorization basis (auth.js:64).Fix: on startup, when
AUTH_MODE != disabled, require a non-empty SESSION_SECRET that differs from the dev constant — otherwise exit with an actionable error. Remove the fallback fromdocker-compose.full.yml(leave it only forAUTH_MODE=disableddev). Document in README.Acceptance criteria
Relations: relates to #8 (deployment config task will set the real secret)
(Audit finding F-07, 2026-07-16 — Severity: High, Confidence: High)
Sequencing (from the 2026-07-16 audit): land this before #8 (configuring Authentik env vars on the deployment host). With this fail-fast check in place, the #8 deploy fails loudly if
SESSION_SECRETis missing — instead of silently coming up with cookies signed by the public dev constant.