Skip to content

mediator

Functions


firma_run::mediator::enforce_local_command_governance

Section titled “firma_run::mediator::enforce_local_command_governance”

Function

Enforces a mandatory pre-execution Sidecar local-exec governance decision in fail-closed mode.

For hitl_mode = "async_token" this function blocks — sleeping between retries — until the sidecar returns allow or deny, or until hitl_max_wait_ms is exceeded (fail-closed). The operator approves the pending token out-of-band via firma token approve <token-id>.

Returns [RunError::Governance] when the local-exec governance endpoint denies, is unavailable, times out, or returns invalid/unsupported data.

fn enforce_local_command_governance(mediator: &crate::config::CommandMediatorConfig, identity: &crate::identity::RunIdentity, executable: &str, args: &[String]) -> Result<(), crate::error::RunError>