Crate spiffe_rustls

Crate spiffe_rustls 

Source
Expand description

rustls integration for SPIFFE X509Source (SPIRE Workload API).

This crate builds rustls::ClientConfig and rustls::ServerConfig that use an always-up-to-date spiffe::X509Source for:

  • the local X.509 SVID (certificate + private key)
  • the trust bundle for peer verification (by trust domain)

Peer authorization is performed using a user-provided callback over the peer SPIFFE ID (URI SAN, e.g. spiffe://example.org/myservice).

See examples/mtls_tcp_client and examples/mtls_tcp_server for complete runnable examples.

Structs§

ClientConfigBuilder
Builds a rustls::ClientConfig backed by an spiffe::X509Source.
ClientConfigOptions
Options for building a SPIFFE-aware rustls::ClientConfig.
ServerConfigBuilder
Builds a rustls::ServerConfig backed by an spiffe::X509Source.
ServerConfigOptions
Options for building a SPIFFE-aware rustls::ServerConfig.

Enums§

Error
Errors returned by spiffe-rustls.

Functions§

authorize_any
Returns an authorization hook that accepts any SPIFFE ID.
authorize_exact
Returns an authorization hook that only accepts the given SPIFFE IDs.

Type Aliases§

AuthorizeSpiffeId
Authorization hook for peer SPIFFE IDs.
Result
Result type used by this crate.