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§
- Reconnect
Config - Reconnect/backoff configuration.
- X509
Source - Live source of X.509 SVIDs and bundles from the SPIFFE Workload API.
- X509
Source Builder - Builder for
X509Source.
Enums§
- X509
Source Error - Errors returned by
X509Source.
Traits§
- Svid
Picker - Strategy for selecting an X.509 SVID when multiple SVIDs are available.