#[non_exhaustive]pub enum Error {
Show 17 variants
NoSvid,
SourceClosed,
NoBundle(TrustDomain),
TrustDomainNotAllowed(TrustDomain),
AuthorizerConfig(AuthorizerConfigError),
CertifiedKey(String),
CertParse(String),
MissingSpiffeId,
MultipleSpiffeIds,
UnauthorizedSpiffeId(SpiffeId),
VerifierBuilder(String),
Rustls(Error),
Source(X509SourceError),
Internal(String),
NoTokioRuntime,
EmptyRootStore,
NoUsableRootStores,
}Expand description
Errors returned by spiffe-rustls.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoSvid
The X509Source currently has no SVID.
SourceClosed
The X509Source is closed or cancelled.
NoBundle(TrustDomain)
The X509Source currently has no bundle for the requested trust domain.
TrustDomainNotAllowed(TrustDomain)
The trust domain is not allowed by the trust domain policy.
AuthorizerConfig(AuthorizerConfigError)
Failed to construct an authorizer due to invalid configuration.
CertifiedKey(String)
Failed to create a rustls::sign::CertifiedKey from SVID material.
CertParse(String)
Failed to parse a peer certificate.
MissingSpiffeId
The peer certificate is missing a SPIFFE ID URI SAN.
MultipleSpiffeIds
The peer certificate has multiple SPIFFE ID URI SANs (invalid).
The peer SPIFFE ID was rejected by the authorization hook.
VerifierBuilder(String)
Failed to build a rustls verifier.
Rustls(Error)
A rustls error occurred.
Source(X509SourceError)
An error from the underlying X509Source.
Internal(String)
Internal error.
NoTokioRuntime
Tokio runtime is required but not available in the current context.
EmptyRootStore
No root certificates were accepted into a root certificate store.
This occurs when building a root certificate store from a trust bundle and none of the provided certificates are valid or accepted by rustls.
NoUsableRootStores
No usable root certificate stores could be built from any trust domain bundle.
This occurs when build_material iterates through all trust domain bundles
in the bundle set and fails to build a valid root certificate store for any of them.
This is distinct from EmptyRootStore, which indicates a failure for a single
trust domain bundle.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<X509SourceError> for Error
impl From<X509SourceError> for Error
Source§fn from(source: X509SourceError) -> Self
fn from(source: X509SourceError) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request