authority_credentials
Module: authority_credentials
Section titled “Module: authority_credentials”Contents
Section titled “Contents”Structs
RedactedPreSharedKey- Pre-shared key wrapper with redacted debug output.ResolvedSidecarCredentials- Resolved Sidecar credentials ready to attach to Authority requests.RuntimeCredential- The runtime credential of one run: a bearer the Authority issued atSidecarCredentialsConfig- Validated source for Sidecar credentials: one pre-shared key source, or
Enums
CredentialSource- Mutually exclusive credential sources after schema validation.SidecarCredential- How a Sidecar authenticates to the Authority.SidecarCredentialSource- Resolved credential source, kept for startup logging.SidecarCredentialsConfigError- Error validating a [SidecarCredentialsConfig].
firma_sidecar::authority_credentials::CredentialSource
Section titled “firma_sidecar::authority_credentials::CredentialSource”Enum
Mutually exclusive credential sources after schema validation.
Variants:
PreSharedKeyEnv(String)- Environment variable containing a pre-shared key.PreSharedKeyFile(std::path::PathBuf)- File containing a pre-shared key.Runtime{ env: String, run_id: firma_identifiers::RunId }- Runtime bearer environment variable and its validated run.
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::authority_credentials::RedactedPreSharedKey
Section titled “firma_sidecar::authority_credentials::RedactedPreSharedKey”Struct
Pre-shared key wrapper with redacted debug output.
Tuple Struct: ()
Traits: Eq
Trait Implementations:
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Debug
fn fmt(self: &Self, formatter: & mut fmt::Formatter) -> fmt::Result
firma_sidecar::authority_credentials::ResolvedSidecarCredentials
Section titled “firma_sidecar::authority_credentials::ResolvedSidecarCredentials”Struct
Resolved Sidecar credentials ready to attach to Authority requests.
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::authority_credentials::RuntimeCredential
Section titled “firma_sidecar::authority_credentials::RuntimeCredential”Struct
The runtime credential of one run: a bearer the Authority issued at activation, valid while that run is live.
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Clone
fn clone(self: &Self) -> Self
firma_sidecar::authority_credentials::SidecarCredential
Section titled “firma_sidecar::authority_credentials::SidecarCredential”Enum
How a Sidecar authenticates to the Authority.
Variants:
PreSharedKey(ResolvedSidecarCredentials)- An enrolled Sidecar’s pre-shared key, sent in request bodies andRuntime(RuntimeCredential)- One run’s runtime credential, sent as a bearer in the metadata
Methods:
fn run_id(self: &Self) -> Option<&RunId>- The run a runtime credential is scoped to.fn runtime_bearer(self: &Self) -> Option<&str>- The runtime credential itself, for the one holder that hands it tofn body_credentials(self: &Self) -> Option<SidecarCredentials>- The request body field a pre-shared key travels in; a runtimefn authenticated<T>(credentials: Option<&Self>, message: T) -> tonic::Request<T>-messageas the requestcredentialsauthenticates; keyless when
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Clone
fn clone(self: &Self) -> Self
firma_sidecar::authority_credentials::SidecarCredentialSource
Section titled “firma_sidecar::authority_credentials::SidecarCredentialSource”Enum
Resolved credential source, kept for startup logging.
Variants:
Env(String)- PSK was read from an environment variable.File(std::path::PathBuf)- PSK was read from a file.
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::authority_credentials::SidecarCredentialsConfig
Section titled “firma_sidecar::authority_credentials::SidecarCredentialsConfig”Struct
Validated source for Sidecar credentials: one pre-shared key source, or one run’s runtime credential.
Fields:
workspace_id: String- Workspace the Sidecar belongs to.sidecar_id: String- Authority-assigned Sidecar identity.source: CredentialSource- The single validated credential source.
Methods:
fn rebase_defaults(self: & mut Self, config_dir: &Path)- Re-base a relative PSK file path against the config directory.fn resolve(self: &Self) -> Result<SidecarCredential, String>- Resolve the configured source into an in-memory credential.fn runtime_credential_env_name(self: &Self) -> Option<&str>- The variable the runtime credential is read from, in runtime mode.fn uses_runtime_credential(self: &Self) -> bool- Whether this configuration authenticates one run with itsfn runtime_credential(self: &Self, value: &str) -> Result<SidecarCredential, String>- The runtime credentialvalue, scoped to the configured run:
Traits: Eq
Trait Implementations:
- TryFrom
fn try_from(schema: SchemaSidecarCredentials) -> Result<Self, <Self as >::Error>
- 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::authority_credentials::SidecarCredentialsConfigError
Section titled “firma_sidecar::authority_credentials::SidecarCredentialsConfigError”Enum
Error validating a [SidecarCredentialsConfig].
Variants:
EmptyWorkspaceId-workspace_idwas empty.EmptySidecarId-sidecar_idwas empty.MissingCredentialSource- No credential source was set.MultipleCredentialSources- More than one credential source was set.RuntimeCredentialAndRunMismatch-runtime_credential_envandrun_idwere not set together.InvalidRunId- The run was not a canonical run identifier.
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