quic: present configured client certificates on upstream connections#45980
Open
bpalermo wants to merge 1 commit into
Open
quic: present configured client certificates on upstream connections#45980bpalermo wants to merge 1 commit into
bpalermo wants to merge 1 commit into
Conversation
The client certificates configured in a cluster's upstream TLS context were silently not sent over HTTP/3: they are loaded into the Envoy ClientContextImpl but were never installed on the QUICHE client SSL context, so upstream QUIC servers requesting a client certificate got none. The certificate chain and private key are now installed on the QUICHE SSL context (via SSL_CTX_set_chain_and_key, since QUICHE uses the CRYPTO_BUFFER-based SSL method) when the crypto config is created or refreshed. Client certificates using a private key provider are not supported over QUIC and are skipped with a warning. Guarded by envoy.reloadable_features.quic_upstream_client_certificates (default true) since this changes the wire behavior of existing accepted configurations. Signed-off-by: Bruno Palermo <b@palermo.dev>
|
Hi @bpalermo, welcome and thank you for your contribution. We will try to review your Pull Request as quickly as possible. In the meantime, please take a look at the contribution guidelines if you have not done so already. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message
quic: present configured client certificates on upstream connections
Additional Description
Part 2 of re-introducing QUIC client certificate authentication (#23809, supersedes part of the
stale #40017). Part 1 is #45978 (QUIC connection info peer certificate population).
Client certificates configured in a cluster's upstream TLS context
(
QuicUpstreamTransport.upstream_tls_context.common_tls_context.tls_certificates) were silentlynot sent over HTTP/3: they are loaded into the Envoy
ClientContextImplbut were never installedon the QUICHE client SSL context, so upstream QUIC servers requesting a client certificate got
none.
QuicClientTransportSocketFactory::getCryptoConfig()now installs the certificate chain andprivate key on the QUICHE SSL context when the crypto config is created or refreshed (SDS
rotation included). QUICHE's SSL context uses the CRYPTO_BUFFER-based method, so the chain is
installed via
SSL_CTX_set_chain_and_keyrather than the X509-based APIs. Client certificatesusing a private key provider are not supported over QUIC and are skipped with a warning (the raw
private key is not accessible in that case), matching the existing rejection of the TLS
certificate selector on QUIC.
Risk Level
Low-medium — changes wire behavior of already-accepted configurations (certificates previously
silently omitted are now presented), therefore runtime-guarded.
Testing
Unit tests: client certificate installed on the QUICHE SSL context when configured (using a real
ClientContextImpl), not installed when absent, and not installed with the runtime guarddisabled.
Docs Changes
N/A
Release Notes
Added a bug-fix changelog fragment describing the change and the runtime guard.
Runtime Guard
envoy.reloadable_features.quic_upstream_client_certificates(default true). Setting it tofalserestores the previous behavior of not presenting client certificates over QUIC.