pub struct FederatedTrustBundleManager { /* private fields */ }Expand description
Manages federated trust bundles across trust domains.
Supports SPIFFE bundle endpoint federation (SPIFFE Trust Domain and Bundle spec).
Implementations§
Source§impl FederatedTrustBundleManager
impl FederatedTrustBundleManager
Sourcepub fn new(local_domain: impl Into<String>) -> Self
pub fn new(local_domain: impl Into<String>) -> Self
Create a new federated bundle manager for the given local trust domain.
Sourcepub fn local_domain(&self) -> &str
pub fn local_domain(&self) -> &str
Local trust domain name.
Sourcepub async fn add_federation_endpoint(
&self,
trust_domain: &str,
endpoint_url: &str,
)
pub async fn add_federation_endpoint( &self, trust_domain: &str, endpoint_url: &str, )
Register a bundle fetch endpoint for a remote trust domain.
Sourcepub async fn store_bundle(&self, bundle: FederatedBundle)
pub async fn store_bundle(&self, bundle: FederatedBundle)
Store a federated trust bundle.
Sourcepub async fn get_bundle(&self, trust_domain: &str) -> Option<FederatedBundle>
pub async fn get_bundle(&self, trust_domain: &str) -> Option<FederatedBundle>
Get a federated bundle for a trust domain.
Sourcepub async fn get_endpoint(&self, trust_domain: &str) -> Option<String>
pub async fn get_endpoint(&self, trust_domain: &str) -> Option<String>
Get the federation endpoint URL for a trust domain.
Sourcepub async fn federated_domains(&self) -> Vec<String>
pub async fn federated_domains(&self) -> Vec<String>
List all federated trust domains.
Sourcepub async fn is_federated_id_trusted(&self, id: &SpiffeId) -> bool
pub async fn is_federated_id_trusted(&self, id: &SpiffeId) -> bool
Check if a SPIFFE ID from a remote domain is trusted (bundle exists).
Sourcepub async fn remove_bundle(&self, trust_domain: &str) -> bool
pub async fn remove_bundle(&self, trust_domain: &str) -> bool
Remove a federated bundle.
Sourcepub async fn cleanup_stale(&self, max_age: Duration)
pub async fn cleanup_stale(&self, max_age: Duration)
Remove stale federated bundles older than the given duration.
Sourcepub async fn bundle_count(&self) -> usize
pub async fn bundle_count(&self) -> usize
Count of stored federated bundles.
Auto Trait Implementations§
impl Freeze for FederatedTrustBundleManager
impl !RefUnwindSafe for FederatedTrustBundleManager
impl Send for FederatedTrustBundleManager
impl Sync for FederatedTrustBundleManager
impl Unpin for FederatedTrustBundleManager
impl UnsafeUnpin for FederatedTrustBundleManager
impl !UnwindSafe for FederatedTrustBundleManager
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more