Skip to content

What an audit is never missing

An audit trail that is complete most of the time proves nothing on the day it matters, because nobody can tell which day that was. Xratu holds a set of invariants that keep every record complete: changes that go unrecorded, decisions without evidence, and runs that continue as trusted after their telemetry fails are all refused. This page lists the invariants, what enforces each one, and what happens when one cannot be met.

The invariants

Invariant Enforced by
Every change to control-plane state is audited The trace and audit middleware on every mutating request
Every policy decision is evidence The kernel's hooks: each firing emits one immutable PolicyDecision
Every kernel record names what the run executed The run fingerprint, computed once and carried on every record
A trusted run has complete telemetry The telemetry failure policy
Audit metadata is never sampled The telemetry redaction and storage policy
A missing value is recorded as missing Explicit unknown values
Every loosening of policy is visible Signed exemptions, named in the fingerprint and in each decision
No record holds a secret value Declared keys, grants and receipts; redaction before any record is written
A stale report changes nothing Route, lease and policy fences
A record is never rewritten Hash chains, sealed journals, append-only schema evolution
A record is removed only under governance Retention, legal hold and audited purge

Every change is audited

Every POST, PUT, PATCH and DELETE to the control plane produces at least one audit record. A service that changes state writes a typed record naming what changed. When it writes none, the trace and audit middleware writes api.<method> with the path, parameters, status code and duration. A request that fails is recorded with status 500 and the error, and a refused request is recorded with its status. Attempts are on the record along with successes. See Three layers of evidence.

Every decision is evidence

Every time a policy hook fires, the kernel emits a PolicyDecision, including when the effect is to allow. Once emitted it is frozen. A run's decisions are therefore the complete list of the rules that were evaluated, and that list includes the rules that allowed as well as the ones that blocked. See Policy decision evidence.

A run without telemetry is not trusted

Telemetry failure has an explicit policy:

Situation Result
Production, a telemetry append fails The run fails closed or is cancelled
The journal is unavailable The run cannot enter trusted mode
A worker crashes The relay emits a synthetic terminal record and a telemetry.gap.detected record
Development The run is marked untrusted, and continues only when configured to
Tests An in-memory journal is allowed

A production run never continues as trusted when its telemetry cannot be written, chained or sealed. A gap is itself a record, so an auditor sees where the account is incomplete and why. See Native telemetry.

Metadata is complete; bodies follow policy

Every telemetry record carries its redaction profile and storage policy:

redaction_profile        hash_only, metadata_only, sampled, encrypted_ref, plain_allowed
content_storage_policy   never, secure_object_store, journal_inline_allowed

A body may be hashed, redacted, sampled, encrypted or stored by reference as policy allows. Secrets and private state are only ever hashed or held as encrypted references. The metadata audit and replay need, such as identifiers, hashes, sizes, labels, effects and decisions, is never sampled in production.

Unknown is recorded, never omitted

When the kernel cannot determine a label, an effect, a source, a schema, a clock or who observed a fact, the record carries an explicit unknown. A field needed for audit, scoring or replay never disappears because its value was not available. A missing value in the record is itself a finding.

Loosening is always signed

Policy can be loosened only by a signed exemption: issued by an authority at the right level, bounded in time, and named in the run's fingerprint (exemption_refs) and in every PolicyDecision it applied to. A break-glass override is requested, decided and audited as secret.break_glass.request and secret.break_glass.decide. A bypass therefore always leaves a signed record naming who authorized it. See Exemptions and Break-glass.

No record holds a secret

A secret is named in the record by its consumer, its binding revision and digest, its grant digest and the external version digest the XSRP gateway reported. Values exist only in your secret manager, the installation-local XSRP gateway while it performs an operation, and the kernel's delivery to one consumer. Every record is redacted before it is written: keys and strings that look like credentials are replaced. See Resolution evidence admission.

A record is never rewritten

Records are append-only at every layer, and chained where they are kept. Telemetry contracts evolve append-only within a major version; unknown event types are preserved through collection and replay; a migration runs through a materialized view and never rewrites a sealed journal. See Integrity at every layer.

A record is removed only under governance

Records live for their retention window. A legal hold keeps records past it, and a purge removes only what retention allows and no hold covers. Creating a hold, releasing it and running a purge are each audited acts (retention.legal_hold.create, retention.legal_hold.release, retention.purge.run), so every removal has an actor and a date. See Auditor access and export.