docs: refresh TLS defaults, TLS 1.3 cipher suites, and post-quantum key exchange documentation#44944
docs: refresh TLS defaults, TLS 1.3 cipher suites, and post-quantum key exchange documentation#44944Copilot wants to merge 4 commits into
Conversation
…e documentation Agent-Logs-Url: https://github.com/envoyproxy/envoy/sessions/6541830a-305b-4a29-bd95-8dc0fba57ff2 Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
| // | ||
| // .. note:: | ||
| // | ||
| // **TLS 1.3 cipher suites are not configurable via this field.** When TLS 1.3 is negotiated, |
There was a problem hiding this comment.
It says this on the previous line of docs. I don't think it needs to be stated twice in a row.
| // .. warning:: | ||
| // | ||
| // **Post-quantum hybrid key exchange is not enabled by default.** Envoy passes the curve list | ||
| // explicitly to BoringSSL via ``SSL_CTX_set1_curves_list``, which **overrides** BoringSSL's |
There was a problem hiding this comment.
I think we should change the default going forward, to try to make it secure-by-default. But I don't think we should backport that behavior change; although backporting some of these doc changes to 1.38 would be useful.
| // .. warning:: | ||
| // | ||
| // **Post-quantum hybrid key exchange is not enabled by default.** Envoy passes the curve list | ||
| // explicitly to BoringSSL via ``SSL_CTX_set1_curves_list``, which **overrides** BoringSSL's |
There was a problem hiding this comment.
Referencing boringssl API functions in the user facing docs isn't the appropriate level of detail for this audience. It doesn't matter why it's not enabled by default; just give an example of how to configure it so it's enabled.
| groups, so Envoy is **capable** of negotiating post-quantum hybrid key exchange. | ||
|
|
||
| However, Envoy always passes an explicit group list to BoringSSL via | ||
| ``SSL_CTX_set1_curves_list``. This **overrides** BoringSSL's built-in default group list (which |
There was a problem hiding this comment.
Don't reference API functions, or tell why.
Agent-Logs-Url: https://github.com/envoyproxy/envoy/sessions/ab804083-6b35-478f-93f8-472bc5d36594 Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Agent-Logs-Url: https://github.com/envoyproxy/envoy/sessions/ab804083-6b35-478f-93f8-472bc5d36594 Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
| The following summarizes Envoy's out-of-the-box TLS configuration for non-FIPS builds. FIPS builds | ||
| may differ; see :ref:`arch_overview_ssl_fips`. | ||
|
|
||
| **Default TLS protocol versions** |
| to discern if a TLS connection used a post quantum safe key exchange (e.g. X25519MLKEM768). | ||
|
|
||
| - area: docs | ||
| change: | |
| // .. code-block:: yaml | ||
| // | ||
| // ecdh_curves: | ||
| // - X25519MLKEM768 |
|
|
||
| // [#protodoc-title: Common TLS configuration] | ||
|
|
||
| // .. note:: |
|
|
||
| TLS 1.2 cipher suites are configured via the | ||
| :ref:`cipher_suites <envoy_v3_api_field_extensions.transport_sockets.tls.v3.TlsParameters.cipher_suites>` | ||
| field. See that field's documentation for the authoritative default list and FIPS variants. |
There was a problem hiding this comment.
this seems disjointed with one defined there and other here
| .. code-block:: yaml | ||
|
|
||
| ecdh_curves: | ||
| - X25519MLKEM768 |
Envoy's TLS documentation was silent on TLS 1.3 cipher suite handling and contained no mention of post-quantum hybrid key exchange, including a non-obvious footgun: because Envoy always calls
SSL_CTX_set1_curves_listwith an explicit list (defaultX25519:P-256), BoringSSL's built-in default group list — which includesX25519MLKEM768— is overridden, so PQ hybrid is effectively opt-in, not automatic.Changes
api/envoy/extensions/transport_sockets/tls/v3/common.protocipher_suites: added note that TLS 1.3 suites (TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256) are not configurable via this field; BoringSSL selects them.ecdh_curves: added warning explaining the PQ opt-in footgun, with a recommended snippet for users who want PQ hybrid:%DOWNSTREAM_TLS_GROUP%/%UPSTREAM_TLS_GROUP%can confirm whether PQ was negotiated.api/envoy/api/v2/auth/common.proto: added a note on the frozen v2TlsParametersmessage that its defaults are stale and pointing readers to the v3 message.docs/root/intro/arch_overview/security/ssl.rst: added two new labelled sections:arch_overview_ssl_tls_defaults— table of default min/max TLS versions per role, TLS 1.2 and 1.3 cipher suite summary, default ECDH groups.arch_overview_ssl_pq_key_exchange— explainsX25519MLKEM768support, the opt-in requirement, and how to observe negotiated groups via access log formatters.changelogs/current.yaml: addeddocsarea entry.No runtime defaults are changed.
Original prompt
Background
The user-facing documentation for Envoy's default TLS cipher suites, TLS protocol versions, and ECDH groups is out-of-date and incomplete. Specifically, post-quantum (PQ) hybrid key exchange (e.g.
X25519MLKEM768) is not documented anywhere user-visible, and the existing proto comments only describe TLS 1.0–1.2 cipher suite defaults without explaining how TLS 1.3 cipher suites are handled. There is also a real footgun around the default value ofecdh_curvesthat should be called out.This PR refreshes the documentation. It does not change runtime defaults. Any change to default behavior (e.g. adding
X25519MLKEM768toDEFAULT_CURVES) is a separate security-policy decision and is out of scope here.Findings from investigation
api/envoy/extensions/transport_sockets/tls/v3/common.proto—TlsParameters.cipher_suitesfield comment (L80–L141) only documents TLS 1.0–1.2 defaults. It does not mention:TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256).TlsParameters.ecdh_curvesin the same file — documented default isX25519:P-256(non-FIPS) /P-256(FIPS). This matches the constantsClientContextConfigImpl::DEFAULT_CURVES/ServerContextConfigImpl::DEFAULT_CURVESinsource/common/tls/context_config_impl.ccandsource/common/tls/server_context_config_impl.cc. However:source/common/tls/context_impl.ccalways callsSSL_CTX_set1_curves_list(ctx, config.ecdhCurves().c_str())(around the line that callsSSL_CTX_set1_curves_list). Because Envoy always passes an explicit list (the defaultX25519:P-256), this overrides BoringSSL's built-in default group list (which would includeX25519MLKEM768). The practical consequence: an Envoy non-FIPS build does not negotiateX25519MLKEM768by default — users must explicitly configureecdh_curvesto opt in. This is a footgun and must be documented.X25519MLKEM768:X25519:P-256).Legacy v2 API
api/envoy/api/v2/auth/common.protohas stale defaults that include CBC suites (AES128-SHA,AES256-GCM-SHA384, etc.) which do not match the actual code defaults today. Since v2 is frozen, just add a note pointing readers to the v3 message.No central doc page in
docs/root/summarises Envoy's TLS protocol/cipher/group defaults. The existing TLS arch overview atdocs/root/intro/arch_overview/security/ssl.rstdoes not cover this. A short subsection there would help users find authoritative info quickly.PQ-related infrastructure already exists in the repo and confirms PQ is a supported (though opt-in) capability:
compat/openssl/source/SSL_get_curve_name.ccand the BoringSSL macro exposure incompat/openssl/patch/include/openssl/ssl.h.shreference bothSSL_GROUP_X25519_MLKEM768andSSL_GROUP_X25519_KYBER768_DRAFT00.changelogs/current.yamlhas atlsentry adding%DOWNSTREAM_TLS_GROUP%/%UPSTREAM_TLS_GROUP%substitution commands "to discern if a TLS connection used a post quantum safe key exchange (e.g. X25519MLKEM768)".test/config/integration/certs/pqc_*.What this PR should do
1. Update
api/envoy/extensions/transport_sockets/tls/v3/common.protoIn the
TlsParameters.cipher_suitesfield comment:DEFAULT_CIPHER_SUITES/DEFAULT_CIPHER_SUITES_FIPSinsource/common/tls/context_config_impl.ccandsource/common/tls/server_context_config_impl.cc.TLS_AES_128_GCM_SHA256TLS_AES_256_GCM_SHA384TLS_CHACHA20_POLY1305_SHA256In the
TlsParameters.ecdh_curvesfield comment:X25519:P-256non-FIPS,P-256FIPS).SSL_CTX_set1_curves_list, which overrides BoringSSL's built-in default group list. As a re...This pull request was created from Copilot chat.