Skip to main content

Module audit

Module audit 

Source
Expand description

The audit log: one record per request, written in the same transaction as the change it describes. A record holds no vCon content, no token and no client address.

Structs§

AuditQuery
What an audit read asks for: at most limit records after the seq after, oldest first.
Entry
One request, as recorded.

Enums§

Action
What a request asked for. A refused request records what it asked for.
Actor
Who made a request.
AuditError
Why a record could not be written or exported.

Constants§

SCHEMA
The audit table, part of every catalog that holds a log.

Functions§

count
Adds one to the record for this actor, action and status in the minute of now, making it if needed. For requests that could otherwise grow a log one row each: failed authentications and health checks.
export
Writes every record after since as JSON lines, oldest first.
page
Writes at most query.limit records after query.after as JSON lines, oldest first: the first lines export writes from the same place.
record
Appends one record, at now, in tx.