pub struct ServerConfigOptions {
pub trust_domain: TrustDomain,
pub authorize_client: AuthorizeSpiffeId,
}Expand description
Options for building a SPIFFE-aware rustls::ServerConfig.
Fields§
§trust_domain: TrustDomainTrust domain whose bundle is used as the verification root set.
Authorization hook invoked with the client SPIFFE ID.
Returning false rejects the peer even if the certificate chain is valid.
Implementations§
Source§impl ServerConfigOptions
impl ServerConfigOptions
Sourcepub fn allow_any(trust_domain: TrustDomain) -> Self
pub fn allow_any(trust_domain: TrustDomain) -> Self
Creates options that accept any client SPIFFE ID for the given trust domain.
Authentication still happens via bundle verification; only authorization is permissive.
Trait Implementations§
Source§impl Clone for ServerConfigOptions
impl Clone for ServerConfigOptions
Source§fn clone(&self) -> ServerConfigOptions
fn clone(&self) -> ServerConfigOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ServerConfigOptions
impl !RefUnwindSafe for ServerConfigOptions
impl Send for ServerConfigOptions
impl Sync for ServerConfigOptions
impl Unpin for ServerConfigOptions
impl !UnwindSafe for ServerConfigOptions
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Wrap the input message
T in a tonic::Request