Skip to content
Audit & ReportsMarkdown

What is recorded

Every sign-in step, lockout, token, exchange, policy decision, revocation and change the realm writes to its audit trail, when it writes each, and which policy decisions it keeps.

AvailableAPI

The realm writes a record of everything it does for or about a user or an agent: every sign-in and sign-out, every token issued or refused, every exchange, the policy decisions that matter, every right a user takes back, and every change to the realm’s objects. Nothing needs turning on; this page is what you will find.

  • Privilege: none to read what is recorded about you. READ on the realm (RealmViewer or RealmOwner) to read anyone else’s records. Changing which policy decisions are kept needs MODIFY on the realm (RealmOwner).
  • Where: the API.
RecordEventWhen
A sign-inLOGIN_STARTED, LOGIN_CONTINUED, MODULE_COMPLETED, LOGIN, LOGIN_FAILED, LOGIN_ABANDONEDEach step of a sign-in, with how each step went, and the outcome
A session changeSESSION_UPGRADED, LOGOUT, LOGOUT_ALL, SESSIONS_REAPEDA step-up, a sign-out, signing out everywhere, expired sessions cleared
A lockoutAUTH_FAILURE_RECORDED, ACCOUNT_LOCKED, LOCKOUT_CLEAREDEach failure counted toward a lockout, the lockout, and its end. Recorded under the name typed, not the user’s id
A tokenTOKEN_ISSUEDEvery token request, issued or refused: what was asked, what was granted, the key it is bound to, or why it was refused
An exchangeTOKEN_EXCHANGEDEvery token exchange, allowed or refused, with the chain of agents
A policy decisionPOLICY_DECIDEDEvery deny, and every decision involving an agent. A user’s own allows only if you ask for them
A token revokedTOKEN_REVOKEDEvery revocation: an access token, a refresh family or a deferral code
An app or agent taken backAPP_TAKEN_BACK, AGENT_TAKEN_BACKA user taking back an app they allowed, or an agent’s right to act for them
An agent’s statusAGENT_QUARANTINED, AGENT_RELEASED, AGENT_KILLED, AGENT_RETIREDAn agent quarantined, released, killed or retired, with the status before and after, and whether an administrator or a received signal made it. On the trail of whoever made it and of the agent’s owner
A client’s secretCLIENT_SECRET_ROTATED, CLIENT_SECRET_PREVIOUS_USEDA rotation, and each use of the replaced secret while it still works
A registrationCLIENT_REGISTERED, REGISTRATION_TOKEN_MINTED, REGISTRATION_TOKEN_REVOKEDA client registered, and registration tokens minted or revoked
A changeCREATED, UPDATED, PATCHED, DELETEDEvery change to a user, group, agent, client or setting, with what changed, before and after. Read it in Change history

Each record carries what happened (eventType), when (eventTime), how it went (result), who it is about and who acted, its own detail in context, and the ids that tie it to the rest of its work. A sign-in’s record also lists each step in entries, with a stable code for a failure rather than a message. Every field, with full examples, is in Record fields and examples.

The realm’s authorizationSettings.auditDecisions chooses which decisions are kept:

ValueKept
agents (the default)every deny, and every decision an agent is in, asking or acting for someone, so an agent’s trail is whole
alla user’s own allows too: one record per request

There’s nothing to turn on. To keep every decision, a realm administrator sets auditDecisions to all (Call the API shows how to get $CVYUH_SESSION):

Terminal window
curl -X PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/authorizationSettings/authorizationSettings \
-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \
-H "Content-Type: application/json" \
-d '{ "auditDecisions": "all" }'

The realm answers with the settings as they now are. A value other than agents or all is refused with 400, and a caller without MODIFY on the realm with 403.

WhatDefaultRange
auditDecisionsagentsagents or all
Records per policy decisionOne, when kept
What is never recordedPasswords, secrets, session cookies, tokens and keys

Changing auditDecisions is itself recorded: a PATCHED entry in the change history of authorizationSettings/authorizationSettings, with who made it and the value before and after.

SymptomCauseFix
A user’s allowed requests aren’t on their trailauditDecisions is agents, which keeps only denies and agents’ decisionsSet it to all for as long as you need them
No lockout records on a locked user’s trailLockout records follow the name typed, in lower case, not the user’s idRead ?person=maya, the name in lower case: see Look into a locked account
The gateway’s denies aren’t on the trailThe gateway logs its own decisions where it runsRead the gateway’s log; only decisions it asks of the realm are on the trail
  • A user’s records follow their id, lockout records excepted. Sign-ins, failed sign-ins and tokens for a user are under their id, so a renamed user keeps their trail. Lockout records follow the name signed in with, in lower case (read them with ?person=maya). A refused token request is recorded under the client that asked, since no user is known yet.
  • Secrets never reach the trail. Records of a change leave out every secret field, and a key change records who made it, never the key. Session cookies and tokens are never recorded; a session is named by a handle that can’t be used to sign in.
  • Signing-key changes aren’t about a principal, so they aren’t in a trail answer; no API returns them yet. See Signing keys.
  • Secrets Store records every request and change too, reads included, values left out. Its records can’t be read back through the API yet. See Secrets audit trail.
  • The gateway’s own decisions aren’t on the realm’s trail yet. See What’s next for audit and reports.