miroir/crates/miroir-ctl
jedarden 6e35e420a9 P10.3: SEARCH_UI_JWT_SECRET dual-secret overlap rotation
Implement plan §9 JWT signing-secret rotation with zero-downtime dual-secret
overlap window. Primary secret signs new tokens (kid header identifies it),
optional previous secret validates old tokens during rotation. Validation tries
primary first, falls through to previous on signature mismatch, and propagates
Expired immediately when the correct secret is found.

Key pieces:
- auth.rs: dual-secret JWT validation with kid header, leak response via empty
  previous, full test coverage (62 tests including e2e rotation scenario)
- main.rs: read SEARCH_UI_JWT_SECRET_PREVIOUS, refuse startup without primary
- config: jwt_secret_previous_env + jwt_rotation_buffer_s in SearchUiAuthConfig
- miroir-ctl: rotate-jwt-secret command (5-step dual-secret overlap procedure)
- Helm CronJob: quarterly schedule, suspended by default, Forbid concurrency

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 16:17:33 -04:00
..
src P10.3: SEARCH_UI_JWT_SECRET dual-secret overlap rotation 2026-04-19 16:17:33 -04:00
tests P12.OP3: Validate 2× transient load caveat and add CLI schedule window guard 2026-04-18 22:00:57 -04:00
Cargo.toml P10.3: SEARCH_UI_JWT_SECRET dual-secret overlap rotation 2026-04-19 16:17:33 -04:00