authority
Module: config::authority
Section titled “Module: config::authority”Contents
Section titled “Contents”Structs
AuthorityConfig- Validated tuning for background Authority stream clients.AuthorityEndpoint- A validated Authority destination.
Enums
AuthorityConfigError- Error validating an [AuthorityConfig].AuthorityEndpointError- Error constructing an [AuthorityEndpoint].AuthorityTrust- What the Authority’s TLS certificate is verified against.AuthorityTrustError-[sidecar.authority]names no usable trust source.PlatformRoots- Whether the platform’s trusted roots may verify the Authority when no CA
Functions
default_authority_ca- The default CA for an Authority aturlthat names none.
firma_sidecar::config::authority::AuthorityConfig
Section titled “firma_sidecar::config::authority::AuthorityConfig”Struct
Validated tuning for background Authority stream clients.
Fields:
url: String- Authority gRPC URL (e.g.https://127.0.0.1:9443).connect_addr: Option<std::net::SocketAddr>- Optional physical TCP destination for the Authority connection.
Methods:
fn uses_runtime_credential(self: &Self) -> bool- Whether this Sidecar serves one run, authenticated by its
Trait Implementations:
- TryFrom
fn try_from(s: SchemaAuthorityConfig) -> Result<Self, <Self as >::Error>
- Clone
fn clone(self: &Self) -> Self
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_sidecar::config::authority::AuthorityConfigError
Section titled “firma_sidecar::config::authority::AuthorityConfigError”Enum
Error validating an [AuthorityConfig].
Variants:
MissingUrl- No Authority endpoint was selected.AgentId(firma_identifiers::AgentIdParseError)-agent_idwas not a validTypeID.MaxBackoffLessThanMin- The maximum reconnect backoff was below the minimum.EmptyPublicKeyPath-public_key_pathwas set but empty.Trust(AuthorityTrustError)- The trust source is unusable.TlsClientPairMismatch- Exactly one of the mTLS client cert/key pair was set.EmptyTlsClientCertPath-tls_client_cert_pathwas set but empty.EmptyTlsClientKeyPath-tls_client_key_pathwas set but empty.Credentials(crate::authority_credentials::SidecarCredentialsConfigError)- The nested credentials were invalid.
Trait Implementations:
- From
fn from(source: SidecarCredentialsConfigError) -> Self
- Display
fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- From
fn from(source: AgentIdParseError) -> Self
- From
fn from(source: AuthorityTrustError) -> Self
- Error
fn source(self: &Self) -> ::core::option::Option<&dyn ::thiserror::__private21::Error>
firma_sidecar::config::authority::AuthorityEndpoint
Section titled “firma_sidecar::config::authority::AuthorityEndpoint”Struct
A validated Authority destination.
The URI is the logical HTTP and TLS origin. The optional socket address is only the physical TCP route and does not change HTTP authority or TLS server-name verification.
Methods:
fn new(url: &str, connect_addr: Option<SocketAddr>) -> Result<Self, AuthorityEndpointError>- Validate and construct an Authority endpoint.fn has_origin_of(self: &Self, uri: &Uri) -> bool- Return whetherurinames the same origin as the Authority: scheme,
Traits: Eq
Trait Implementations:
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_sidecar::config::authority::AuthorityEndpointError
Section titled “firma_sidecar::config::authority::AuthorityEndpointError”Enum
Error constructing an [AuthorityEndpoint].
Variants:
EmptyUrl- The configured URL is empty.InvalidUrl(String)- The configured URL is not a valid URI.MissingScheme- The configured URL has no scheme.MissingHost- The configured URL has no host.UnsupportedScheme(String)- The configured URL does not use HTTP or HTTPS.ZeroPhysicalPort- The physical route uses port zero.UnspecifiedPhysicalIp- The physical route uses an unspecified IP address.
Traits: Error, Eq
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Display
fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
firma_sidecar::config::authority::AuthorityTrust
Section titled “firma_sidecar::config::authority::AuthorityTrust”Enum
What the Authority’s TLS certificate is verified against.
Exactly one source: a configured CA list is never combined with the
platform’s roots, so a private CA pins the Authority. Resolved once from
[sidecar.authority] and shared by the Sidecar’s Authority channel, its
Authority-origin audit client and firma run’s capability mint.
Variants:
CustomCas(Vec<std::path::PathBuf>)- Only these CA certificates, inca_cert_pathsorder; never empty.PlatformStore- The platform’s trusted roots (SSL_CERT_FILEandSSL_CERT_DIR
Methods:
fn resolve(ca_cert_paths: Vec<PathBuf>, platform_roots: PlatformRoots) -> Result<Self, AuthorityTrustError>- Resolve the trust source from the configured CAs and the platform-rootfn ca_cert_paths(self: &Self) -> &[PathBuf]- The configured CA certificate paths; empty for the platform store.fn rebased<impl FnMut(&Path) -> PathBuf>(self: Self, rebase: impl Trait) -> Self- The same trust with every CA path passed throughrebase, for a
Traits: Eq
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
firma_sidecar::config::authority::AuthorityTrustError
Section titled “firma_sidecar::config::authority::AuthorityTrustError”Enum
[sidecar.authority] names no usable trust source.
Variants:
EmptyCaCertPath- An entry ofca_cert_pathswas blank.NoTrustAnchors- The platform’s roots were disabled with no CA named.
Traits: Eq, Copy, Error
Trait Implementations:
- Display
fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Clone
fn clone(self: &Self) -> Self
firma_sidecar::config::authority::PlatformRoots
Section titled “firma_sidecar::config::authority::PlatformRoots”Enum
Whether the platform’s trusted roots may verify the Authority when no CA
is named: authority.disable_platform_roots, read once.
Variants:
Allowed- The platform’s roots verify the Authority when no CA is named.Disabled- The platform’s roots never verify the Authority.
Methods:
fn from_disable_flag(disable_platform_roots: bool) -> Self- Readauthority.disable_platform_roots.
Traits: Copy, Eq
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Clone
fn clone(self: &Self) -> Self
- Default
fn default() -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
firma_sidecar::config::authority::default_authority_ca
Section titled “firma_sidecar::config::authority::default_authority_ca”Function
The default CA for an Authority at url that names none.
It is the state directory’s Authority CA, only when that Authority runs on this host and the file exists. An unset URL names no remote Authority; an unusable one is not treated as local.
An https Authority on another host leaves the file unused and is logged,
since a deployment that issued that Authority’s certificate from this CA
now has to name it in ca_cert_paths.
fn default_authority_ca(url: Option<&str>, connect_addr: Option<std::net::SocketAddr>, state: &firma_runtime_state::RuntimeLayout) -> Option<std::path::PathBuf>