You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ioxide: validate client certificates over HTTP/3, and hand them to the request #960
Validate does not run over HTTP/3. On a port that serves HTTP/3 with a certificate validator, the ioxide engine runs ICertificateValidator.Validate on the TCP transports only (TcpDriver.Accepts). An HTTP/3 client is admitted on the chain check and RequireCertificate alone, and the engine warns about it at startup (WarnAboutValidatorGaps in Engine/Ioxide/Infrastructure/Server.Tcp.Tls.cs).
That was because ngtcp2 exposed only the peer's subject and common name. Since ioxide 0.20.392 (MDA2AV/ioxide#389), QuicEngineConnection.PeerCertificateDer carries the verified client certificate in DER - the same value as TlsSession.PeerCertificateDer, which Accepts already validates on TCP. #953 moves the engine to 0.20.396, so it is there to use.
The certificate never reaches the request, on any protocol.TcpDriver validates the peer certificate and then drops it: Http1Driver.RunAsync applies each request with a null certificate, and so does StreamedRequest.Apply for HTTP/2 and HTTP/3. So request.Client.Certificate is always null on this engine, and ClientCertificateAuthentication, which reads it, never sees one. The acceptance tests that would show this (TestClientAuthentication, TestClientAuthenticationSaysNo, TestUserMapping) are inconclusive on ioxide, because their validator names no trust anchors.
Suggestions
Keep the peer certificate per connection - TlsSession.PeerCertificateDer on TCP, QuicEngineConnection.PeerCertificateDer on QUIC - and apply it to every request on that connection, so request.Client.Certificate is set on all three protocols.
In Http3Driver.RunAsync, run the endpoint's validator on that certificate once the handshake has completed, as Accepts does on TCP, and close the connection if it refuses. Then drop the startup warning, and the HTTP/3 caveat in the docs.
Run the three tests above on ioxide too, with an IMutualTlsValidator that names its trust anchors.
Activity