Skip to content

firma_audit_schema (root module)

Structs

  • ExecutionEvent - One signed execution event in the OpenFirma audit log.

Enums

  • Decision - Enforcement outcome recorded in an [ExecutionEvent].

Enum

Enforcement outcome recorded in an [ExecutionEvent].

The numeric representation matches the firma.v1.EnforcementDecision protocol enum. Passthrough requests are represented as [Self::Allow] with an empty [ExecutionEvent::token_id].

Variants:

  • Allow - Request passed enforcement and was dispatched.
  • Deny - Request was denied before dispatch.
  • Abort - Critical failure aborted the request.
  • Modify - A transformed version of the request was dispatched.
  • StepUp - The request was blocked pending human approval.
  • Defer - The request was blocked and deferred for retry.

Traits: Copy, Eq

Trait Implementations:

  • PartialEq
    • fn eq(self: &Self, other: &Decision) -> bool
  • Deserialize
    • fn deserialize<D>(deserializer: D) -> ::core::result::Result<Self, <D as >::Error>
  • Ord
    • fn cmp(self: &Self, other: &Decision) -> $crate::cmp::Ordering
  • Clone
    • fn clone(self: &Self) -> Decision
  • Serialize
    • fn serialize<S>(self: &Self, serializer: S) -> ::core::result::Result<<S as >::Ok, <S as >::Error>
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • PartialOrd
    • fn partial_cmp(self: &Self, other: &Decision) -> $crate::option::Option<$crate::cmp::Ordering>

Struct

One signed execution event in the OpenFirma audit log.

Each JSON-lines audit record is the serialization of this structure. String fields remain strings, including identifier-shaped fields, because empty strings have defined wire meaning for passthrough and pre-dispatch events.

Fields:

  • event_id: String - Unique aevt TypeID backed by UUID v7 (time-ordered).
  • session_id: String - Session that produced this event.
  • token_id: String - Capability token ID evaluated during enforcement.
  • agent_id: String - Agent that initiated the action.
  • action: String - Canonical action class from the normalizer (for example, http_get).
  • resource: String - Target resource identifier (for example, a URL or table name).
  • decision: Decision - Enforcement outcome.
  • deny_reason: String - Human-readable reason when the decision carries one.
  • enforcement_latency_us: i64 - Wall-clock time spent in the enforcement pipeline, in microseconds.
  • context_hash: String - Integrity hash of the Cedar context used during evaluation.
  • bundle_version: String - Policy bundle version active at decision time.
  • timestamp: Option<u128> - Event timestamp as nanoseconds since the Unix epoch.
  • dispatch_status: i32 - HTTP status returned by the connector, or zero if no call dispatched.
  • dispatch_latency_us: i64 - Connector dispatch latency in microseconds, or zero if not dispatched.
  • response_size: i64 - Target response body size in bytes, or zero if no body was received.
  • sandbox_id: String - Per-run sandbox identity, or an empty string outside firma run.
  • provenance: String - Tamper-evident provenance chain anchor for admitted actions.
  • thread_id: String - Server-derived conversation thread identity.
  • parent_action_id: String - Provenance anchor of the preceding admitted action in the thread.
  • signature: Vec<u8> - DER-encoded ECDSA signature over all preceding fields.

Traits: Eq

Trait Implementations:

  • PartialEq
    • fn eq(self: &Self, other: &ExecutionEvent) -> bool
  • Deserialize
    • fn deserialize<__D>(__deserializer: __D) -> _serde::__private228::Result<Self, <__D as >::Error>
  • Clone
    • fn clone(self: &Self) -> ExecutionEvent
  • Serialize
    • fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result