feat: configure authentication in YAML #52

Merged
eleith merged 1 commits from feat/config-first-auth into main 2026-10-26 22:15:30 +00:00

Summary

Implements the configuration-first setup documented in #51.

  • Require YAML auth.origin when authentication is enabled; generate a session secret unless auth.secret is supplied.
  • Prepare framework URLs before startup and reject inconsistent second loads. Ordinary config reloads preserve sessions.
  • Make .env optional and use production image defaults in Compose.
  • Consolidate tests around startup, session lifetime, origin handling, and private-data boundaries.

Existing authenticated deployments need their origin in YAML. Set or explicitly interpolate a secret to keep sessions across restarts. Operator and demo configuration is untouched.

Verification

  • 493 config, 7 CLI, and 505 web unit/process tests passed.
  • 122 browser tests passed.
  • Production build, typechecks, lint, formatting, schema check, and isolated native Vite smoke tests passed.
  • Deliberately restoring the legacy-secret fallback failed the restart test; restoring the build made it pass.
  • Independent code and test review completed.

Docker build/run was not performed in this sandbox. Manual follow-up: start Compose without .env, sign in using YAML credentials, then restart and confirm default sessions expire.

## Summary Implements the configuration-first setup documented in #51. - Require YAML `auth.origin` when authentication is enabled; generate a session secret unless `auth.secret` is supplied. - Prepare framework URLs before startup and reject inconsistent second loads. Ordinary config reloads preserve sessions. - Make `.env` optional and use production image defaults in Compose. - Consolidate tests around startup, session lifetime, origin handling, and private-data boundaries. Existing authenticated deployments need their origin in YAML. Set or explicitly interpolate a secret to keep sessions across restarts. Operator and demo configuration is untouched. ## Verification - 493 config, 7 CLI, and 505 web unit/process tests passed. - 122 browser tests passed. - Production build, typechecks, lint, formatting, schema check, and isolated native Vite smoke tests passed. - Deliberately restoring the legacy-secret fallback failed the restart test; restoring the build made it pass. - Independent code and test review completed. Docker build/run was not performed in this sandbox. Manual follow-up: start Compose without `.env`, sign in using YAML credentials, then restart and confirm default sessions expire.
eleith-gitea-agent Bot added 1 commit 2026-10-26 20:25:55 +00:00
feat: configure authentication in YAML
ci/woodpecker/pr/cli Pipeline was successful
ci/woodpecker/pr/config Pipeline was successful
ci/woodpecker/pr/web Pipeline was successful
ci/woodpecker/push/cli Pipeline was successful
ci/woodpecker/push/config Pipeline was successful
ci/woodpecker/push/web Pipeline was successful
33cdd9ace8
eleith merged commit 33cdd9ace8 into main 2026-10-26 22:15:30 +00:00
eleith deleted branch feat/config-first-auth 2026-10-26 22:15:30 +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/directory#52