Security: plumb SESSION_SECRET into docker-compose and .env.example #42
Labels
No labels
area/ai
area/backend
area/frontend
area/infra
area/scheduler
area/wled
good-first-issue
priority/high
priority/low
priority/medium
type/bug
type/chore
type/ci-cd
type/docs
type/feature
type/qa
v1.0.0
v1.1.0
v1.2.0
v2.0.0
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/Iris-WLED#42
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?
Split from #40.
backend/app/config.pydefaultsSESSION_SECRETtochange-me-in-productionand three docs (setup, troubleshooting, ASVS review) tell users to override it — but it is absent fromdocker-compose.yml's environment block and.env.example, and no.envfile is copied or mounted into the container. Every compose deployment silently signs session cookies with the hardcoded default.Tasks
SESSION_SECRET=${SESSION_SECRET:?Set a random SESSION_SECRET}todocker-compose.yml(hard-fail beats silent insecurity)SESSION_SECRET=with generation instructions (openssl rand -hex 32) to.env.exampleDISABLE_AUTHis falsePicking this up alongside #41 (Wave 0). It's independent of the CI work (touches docker-compose.yml / .env.example), so running it in parallel.
Merged via PR #67 (rebased onto the now-green main; the
main.pyoverlap with #41 resolved). All CI green.⚠️ Ops action required before the next dev-server deploy: compose now uses
SESSION_SECRET=${SESSION_SECRET:?...}, sodocker compose upwill hard-fail unlessSESSION_SECRETis set on the host. Before the next deploy to the dev server, add a real secret to its.env:This is the intended behavior (fail-closed beats silently signing with the default), but it means the deploy is gated on setting the secret. Flagging rather than doing it myself since it touches the live host — say the word and I'll handle it as part of the deploy work (pairs with #65).