Security: plumb SESSION_SECRET into compose and .env.example (#42) #67
No reviewers
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 milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/Iris-WLED!67
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/42-session-secret"
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?
Fixes #42.
SESSION_SECRETdefaulted tochange-me-in-productionand was absent fromdocker-compose.ymland.env.example, so every compose deployment silently signed session cookies with the hardcoded default.Changes
SESSION_SECRET=${SESSION_SECRET:?Set a random SESSION_SECRET}to the app service —docker compose upnow hard-fails if it's unset (hard-fail beats silent insecurity). Matches the file's existing${VAR:-default}env style (noenv_file:in use).SESSION_SECRET=with generation guidance (openssl rand -hex 32).DISABLE_AUTH=truedev/test flows or bare-uvicornruns (compose-level:?already blocks the deployment path).Verification
docker compose confighard-fails with the required message whenSESSION_SECRETis unset; resolves correctly when set.ruff check/ruff format --check/mypy app/clean after rebasing onto the now-green main.Follow-up (ops, not in this PR)
The dev server's live
SESSION_SECRETstill needs rotating to a real random value.🤖 Generated with Claude Code