Audit Logs
Query, summarize, and export the audit log. Every action in ScaiVault — reads, writes, rotations, policy changes, certificate issuance, dynamic leases — has an audit entry.
Base path: /v1/audit/
Query#
1 2 | |
1 2 3 4 5 6 7 8 9 10 11 12 | |
1 2 3 4 5 6 7 8 9 10 11 | |
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | |
Filters#
| Parameter | Description |
|---|---|
from / to |
ISO 8601 timestamps |
action |
read, write, delete, list, rotate, policy_create, policy_update, policy_delete, policy_bind, policy_unbind, pki_issue, pki_revoke, dynamic_generate, dynamic_revoke |
identity_id |
Exact match |
identity_type |
user, service_account, group |
path_prefix |
Filter to secrets under a path |
success |
true or false |
source_ip |
Exact match |
request_id |
Exact match (e.g. finding one trace) |
limit |
Default 100, max 1000 |
cursor |
Pagination |
Audit trail for a secret#
Every access to one secret over time:
1 2 | |
Response:
1 2 3 4 5 6 7 8 9 10 11 | |
Useful for compliance questions ("who has read this secret in the last quarter?").
Audit trail for an identity#
Every action one identity took:
1 2 | |
Response:
1 2 3 4 5 6 7 8 9 | |
Useful for offboarding: when an employee leaves, pull their trail, rotate anything they touched.
Summary statistics#
1 2 | |
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | |
Good for dashboards and anomaly baselines.
Export#
For long-term archival or offline analysis, export to an object store:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
Formats: jsonl (one event per line), csv (flat, column-heavy).
Destinations: s3, gcs, azure_blob. Credentials come from a ScaiVault secret — the export doesn't take inline AWS keys.
Response:
1 2 3 4 5 6 | |
Poll status:
1 2 | |
When status: "completed", the manifest lists the written files.
Retention#
By default, ScaiVault retains audit logs for 7 years. Older entries are moved to cold storage (if configured) or deleted. Configure retention per tenant in the admin UI under Audit → Retention.
Exports are your responsibility to retain — ScaiVault uploads them and doesn't track them afterward.
What the audit log records#
Every entry includes:
- Who. Identity ID, type, session tracking.
- What. Action name, resource path.
- When. Timestamp with microsecond precision.
- Where. Source IP, user agent.
- How. Request ID, HTTP method, status, duration.
- Outcome. Success / failure, error code if failed.
- Context. Extra data per action (e.g.
rotation_reason,policy_violation_condition).
Reads of secret values include the path but not the value. The audit log is never a place where secrets leak.
What the audit log does not record#
- Reads of audit logs themselves (to avoid recursive noise — set up a separate SIEM destination if you need this).
- Health check requests.
- Identity cache-sync events (visible under
/v1/identity/sync/history).
Common questions#
"Who accessed this secret in the last week?"
GET /v1/audit/secrets/{path}?from=<7d ago>&action=read — returns identities and times.
"Did this policy change break anyone?"
Filter to action=read with success=false around the policy change time. Failed reads after a policy tightening often indicate broken service accounts.
"What did this ex-employee touch?"
GET /v1/audit/identities/user:person@acme.example?from=<hire date> — and rotate anything on the list.
"What happened during the incident at 14:30?"
GET /v1/audit/logs?from=<14:25>&to=<14:35> — slice the 10-minute window for inspection.
What's next#
- Events and Webhooks — real-time stream, not just after-the-fact query.
- Audit Logs Reference — endpoints.