tenant_adminUpdated 2026-05-02

Security Audit Trail

What this covers

The security audit trail records every row-security rule evaluation that fires during query execution. This page explains what is logged, how to read the audit log, how to filter it, and what access controls apply.

Why the security audit trail matters

Row security enforces data access by filtering query results at runtime. For compliance purposes you need to prove that:

The security audit trail provides this evidence. Each log entry links the rule, the principal, the persona (where applicable), and the timestamp of the query.

What is logged

Every time the query router applies a row-security rule, it writes an audit event containing:

FieldContents
rule_idUUID of the RowSecurityRule that fired
rule_nameDisplay name of the rule
principal_idUser ID from the JWT
principal_emailEmail address of the caller
persona_idUUID of the persona, if the query was routed through one
applied_atUTC timestamp of the query
query_fingerprintNormalized query fingerprint
predicate_appliedThe SQL predicate injected by the rule
attribute_sourceThe attribute source used (jwt_role, idp_group, saml_claim, oidc_scope)

Accessing the audit log

The security audit log is accessible from Tenant Administration → Security → Audit Log.

The same data is available via API:

GET /api/v1/security-audit

Query parameters:

ParameterTypeDescription
from_dateISO date stringInclude events on or after this date
to_dateISO date stringInclude events on or before this date
rule_idUUIDFilter to a specific rule
principal_idUUIDFilter to a specific user
limitintegerMaximum records per page (default 100, max 1000)
offsetintegerRecords to skip for pagination

Access control

Only users with the tenant_admin role can read the security audit log. Modellers and viewers receive HTTP 403. The purpose is to protect the log from being used to infer which data other users can see.

Attribute source values

Row-security rules can derive the filter value from four sources. The audit log records which source was used:

attribute_sourceWhere the value comes from
jwt_roleThe role claim in the caller's JWT
idp_groupThe group membership claim from the identity provider
saml_claimA named claim in a SAML assertion
oidc_scopeA named scope in an OIDC token

If the attribute source is absent from the token, the rule logs the evaluation but may produce an empty result set (the query runs but returns no rows) rather than a 403.

Retention

Audit events are kept for 90 days by default. The retention period can be adjusted in Workspace Settings.

Related