pub struct ServerConfigBuilder { /* private fields */ }Expand description
Builds a rustls::ServerConfig backed by an spiffe::X509Source.
The resulting config:
- presents the current SVID as the server certificate
- requires and verifies client certificates (mTLS) using the trust domain bundle
- authorizes the client by SPIFFE ID (URI SAN)
New handshakes use the latest SVID/bundle material after rotations.
Implementations§
Source§impl ServerConfigBuilder
impl ServerConfigBuilder
Sourcepub fn new(source: Arc<X509Source>, opts: ServerConfigOptions) -> Self
pub fn new(source: Arc<X509Source>, opts: ServerConfigOptions) -> Self
Creates a new builder from an X509Source and options.
Sourcepub async fn build(self) -> Result<ServerConfig>
pub async fn build(self) -> Result<ServerConfig>
Builds the rustls::ServerConfig.
Auto Trait Implementations§
impl Freeze for ServerConfigBuilder
impl !RefUnwindSafe for ServerConfigBuilder
impl Send for ServerConfigBuilder
impl Sync for ServerConfigBuilder
impl Unpin for ServerConfigBuilder
impl !UnwindSafe for ServerConfigBuilder
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> 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