Audit events
Hash verification, chain integrity, and explicit durable storage.
AuditEvent records an event kind, tenant, outcome and contextual metadata. Its builder can attach an agent, session, token, request ID and previous hash. compute_hash and verify_hash check event integrity; AuditLog::verify_chain checks linkage across stored events.
Record and verify
Build an event at the operation boundary, record the correct outcome, link it to the previous event according to your logging implementation, and persist it to a durable sink. Verify individual hashes and the ordered chain during export or incident review.
A local AuditLog is an in-memory collection. Hash chaining detects modification relative to retained trusted history; it does not by itself provide durable storage, prevent truncation, or publish an immutable blockchain record. Configure retention, append controls and external checkpoints if your threat model requires them.
Keep secrets and raw capability/session material out of metadata. Full argument payload capture may contain user data or credentials; choose redaction and payload-hash policy deliberately.
See event and chain API. Deployment-specific SIEM export or on-chain archival requires its own integration and verification.