Expand description
Audit trail of every mutating operation, produced to Kafka.
manta-server is the single chokepoint for every backend call, so it is where auditing lives — the CLI emits nothing. The pieces:
audit_requests— router middleware that turns every mutating/v2/*request (any method except GET/HEAD/OPTIONS) and every console attach into oneevent::AuditEvent, emitted after the response is known. New routes are covered without any per-handler code.AuditNote— extractor through which a handler adds what only it knows: a stableactionname, the targets, the dry-run flag.AuditLog— fans each event out to itsAuditSinks: always atracingline on theAUDIT_TARGETtarget, plus Kafka (kafka::KafkaSink) when[auditor.kafka]is configured.send_auth_audit— the/v2/auth/tokenattempt event.
Auditing is fail-open: a broker outage is logged and never fails or slows the request.
Modules§
Structs§
- Audit
Log - The server’s audit trail: builds events and fans them out to sinks. Cheap to clone.
- Audit
Note - Handler-side handle on the current request’s audit event.
- Auditor
[auditor]section ofserver.toml.
Constants§
- AUDIT_
TARGET tracingtarget of the always-on log copy of every audit event.
Traits§
- Audit
Sink - A destination for audit events.
Functions§
- audit_
requests - Router middleware: emit one
event::AuditEventper audited request once its response is known. Layered outside the request timeout, so timed-out requests are recorded too. Requests that matched no route (404) or no method (405) are not audited — nothing was attempted. - send_
auth_ audit - Emit an
EventKind::AuthAttemptevent for a/v2/auth/tokencall.