SidecarConfig
Module: config::SidecarConfig
Section titled “Module: config::SidecarConfig”Contents
Section titled “Contents”Functions
resolve- Validateschemaagainststate, the state directory this process and
firma_sidecar::config::SidecarConfig::resolve
Section titled “firma_sidecar::config::SidecarConfig::resolve”Function
Validate schema against state, the state directory this process and
its children resolve their artifacts from.
This is the only way to build a [SidecarConfig]. Resolution and
validation are one step because they are not independent: the validator
rejects an https:// Authority on this host with no CA certificate, so
an anchor adopted from the state directory has to be in place before the
check runs. Splitting them is what let firma doctor reject
configurations the Sidecar accepts.
What state supplies, for each field the config leaves unset:
| Field | Default |
|---|---|
authority.public_key_path | authority.pub, if present |
authority.ca_cert_paths | [tls/authority-ca.crt], if present and the Authority is on this host |
ca.dir | generated-firma-ca |
audit.file_path | audit.jsonl |
audit.signing_key_path | audit.key |
Each is the path firma config generates, so a config that names
nothing and a scaffolded one drive the same files.
Errors
Section titled “Errors”Returns [SidecarConfigError] when any section fails validation.
fn resolve(schema: firma_config_schema::sidecar::SidecarConfig, state: &firma_runtime_state::RuntimeLayout) -> Result<Self, SidecarConfigError>