Audit log
Every configuration change is recorded: what changed, which account changed it, and when.
Audit log
| Time | User | Resource | Event | Changes |
|---|---|---|---|---|
| avery | proxy_hostupdate | Enabled the WAF on grafana.example.com | ||
| avery | waf_rulewaf.rule_suppressed | Suppressed rule 942100 for grafana.example.com | ||
| sam | proxy_hostupdate | Added upstream http://app-2:8080 to app.example.com | ||
| sam | l4_proxy_hostcreate | Created L4 proxy host postgres (5432/tcp) | ||
| avery | client_certificatecreate | Issued client certificate backup-runner |
What it covers
Section titled “What it covers”Creating, editing, enabling, disabling and deleting proxy hosts, L4 hosts, certificates, access lists, users, groups, WAF presets, CRS plugins and OAuth providers (the operations that alter what the proxy does), plus sign-ins, forward-auth logins and denials, password changes, two-factor turned on, off or reset, backups made and restored, certificate renewals asked for and private keys downloaded, saved analytics views created, changed and deleted, and an administrator starting and ending View as. Each settings apply is logged too, with Settings → History keeping the full revisions. Reads are not logged, key, backup and configuration exports aside; the log exists to answer “why is this host configured like this”, not to track browsing.
What changed
Section titled “What changed”A change to a host, an access list, a certificate, a group, a user’s role, status or profile, a WAF exclusion, a blocked source or a setting records each field before and after. The row’s Changes button opens them, as a unified list or side by side, and the choice is remembered in your browser. Host fields read as the editor names them, with certificates, access lists and agents by name rather than id; anything secret-looking (passwords, tokens, keys, credentials inside custom JSON or Caddyfile snippets, and every value encrypted at rest) is masked on both sides before it is stored, so the log never holds it.
A proxy or L4 host event also names the revision its change made. Its Revert opens the host’s history comparing that change with the state before it, ready to roll back; a deletion’s Restore opens a deleted host’s history, ready to bring it back.
Tamper evidence
Section titled “Tamper evidence”Every event stores a keyed hash (HMAC-SHA256) of the event before it plus its own content, under a
key derived from SESSION_SECRET, so the log is a chain: changing an event, removing one or
slipping one in breaks it from that point on, and write access to the database alone is not enough
to rebuild it. Verify recomputes the chain and reports the first broken link:
which event changed, which is missing, or that the newest events are gone. The check is itself logged.
- Events logged before the upgrade that introduced the chain are older history, outside the sequence. Each carries a keyed mark of its own instead of a link, so editing one, removing one or adding one among them at any position is still reported.
- The chain’s head is sealed with the same key, so it cannot be moved back over removed events.
- Concurrent writes cannot fork the chain: each write takes the chain’s head in its own transaction, a row lock on PostgreSQL and the single writer on SQLite.
- A restore that includes the audit log brings its events along and re-hashes them under this installation’s key, since the backup may come from another one; one without leaves the chain here as it was. Removing old events on purpose anchors the chain at the newest event removed, so pruning is not reported as tampering.
- Rotating
SESSION_SECRETre-keys the chain on the first start with the new secret: with the old one inSESSION_SECRET_PREVIOUS, the chain is verified under the old key and, only if it holds, re-hashed under the new one in a single transaction, and an event records the re-key. Verify does not keep accepting the old key, since a secret is often rotated because it leaked. Rotate withoutSESSION_SECRET_PREVIOUS, or with a chain already altered, and Verify reports the log as altered from then on. - The chain shows that the log was altered, not who altered it. Someone who holds
SESSION_SECRETas well as write access to the database can rebuild a consistent chain; keep backups that include the audit log somewhere they cannot reach if that matters to you.
verifyAuditChain in GraphQL runs the same check, and each event’s changes field
carries its diff.
Streaming it elsewhere
Section titled “Streaming it elsewhere”Audit streaming sends every event, as it is written, to a syslog server, an HTTP receiver or a file, with the chain fields a receiver needs to check nothing is missing.
Retention
Section titled “Retention”By default the log keeps every event. Settings → General → Audit log retention
(AUDIT_LOG_KEEP_DAYS) sets how many days of it to keep instead; 0 keeps everything again. Once
a day the controller leading the cluster removes the events older than that, counted from
midnight UTC, and records an event saying how many went and where the cut was. The removal
anchors the chain at the newest event removed, so Verify still passes afterwards and a gap
nobody sanctioned is still reported. Events from before the chain existed are removed by age as
well.
Removing old events is a system job, so it is never held for
change approval. A streaming sink that had not
yet received what was removed is sent a gap record in its place and raises an alert, so keep the window comfortably longer than any
outage a receiver might have.
Reading it
Section titled “Reading it”The page opens with the last 24 hours at a glance: an hourly activity strip with the busiest hour marked, and how many accounts and kinds of resource were touched. Each row then names the resource and the action alongside the account and the summary. The strip ignores the search, so it stays the context for whatever you are looking through.
Searching it
Section titled “Searching it”Filtering and paging run on the server. Type to search the summary, action and resource, or pick a field (User, Resource or Action) to narrow on it exactly. Filters combine, so “every certificate change Avery made” is two tokens rather than a scroll. The filters live in the address bar, so a filtered view can be bookmarked or linked.
Attribution
Section titled “Attribution”Changes made through the API are attributed to the token’s owner, so an automated change traces back to the person whose token made it rather than appearing anonymous.
Access
Section titled “Access”Only administrators can open it, as with analytics and the API docs.