Skip to content

audit

Modules

Structs

  • AuditPayload - Lightweight audit payload sent from the pipeline hot path through the channel.

Enums


Struct

Lightweight audit payload sent from the pipeline hot path through the channel.

Contains only the fields extracted from the enforcement decision — no signing, no UUID generation. The EventBuilder on the sink side converts this into a fully populated, signed [ExecutionEvent].

Methods:

  • fn resource(self: &Self) -> &str - Returns the target resource identifier recorded for the action.
  • fn decision(self: &Self) -> &Decision - Returns the enforcement outcome recorded for the action.
  • fn deny_reason(self: &Self) -> &str - Returns the denial reason, empty on outcomes that carry none.
  • fn dispatch_status(self: &Self) -> i32 - Returns the connector HTTP status, zero when the call never dispatched.
  • fn dispatch_latency_us(self: &Self) -> i64 - Returns the connector dispatch latency in microseconds, zero when the
  • fn response_size(self: &Self) -> i64 - Returns the target response body size in bytes, zero when the call

Trait Implementations:

  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • From
    • fn from(msg: &RunAuditMessage) -> Self
  • Clone
    • fn clone(self: &Self) -> AuditPayload

Enum

An error that can occur on an [AuditSink].

Variants:

  • BindFailed(String) - The audit sink failed to bind to the configured address or
  • ServerError(String) - An unrecoverable server error occurred while the audit sink was

Traits: Error

Trait Implementations:

  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • Display
    • fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result

Audit event builder.

Constructs and signs [ExecutionEvent]s from [AuditPayload]s. The builder holds the ECDSA signing key, loaded once at startup, and provides a single [EventBuilder::build] method that maps an [AuditPayload] into a fully populated, signed audit event.

The builder lives on the sink side of the audit channel, keeping ECDSA signing off the enforcement hot path.