NextMyDay/cmd/myday
Claus Lohmar 8268757773 fix(security): sign the setup ceremony with startup-generated keys
REVIEW-001 (M0) M1s: the /setup wizard's pre-session double-submit ceremony
(A15) was signed with csrf_key/cookie_secret left at the shipped CHANGE_ME
placeholder until `finish` persisted generated values — a publicly-known
signing key for the whole bootstrap.

Generate strong ephemeral values at startup in setup mode, mirroring the
TOTP key (R-6/D-1): `finish` skips a non-placeholder, so the wizard persists
the very values the process already uses.

Also add cmd/myday's first test — REVIEW-001 M2c: the D-1 invariant (the
startup TOTP key is the persisted key) was covered only by a manual smoke. It
generates the key, enrolls a secret, persists via the wizard, reopens the DB
with the persisted key and asserts the secret still unseals.
2026-10-14 11:30:09 +00:00
..
main.go fix(security): sign the setup ceremony with startup-generated keys 2026-10-14 11:30:09 +00:00
main_test.go fix(security): sign the setup ceremony with startup-generated keys 2026-10-14 11:30:09 +00:00