pub struct SpiffeTrustManager { /* private fields */ }Expand description
SPIFFE Trust Manager: maintains trust bundles and validates SVIDs.
Implementations§
Source§impl SpiffeTrustManager
impl SpiffeTrustManager
pub fn new() -> Self
Sourcepub async fn add_trust_bundle(
&self,
trust_domain: &str,
ca_certs_der: Vec<Vec<u8>>,
)
pub async fn add_trust_bundle( &self, trust_domain: &str, ca_certs_der: Vec<Vec<u8>>, )
Register a trust bundle for a trust domain.
Sourcepub async fn has_trust_bundle(&self, trust_domain: &str) -> bool
pub async fn has_trust_bundle(&self, trust_domain: &str) -> bool
Check if a trust bundle exists for the given domain.
Sourcepub async fn get_trust_bundle(&self, trust_domain: &str) -> Option<Vec<Vec<u8>>>
pub async fn get_trust_bundle(&self, trust_domain: &str) -> Option<Vec<Vec<u8>>>
Get the trust bundle for a domain.
Sourcepub async fn remove_trust_bundle(&self, trust_domain: &str) -> bool
pub async fn remove_trust_bundle(&self, trust_domain: &str) -> bool
Remove a trust bundle.
Sourcepub async fn add_policy(&self, policy: SpiffeAuthzPolicy)
pub async fn add_policy(&self, policy: SpiffeAuthzPolicy)
Add an authorization policy.
Check if a workload-to-workload call is authorized.
Sourcepub async fn verify_jwt_svid(
&self,
token: &str,
expected_audience: &str,
) -> Result<ValidatedJwtSvid>
pub async fn verify_jwt_svid( &self, token: &str, expected_audience: &str, ) -> Result<ValidatedJwtSvid>
Validate a JWT-SVID and check that its trust domain is in our bundles.
Sourcepub async fn trust_domains(&self) -> Vec<String>
pub async fn trust_domains(&self) -> Vec<String>
List all registered trust domains.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpiffeTrustManager
impl !RefUnwindSafe for SpiffeTrustManager
impl Send for SpiffeTrustManager
impl Sync for SpiffeTrustManager
impl Unpin for SpiffeTrustManager
impl UnsafeUnpin for SpiffeTrustManager
impl !UnwindSafe for SpiffeTrustManager
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