Module audit

Module audit 

Source
Expand description

Audit trail helpers: build and send structured JSON messages to Kafka.

Audit emission is opt-in via the [auditor.kafka] section of server.toml; when absent, super::super::ServerState::auditor is None and send_auth_audit becomes a no-op. Failures inside send_auth_audit log a warning and never bubble up, so an unreachable Kafka broker cannot abort the outer auth flow.

Structs§

Auditor
Wraps a Kafka instance for sending audit messages.

Traits§

Audit
Trait for producing audit messages to a message broker.

Functions§

send_auth_audit
Send a structured audit event for an /api/v1/auth/token attempt.