Problem
Application logs are noisy, mutable and rotated away, so after an incident nobody can prove who accessed or changed sensitive data. Privileged insiders could also edit the evidence.
Also known as: audit-trail, immutable-audit-log
Record who did what, when and from where in an append-only, tamper-evident store to support investigation and compliance.
Application logs are noisy, mutable and rotated away, so after an incident nobody can prove who accessed or changed sensitive data. Privileged insiders could also edit the evidence.
An audit log is a security record, distinct from application logs. Its value rests on completeness, integrity and access control. Every entry must answer who, what, which resource, when, from where and with what result, including denied attempts.
Define a small common event schema early, with stable action names and resource identifiers, so events from different services can be queried together. Give security and compliance teams a read-only query interface, and test your retention and legal-hold procedures before an auditor asks for them.
service -> outbox table (same transaction as the change)
relay -> durable queue -> audit writer
writer -> append to WORM store (object lock, 7y)
entry = { id, ts, actor, action, resource, outcome, ip,
prevHash, hash = SHA256(prevHash + body) }
verifier job: recompute chain daily, alert on mismatch or gap
Writing the event to an outbox in the same transaction as the business change avoids both lost and phantom events.
Medium — queue and immutable storage
Medium — retention, access review
Low to medium
Dropped events during pipeline outage leave gaps
Sensitive values logged in plaintext
Producer credentials can delete past entries