Audit Log Service  ·  View 22 of 40  ·  5 · Runtime

An Investigative Query

Eleven messages, and the one that is deliberately ordered before the query runs rather than after.

Editable source SVG draw.io All views
Investigator Query API OPA + Entra Ingest API ClickHouse Segment Store 1. actor + range + justification reference 2. role, tenant scope, query budget 3. permitted · 30 s budget · 50 k row cap 4. record.read written BEFORE execution 5. committed 6. scan — tenant partition pruned first 7. rows + last reconciled segment id 8. fetch payload bytes for this page only 9. decrypt under this tenant's key 10. page + cursor + completeness bound 11. result count and truncation flag An Investigative Query — and the Record It Leaves Behind The read record is written before the query runs, so a query that times out, is cancelled or returns nothing is still on the record. Writing it afterwards would make the interesting case the one that leaves no trace. v 1.0 · owner Data & AI Global Practice · date 2026-09

Decisions

  • The read record is written before execution. A query that times out, is cancelled, or returns nothing is still on the record — writing it afterwards would make the interesting case the one that leaves no trace.
  • The read record carries the query text, the caller, the justification reference and, once known, the result count and whether the set was truncated.
  • Results state their completeness bound: the sealed segment the answer is complete to. A truncated result set says so explicitly rather than silently capping.

Cost and scope control

  • OPA returns a budget with the authorization: a wall-clock limit and a row cap per role. An unbounded 13-month scan is the cost incident this service would otherwise have.
  • Tenant partition pruning happens before any scan, so query cost is proportional to time range and predicate selectivity rather than to corpus size.
  • Payload bytes are fetched from segments for the page being read only, and decrypted under that tenant's key.

Risks

  • Reading cannot be undone. Detection names the reader and the volume; it does not put the data back. Anomalous read patterns are alerted (view 32) and export volume is capped per role (view 24), which is mitigation rather than prevention.