bert.hausmans
4df668b5b8
feat: replace token-based impersonation with enterprise-grade header-based system
Replaces the insecure token-in-localStorage approach with a header-based
impersonation system backed by cache sessions and MFA verification.
Key changes:
- New impersonation_sessions audit table (immutable, ULID PK)
- MFA verification required to start impersonation (TOTP/email/backup)
- X-Impersonate-User header + HandleImpersonation middleware
- Per-request auth context swap (admin session never modified)
- IP pinning, sensitive route blocking, no nesting, sliding 60-min TTL
- Activity log auto-tagged with impersonated_by during sessions
- Frontend: sessionStorage, BroadcastChannel sync, countdown timer
- ImpersonateDialog with reason + MFA verification flow
- 26 comprehensive tests covering core, middleware, audit, lifecycle
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 02:42:53 +02:00
..
2026-04-16 02:42:53 +02:00
2026-04-15 23:49:51 +02:00
2026-04-10 23:04:55 +02:00
2026-04-14 08:16:36 +02:00
2026-04-10 11:15:51 +02:00
2026-04-15 20:12:21 +02:00
2026-04-14 21:48:07 +02:00
2026-04-14 08:16:36 +02:00
2026-04-15 20:12:21 +02:00
2026-04-14 08:16:36 +02:00
2026-04-13 00:44:34 +02:00
2026-04-08 01:34:46 +02:00
2026-04-13 00:44:34 +02:00
2026-04-14 18:38:53 +02:00
2026-04-14 08:16:36 +02:00
2026-04-14 08:44:24 +02:00
2026-04-14 08:16:36 +02:00
2026-04-14 08:16:36 +02:00
2026-04-14 08:16:36 +02:00
2026-04-14 08:16:36 +02:00
2026-04-15 20:12:21 +02:00
2026-04-14 22:07:37 +02:00
2026-04-12 22:10:16 +02:00
2026-04-14 22:07:37 +02:00
2026-03-29 23:19:06 +02:00