Module auth_cn

Module auth_cn 

Source
Expand description

mTLS peer-cert extraction; injects chain as a per-request extension.

FOOTGUN: axum-server 0.7 does not expose peer certificates publicly. The MtlsAcceptor wrapper reads them post-handshake from the rustls TlsStream and injects via per-connection tower::Service. Don’t remove without a replacement - the chain is otherwise unreachable.

Structs§

MtlsAcceptor
PeerCertService
PeerCertificates
Empty when no client cert was presented.

Functions§

cn_matches_path_machine_id
403 if leaf CN doesn’t match {id}; no-op when extension is absent or empty.