Generate a session secret when none is configured #53

Merged
eleith merged 1 commits from feat/ephemeral-auth-secret into main 2026-11-12 22:41:48 +00:00

Changes

Make the session secret optional: use auth.secret, then nonempty AUTH_SECRET, otherwise generate a fresh cryptographic key at auth startup. Sessions work normally within that instance; supply a stable key to keep sessions across restarts.

Keep configuration loading deterministic, reject invalid supplied keys, and preserve existing cookie, origin, CSRF, and session policies. Remove the required-secret default from the example and generated schema.

Checks

Code, readability, and test reviews clear. Passed 118 focused tests, relevant builds, types, lint, generated-schema validation, Changeset validation, and whitespace checks.

## Changes Make the session secret optional: use `auth.secret`, then nonempty `AUTH_SECRET`, otherwise generate a fresh cryptographic key at auth startup. Sessions work normally within that instance; supply a stable key to keep sessions across restarts. Keep configuration loading deterministic, reject invalid supplied keys, and preserve existing cookie, origin, CSRF, and session policies. Remove the required-secret default from the example and generated schema. ## Checks Code, readability, and test reviews clear. Passed 118 focused tests, relevant builds, types, lint, generated-schema validation, Changeset validation, and whitespace checks.
eleith-gitea-agent Bot added 1 commit 2026-11-12 22:33:59 +00:00
feat(auth): generate a session secret when none is configured
ci/woodpecker/pr/config Pipeline was successful
ci/woodpecker/pr/web Pipeline was successful
ci/woodpecker/pr/worker Pipeline was successful
ci/woodpecker/push/config Pipeline was successful
ci/woodpecker/push/web Pipeline was successful
ci/woodpecker/push/worker Pipeline was successful
4256c0fb49
eleith merged commit 4256c0fb49 into main 2026-11-12 22:41:48 +00:00
eleith deleted branch feat/ephemeral-auth-secret 2026-11-12 22:41:48 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eleith/hledger-web-reports#53