High-assurance audit
Audit ska kunna användas för säkerhetsutredning, vårdspårbarhet, privilegierad access och compliance — med bevisbar integritet.
Production target: application writer can append but not update/delete historical events.
Sequence + previous hash + canonical event data binds entries into an integrity chain.
Independent immutable retention copy outside the normal application write path.
Periodic root/checkpoint signed with a separately controlled key/HSM and independently retained.
Security events stream to detection/alerting without granting the application authority to erase them.
Viewing, searching, exporting and verifying audit data are themselves privileged auditable events.
Sample event schema
Minimera PHI i auditloggen men behåll tillräcklig kontext för bevis och utredning.
| UTC | Event | Actor | Tenant / resource | Assurance | Risk | Integrity |
|---|---|---|---|---|---|---|
| 2026-09-05 12:41:03Z | auth.step_up.succeeded | usr_82… | platform / session | passkey | High | Chained |
| 2026-09-05 12:41:11Z | support.impersonation.started | adm_04… | TEN-00041 / usr_19… | privileged | Critical | Chained |
| 2026-09-05 12:42:28Z | clinical.record.viewed | usr_19… | TEN-00041 / patient-context | MFA | Medium | Chained |
| 2026-09-05 12:43:06Z | audit.export.requested | adm_04… | platform / audit | step-up | Critical | Chained |
Projektet innehåller en development-only in-memory SHA-256 hash chain för att låsa eventformatet. Den är uttryckligen inte den framtida produktionsloggen. Production kräver durable append-only storage, WORM mirror, signerade checkpoints, separat key management, retention policy, restore/integrity verifiering och oberoende säkerhetsåtkomst.