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-07 10:45:34 +02:00
2026-01-06 03:11:46 +01:00
2026-01-06 03:11:46 +01:00
2026-04-07 10:45:34 +02:00
2026-04-07 10:45:34 +02:00
2026-04-07 10:45:34 +02:00
2026-04-07 10:45:34 +02:00
2026-04-07 10:45:34 +02:00
2026-04-07 10:45:34 +02:00
2026-04-07 10:45:34 +02:00
2026-04-07 10:45:34 +02:00
2026-04-07 17:35:34 +02:00
2026-04-08 01:34:46 +02:00
2026-04-08 01:34:46 +02:00
2026-04-08 01:34:46 +02:00
2026-04-08 01:34:46 +02:00
2026-04-08 01:34:46 +02:00
2026-04-08 01:34:46 +02:00
2026-04-08 01:34:46 +02:00
2026-04-08 01:34:46 +02:00
2026-04-08 01:34:46 +02:00
2026-04-08 01:34:46 +02:00
2026-04-08 01:34:46 +02:00
2026-04-08 01:34:46 +02:00
2026-04-08 01:34:46 +02:00
2026-04-10 11:15:31 +02:00
2026-04-08 01:34:46 +02:00
2026-04-08 01:34:46 +02:00
2026-04-08 01:34:46 +02:00
2026-04-08 01:34:46 +02:00
2026-04-08 01:34:46 +02:00
2026-04-08 01:34:46 +02:00
2026-04-08 01:34:46 +02:00
2026-04-08 01:50:38 +02:00
2026-04-08 07:23:56 +02:00
2026-04-08 07:23:56 +02:00
2026-04-10 21:09:49 +02:00
2026-04-10 11:15:43 +02:00
2026-04-10 11:15:43 +02:00
2026-04-10 21:50:24 +02:00
2026-04-10 12:50:25 +02:00
2026-04-10 20:03:54 +02:00
2026-04-10 23:04:55 +02:00
2026-04-10 23:04:55 +02:00
2026-04-10 23:04:55 +02:00
2026-04-11 09:06:29 +02:00
2026-04-12 22:10:16 +02:00
2026-04-12 22:10:16 +02:00
2026-04-12 22:10:16 +02:00
2026-04-12 22:10:16 +02:00
2026-04-12 22:10:16 +02:00
2026-04-12 22:10:16 +02:00
2026-04-13 00:44:34 +02:00
2026-04-14 06:52:54 +02:00
2026-04-14 08:44:24 +02:00
2026-04-14 08:44:24 +02:00
2026-04-14 15:38:54 +02:00
2026-04-15 20:12:21 +02:00
2026-04-15 20:12:21 +02:00
2026-04-15 20:12:21 +02:00
2026-04-15 20:45:55 +02:00
2026-04-15 20:45:55 +02:00
2026-04-15 20:45:55 +02:00
2026-04-15 20:45:55 +02:00
2026-04-15 22:18:16 +02:00
2026-04-16 02:42:53 +02:00