]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DOC: config: clarify req.ssl_sni
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 10 Aug 2026 11:20:56 +0000 (11:20 +0000)
committerWilliam Lallemand <wlallemand@haproxy.com>
Mon, 10 Aug 2026 11:24:21 +0000 (13:24 +0200)
commit0974583fe37f9ebe6a2826bced91dc1f81aa9bab
tree227dc3f2a9cd9767283808b217c3704f2bcc1261
parentffd262eed88eae9a7723529ae3cd073cd9ac4063
DOC: config: clarify req.ssl_sni

The req.ssl_sni fetch (as well as all other req.ssl_* fetches, which
share the same underlying parsing) only analyzes the first ClientHello
message found in the request buffer.

This is not obvious to users, and can lead to incorrect assumptions
when the value is used for routing or access control decisions:

  - if the client sends a second ClientHello within the same TCP
    stream, for instance following a TLS 1.3 HelloRetryRequest, or
    during a TLS renegotiation, that second ClientHello (and its SNI)
    is silently ignored.

  - when Encrypted Client Hello (ECH) is used, only the "Outer"
    ClientHello is visible on the wire, so the SNI returned is a decoy
    SNI and not the actual host the client intends to reach. The
    "Inner" ClientHello, which carries the real SNI, is encrypted and
    cannot be analyzed by this fetch.

Document these limitations on req.ssl_sni, and add a short pointer to
that documentation on the other req.ssl_* fetches (req.ssl_alpn,
req.ssl_cipherlist, req.ssl_ec_ext, req.ssl_hello_type,
req.ssl_keyshare_groups, req.ssl_sigalgs, req.ssl_st_ext,
req.ssl_supported_groups, req.ssl_ver).

This was reported by Daniel Birtwhistle.

This should be backported to all stable versions.
doc/configuration.txt