Audit Log Service  ·  View 15 of 40  ·  4 · Data

The Audit Record

One canonical, versioned schema — and the small number of fields the producer is not allowed to influence.

Editable source SVG draw.io All views
tenant tenant_id PK residency_region retention_policy_id FK key_uri (HSM) index_window_days retention_class class_id PK online_months archive_years disposal_grace_days = 30 extendable (never reduced) legal_hold hold_id PK scope_type tenant|actor|resource|range scope_value matter_ref opened_by (legal role only) actor actor_id PK principal_type human|service principal auth_method on_behalf_of (nullable) audit_record event_id PK (service-assigned) tenant_id FK (from identity) occurred_at (producer asserts) received_at (service clock) clock_divergence_s action (controlled verb) outcome success|denied|error idempotency_key schema_version retention_class_id FK fail_mode open|closed resource resource_id PK resource_type stable_identifier tenant_id FK source source_id PK network_origin user_agent session_id request_correlation_id payload payload_ref PK before_value after_value bytes (record cap 256 KB) secret_scan_verdict authority authority_id PK authority_kind policy|role|grant policy_ref grant_ref approval_ref 1 : N 1 : N N : M 1 : N 1 : N 1 : N 1 : 1 1 : N The Audit Record — One Canonical, Versioned Schema tenant_id and received_at are assigned by the service and are the only fields a producer cannot influence. occurred_at is kept exactly as asserted, never corrected — the divergence is recorded beside it instead. v 1.0 · owner Data & AI Global Practice · date 2026-09

Decisions

  • tenant_id and received_at are service-assigned and unforgeable. actor is recorded as the service observed it, independently of any identity the payload claims — and both are kept, because a producer lying about itself is exactly the event worth having.
  • occurred_at is stored precisely as asserted and is never corrected. Where it diverges from received_at by more than five minutes, clock_divergence_s records the fact beside it. The service does not rewrite a producer's claim; it contradicts it.
  • denied and error outcomes carry the same schema and the same rigour as success. A refused privileged action is usually the more interesting record.

Question 6 answered

  • The log claims ordering by commit, over the service's own clock, per partition and per tenant chain. It claims nothing about the order in which actions occurred in the world.
  • occurred_at is indexed and queryable so an investigator can order by occurrence; the chain is not built on it, because a spooled event can arrive hours late and a hostile producer can assert anything.
  • The external RFC 3161 countersignature on each checkpoint is what stops the service backdating its own clock.

Constraints

  • 256 KB hard cap per record, rejected rather than truncated.
  • Secrets, credentials and full payment instruments are prohibited and enforced by a pre-commit detector, with the verdict itself recorded on the payload.