firma-sidecar
firma_sidecar
Section titled “firma_sidecar”Firma Sidecar — the enforcement layer between an agent and the outside world.
Every outbound agent call passes through the Sidecar. It is a single statically-linked binary with no persistent database; all state is in-memory and re-populated from Authority streams on restart.
Architecture
Section titled “Architecture”agent → interceptor → normalizer → Stage 1 → Stage 2 → connector → external- [
interceptor] — Captures outbound agent traffic before it reaches the external system (HTTP proxy, gRPC hook, Unix socket). - [
normalizer] — Intent Normalizer / Envelope Builder. Deterministically maps raw intercepted events into canonicalExecutionEnvelopeinstances with a normalizedintent.action_class. - [
enforcement] — Two-phase enforcement engine:- Stage 1 (Capability Validation): token selection, parse, signature verify, expiry, revocation check.
- Stage 2 (Constraint Enforcement Engine / CEE): scope check, policy bundle freshness, Cedar policy evaluation.
- [
pipeline] — Orchestrates normalizer + both enforcement stages into a singleenforce()entry point. This is the primary public API; all types needed to construct and inspect the pipeline are re-exported from here. - [
audit] — Audit event emitter. Produces a signed event for every enforcement decision. Supports stdout, file, gRPC, and WAL output sinks. - [
startup] — Per-subsystem builders that translate [config::SidecarConfig] into runtime components.
Modules
Section titled “Modules”13 modules
1 enum, 1 trait, 2 modules, 2 structs
1 enum, 1 struct
1 struct
1 struct
1 struct
1 struct
1 function, 2 structs, 6 modules
1 struct
1 function
1 trait, 2 structs
3 structs
1 struct
1 struct
10 structs, 2 enums
1 enum, 1 struct
1 struct
2 structs
2 structs
6 structs
1 struct
1 module
1 enum, 3 structs
1 struct
1 enum, 1 module, 1 struct, 1 trait
1 struct
1 struct
2 structs
9 modules
2 structs
2 structs
1 enum, 1 struct
1 struct, 1 trait
4 enums
1 enum
1 enum, 2 structs
2 structs
1 struct
1 trait, 2 structs
2 structs, 5 enums, 5 functions
1 struct
1 enum, 1 trait, 3 modules
1 struct
1 struct
1 struct
3 modules
1 struct
3 enums, 6 structs
1 struct, 1 trait, 4 enums
3 structs
1 enum, 2 structs
1 function, 2 structs
10 modules
2 functions
1 function
3 functions
1 function
1 function
1 function, 1 struct
1 function
1 struct, 4 functions
1 function, 1 struct
1 function, 1 struct