Skip to content

safekeys/audit-logging [built] ​

Every resolution is recorded — who, what scope, which jti, which host — without ever logging the secret. The audit log is append-only, captures denials as well as successes, and is the evidence trail that makes a security review and an incident response possible.

Status: built

Why this exists ​

A system that promises "the model never sees secrets" must be able to prove what happened without becoming a new place where secrets leak. An append-only record of identifiers and outcomes gives operators the accountability they need — including visibility of denials, which is often the first signal of an attack — while remaining worthless to anyone who steals it.

Design decisions ​

metadata-only-logging [accepted] ​

Decision: Log identifiers and outcomes, never values or key material.

Rationale: The audit log is a high-value target precisely because it is central and long-lived. Keeping it metadata-only means a breach of the log is an accountability problem, not a secret-disclosure one.

record-denials [accepted] ​

Decision: Record denied attempts as first-class events.

Rationale: Denials are frequently the earliest evidence of misuse or a probing attack, and an audit log that only shows successes hides the signal an incident responder most needs.

append-only-by-construction [accepted] ​

Decision: Provide no mutation path for audit records rather than relying on access control alone.

Rationale: A capability that does not exist cannot be misconfigured. Immutability by construction is stronger than immutability by policy.

How it works ​

Record a resolution attempt (record-resolve) ​

The sidecar reports each attempt to the audit log, successful or denied.

  1. Observe — Sidecar completes a resolve attempt with an outcome.
  2. Send — Sidecar sends the record to the control plane — requester, scope, jti, object id, host, outcome, timestamp.
  3. Record — Control plane appends the record; no plaintext is present in the payload.
  4. Observe — The record is queryable but not modifiable.

Query the audit log (query-audit) ​

An operator or auditor reviews resolution history.

  1. Authenticate — Caller authenticates with auditor or operator credentials.
  2. Send — Query by object, jti, principal, host, outcome, or time range.
  3. Receive — Matching records are returned; values are absent by construction.