Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Logs

The admin keeps three read-only logs under Settings → System: the audit log of administrative changes, the access log of sign-ins, and the request log of URLs it could not serve. Each is gated by its own permission and exportable.

Read the audit log

Every administrative change is recorded in an append-only log; handlers do not opt in. Gated by backend.view_audit_log; superusers hold it.

FieldValue
WhenThe time of the change.
OperatorThe username, kept on the entry after the account is removed. A system change records the process name.
ActionA dot-keyed name: backend.role.update, backend.plugin.disable.
TargetA type, id and name, when the action has one.
ChangeRecorded
A role created or editedYes
A user’s permissions changedYes
A password changedYes, as backend.user.password_change, never the password
An operator created from setup or lat admin createYes, as backend.user.create, credited to the process
A plugin enabled or disabledYes
A settings model savedYes, without the contents
A record created or edited through a resource formYes
An operator’s own preferencesNo

Read the access log

Every sign-in, failure, lockout, sign-out and self-service password change, with the address and client it came from. Gated by backend.view_access_log.

ColumnHolds
WhenThe time of the event.
UsernameThe username attempted, searchable.
EventOne of the events below; a filter narrows to one.
AddressThe IP address, searchable.
ClientThe user agent; hidden until turned on in the list setup.
EventRecorded when
login_successA sign-in succeeded.
login_failureA password was wrong, or the username unknown.
locked_outAn attempt was refused by the lockout.
logoutAn operator signed out.
password_changedAn operator changed their own password.

Rows older than access_log_retention_days (see Authentication) are purged hourly.

Read the request log

Every URL the admin could not serve is counted, once per method, path and status, with the first and last time it was seen. Gated by backend.view_request_log.

# descriptors/request-log.yaml, built in
entity: backend_request_log
path: /request-log
permission: backend.view_request_log
ColumnHolds
Last seen, First seenWhen the URL was last and first requested.
Method, PathThe request; the path is kept to 512 characters, without its query string.
Status404.
HitsHow many times.

Rows are selected and deleted like any list’s.

Write audit entries from your own resources

A Resource with a form is audited as backend.<entity>.create and backend.<entity>.update, attributed to the signed-in operator, through a model listener.

A screen of your own records an entry with the builder:

use laterite_auth::AuditEntry;
use laterite_core::Actor;

let actor = Actor::user(operator.id, &operator.username);
auth.record_audit(
    AuditEntry::new(&actor, "acme.posts.publish").target("post", &post_id, Some(&post.title)),
)
.await?;
BuilderDescription
AuditEntry::new(actor, action)Who, and a dot-keyed action under your module’s id.
.target(type, id, name)What the action touched; name may be None.

The audit write runs after the change commits. A failed audit write is logged; the operator’s action stands.