Module x509_source

Module x509_source 

Source
Expand description

Live X.509 SVID and bundle source backed by the SPIFFE Workload API.

X509Source performs an initial sync before becoming usable, then watches the Workload API for rotations. Transient failures are handled by reconnecting with exponential backoff.

Use X509Source::updated to subscribe to change notifications, and X509Source::shutdown to stop background tasks.

§Example

use spiffe::{BundleSource, TrustDomain, X509Source};

let source = X509Source::new().await?;

let svid = source.svid()?;
let td = TrustDomain::new("example.org")?;
let bundle = source
    .get_bundle_for_trust_domain(&td)?
    .ok_or("missing bundle")?;

Structs§

ReconnectConfig
Reconnect/backoff configuration.
X509Source
Live source of X.509 SVIDs and bundles from the SPIFFE Workload API.
X509SourceBuilder
Builder for X509Source.

Enums§

X509SourceError
Errors returned by X509Source.

Traits§

SvidPicker
Strategy for selecting an X.509 SVID when multiple SVIDs are available.