Auditor access and export¶
An auditor needs to read every record in their scope, read the bodies behind them, take a copy out that can be checked independently, and know that records under investigation will not be removed while they work. Reading audit records is a permission of its own; reading a body in your bucket is a separate, governed request that a node serves; and keeping records past their retention is a legal hold. Every one of those acts is audited in turn. This page covers the scopes audit can be read at, how bodies are released, what an exported record carries, and retention, legal hold and purge.
Who can read what¶
Reading audit records requires the audit.read permission in the workspace,
granted through RBAC like any other permission. Audit is readable at every
scope a question starts from:
| Scope | Command |
|---|---|
| A run | xratu obs audit run $RUN_ID |
| A project | xratu obs audit project orders |
| A model | xratu obs audit model llm-small |
| A policy | xratu obs audit policy $POLICY_ID |
| An actor's activity | xratu obs audit actor $ACTOR_ID |
| The workspace | xratu obs get audit |
| An organization | xratu obs audit organization acme |
| The system | xratu obs audit system, for the system actor only |
History is readable the same way, at the project and run scopes, with
xratu obs history. Listings filter by actor, action, resource, run and time
range, and return metadata and references: a listing never carries a body. See
Manage RBAC bindings and service accounts.
Reading a body¶
A body, the state before and after an audited change, an event, a log line or an attestation, is released one record at a time:
flowchart TB
AUD["Auditor<br/>session key pair"]
subgraph CP["CONTROL PLANE"]
direction TB
MK{{"Marker validated<br/>one record, fixed locator"}}
OP[("Payload access operation<br/>audited, watched")]
MK --> OP
end
subgraph YI["YOUR INFRASTRUCTURE"]
direction TB
N["xratud<br/>mints a read-only credential,<br/>300 s, one object"]
OBJ[("The body<br/>in your bucket")]
end
AUD -->|"request"| MK
OP -->|"assignment"| N
N -->|"encrypted to the session key"| AUD
AUD ==>|"GET"| OBJ
The request names one record by a locator fixed per record kind: an audit
record by record_id, a history event by event_id, a run event by run_id
and seq, a service log by log_id. It cannot be widened into a scan. A node
mints a read-only credential for that one object, valid for 300 seconds, and
returns it encrypted to the auditor's session key; the control plane records
the access and never holds the means of it. The auditor checks the body
against the digest in the record. See
Payload access and transport profiles.
What an exported record carries¶
Every audit, history, event and log record returned by a listing carries its chain fields beside its content:
integrity_seq, integrity_prev_hash, integrity_hash
integrity_signature_alg, integrity_signature
before and after: payload_ref, digest, size, content type
A copy of a scope's records can therefore be checked outside Xratu: the hash of each record recomputes from its content, its sequence and its predecessor's hash, and each body fetched recomputes to its digest. The signature confirms the control plane wrote the record, and the control plane's own verification checks it. See Integrity at every layer.
Retention, legal hold and purge¶
Records live for the retention window resolved from the workspace's baseline policy:
A legal hold keeps records past their window. It is created at the scope an investigation needs, a workspace, a project or a run, with a reason, and later released; it is never edited:
xratu policy create hold run $RUN_ID "incident 4471"
xratu policy get holds
xratu policy release hold $HOLD_ID "incident closed"
A purge removes only records past their window that no active hold covers, and can be run as a dry run first:
Creating a hold, releasing it and running a purge are each audited
(retention.legal_hold.create, retention.legal_hold.release,
retention.purge.run), and each also appends to the purge and hold event
stream:
Every removal therefore has an actor, a reason and a date, and no record under a hold can be removed. See Retention authority and Retention, legal hold, purge, and audit export.