Skip to content
Audit & ReportsMarkdown

Audit trail

The realm's own record of every sign-in, token, exchange, decision and change, read per user, per agent or per object, kept for the life of the realm, and never edited.

AvailableAPI

The audit trail is the realm’s own record of what it did. It is written as the realm works, with nothing to turn on, kept for as long as the realm exists, and never edited after it is written. Every record carries the ids that tie it to the request, the sign-in and the token it belongs to, so the records of one piece of work can be found together.

CapabilityWhat it gives you
What is recordedSign-ins, lockouts, tokens, exchanges, policy decisions, revocations and changes
Record fields and examplesEvery field of a record, full examples, and the ids that tie records together
Read a user’s or agent’s trailEverything about one principal, newest first, paged (with limits)
Your own trailA signed-in user reads what they did and what was done in their name
Change historyEvery change to one user, group, agent or setting, newest first, secrets left out (with limits)
Policy decisions on the trailEvery deny and every decision involving an agent, or every decision if you choose
Retention and sitesKept for the life of the realm; each site keeps its own records (with limits)
  • Privilege: a user reads their own trail with no privilege. Reading anyone else’s trail, or an object’s change history, needs READ on the realm: the RealmViewer privilege gives it with no right to change anything, and RealmOwner includes it. See Give an auditor read-only access.
  • Where: the API.

You read the trail from one of two ends:

To answerReadUnder https://foobar.cvyuh.com/api/v0/am
What did this user or agent do, and what was done in their name?the principal’s trail/audit/v1/trail?person=… or ?agent=…
Who changed this user, group, agent or setting, and how?the object’s history/objects/v1/<type>/<id>/history

For example, a signed-in user reads their own trail (Call the API shows how to get $CVYUH_SESSION):

Terminal window
curl https://foobar.cvyuh.com/api/v0/am/audit/v1/trail/me \
-H "Cookie: x-cvyuh-token=$CVYUH_SESSION"
WhatDefaultRange or note
How long records are keptFor the life of the realmNot configurable today
Records in a trail page201 to 100
Entries in a change-history page501 to 500
Policy decisions kept (auditDecisions)agentsagents or all
When a record appearsWithin moments of the work it recordsNot a fixed bound
  • Records can’t be changed. No call edits or deletes a record, a realm administrator’s included. A record stays as it was written for the life of the realm.
  • Secrets never reach the trail. Records of a change leave out every secret field, a key change records who made it and never the key, and session cookies and tokens are never recorded: a session is named by a handle that can’t be used to sign in.
  • Recording never slows a request. A record appears on the trail within moments of the work it records. In rare failures, a record can be missing even though the request completed.
  • Reading the trail adds nothing to it. Your reads don’t show up on the trails you read.

The gateway’s own decisions on the trail, a search across every record of the realm, realm-wide reports, streaming to your SIEM, a retention period you choose and a tamper-evident trail: see What’s next for audit and reports.