backend
Module: backend
Section titled “Module: backend”Contents
Section titled “Contents”Modules
platform- Host-platform probes used by sandbox backend selection and preflight checks.
Structs
EnforcementProof- Network enforcement proof returned by backend.LaunchSpec- Launch payload for wrapped command.PrepareRequest- Request payload for backend prepare stage.SandboxHandle- Handle produced by backend prepare stage.SandboxMount- A mount carried by a prepared sandbox together with its security authority.
Enums
BackendKind- Supported runtime backend choices.NetworkConfinement- Identifies the OS-level mechanism that provides network confinement.
Traits
SandboxBackend- Backend interface for sandbox runtime implementations.
firma_run::backend::BackendKind
Section titled “firma_run::backend::BackendKind”Enum
Supported runtime backend choices.
Variants:
BwrapVzWsl2Firecracker
Traits: Copy, Eq
Trait Implementations:
- Clone
fn clone(self: &Self) -> BackendKind
- Display
fn fmt(self: &Self, f: & mut fmt::Formatter) -> fmt::Result
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Deserialize
fn deserialize<__D>(__deserializer: __D) -> _serde::__private228::Result<Self, <__D as >::Error>
- PartialEq
fn eq(self: &Self, other: &BackendKind) -> bool
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>
firma_run::backend::EnforcementProof
Section titled “firma_run::backend::EnforcementProof”Struct
Network enforcement proof returned by backend.
Fields:
backend: BackendKindstructural: boolfail_closed: booldetail: Stringnetwork_confinement: NetworkConfinement- OS primitive that enforces the network boundary, if any.
Trait Implementations:
- Clone
fn clone(self: &Self) -> EnforcementProof
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_run::backend::LaunchSpec
Section titled “firma_run::backend::LaunchSpec”Struct
Launch payload for wrapped command.
Trait Implementations:
- Clone
fn clone(self: &Self) -> LaunchSpec
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_run::backend::NetworkConfinement
Section titled “firma_run::backend::NetworkConfinement”Enum
Identifies the OS-level mechanism that provides network confinement.
Used in [EnforcementProof] so operators and audit systems can
distinguish structurally equivalent guarantees achieved by different
primitives.
Variants:
LinuxNetworkNamespace- Linux unprivileged network namespace (bwrap --unshare-net).MacosSandboxNetworkDeny- macOSTrustedBSDMAC sandbox withdeny network-outboundpolicy.MacosVzGuest- Apple Virtualization.framework guest with isolated virtio networking.KvmMicroVm- KVM micro-VM (Firecracker). Planned as enterprise additive path.ProxyOnly- Proxy-only compatibility mode: enforcement depends onHTTP_PROXY
Traits: Eq
Trait Implementations:
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>
- Clone
fn clone(self: &Self) -> NetworkConfinement
- Deserialize
fn deserialize<__D>(__deserializer: __D) -> _serde::__private228::Result<Self, <__D as >::Error>
- PartialEq
fn eq(self: &Self, other: &NetworkConfinement) -> bool
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_run::backend::PrepareRequest
Section titled “firma_run::backend::PrepareRequest”Struct
Request payload for backend prepare stage.
Fields:
identity: crate::identity::RunIdentityprofile: crate::config::ResolvedProfileworking_dir: std::path::PathBuf
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Clone
fn clone(self: &Self) -> PrepareRequest
firma_run::backend::SandboxBackend
Section titled “firma_run::backend::SandboxBackend”Trait
Backend interface for sandbox runtime implementations.
Methods:
kind: Returns the concrete backend kind.prepare: Prepare host/sandbox state before launching an agent.enforce_network: Install structural network routing and return proof metadata.verify_fail_closed: Verify fail-closed invariants after network policy application.start_agent: Launch the wrapped command inside the prepared sandbox.teardown: Tear down backend runtime state after execution.
firma_run::backend::SandboxHandle
Section titled “firma_run::backend::SandboxHandle”Struct
Handle produced by backend prepare stage.
Fields:
backend: BackendKindruntime_dir: std::path::PathBufidentity: crate::identity::RunIdentitymounts: Vec<SandboxMount>- Prepared mounts, retaining their security authority until a backendnetwork_policy: crate::config::NetworkPolicy
Trait Implementations:
- Clone
fn clone(self: &Self) -> SandboxHandle
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_run::backend::SandboxMount
Section titled “firma_run::backend::SandboxMount”Struct
A mount carried by a prepared sandbox together with its security authority.
Operator-provided mounts and framework mounts cannot expose control-plane state. Sandbox-infrastructure mounts are the narrow class allowed to originate in the private per-sandbox runtime.
Traits: Eq
Trait Implementations:
- Clone
fn clone(self: &Self) -> SandboxMount
- PartialEq
fn eq(self: &Self, other: &SandboxMount) -> bool
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
Module: platform
Section titled “Module: platform”Host-platform probes used by sandbox backend selection and preflight checks.
All probes are read-only and side-effect-free. On non-Linux targets the functions return safe “not applicable” values so callers don’t need per-platform gating.