Repository navigation
Description
Problem
With auth.send_request: true the proxy tells the auth check four headers, one of them x-forwarded-proto. docs/auth.md says that with client_address: connection the scheme the check is told is the connection's own, because the client is not trusted for it.
Measured on Envoy 1.40.2 with a file that has client_address: connection, no tls and auth.send_request: true: an HTTP/2 request sent over plain HTTP with :scheme: https is served, the service is sent X-Forwarded-Proto: http, and the check is told x-forwarded-proto: https. So a client that reaches the gateway directly writes the scheme the check reads. A check that trusts the scheme, for example to demand TLS for an action or to build a redirect, is told a lie.
The battery now holds that row with Envoy's own literal (conformance/testdata/nginx-connection.yaml, the scenario of the scheme the check is told), and docs/auth.md says it plainly. The nginx output had the same defect for an absolute https target sent over plain HTTP and tells the check the connection's scheme since the pull request of #65.
Two things beside it are not measured:
- HAProxy under
connectionover plain HTTP: no HAProxy entry of the battery runs a plainconnectionfile withauth.send_request, so what its check is told for a request line or an HTTP/2:schemethat nameshttpsis not known. - The Envoy output over TLS tells the check
httpwhen the absolute target or the:schemesayshttp. That is the harmless direction, and the page names it; it goes away with the same correction.
What is asked
- Under
client_address: connection, every target tells the check the connection's own scheme, whatever the client writes in the request line, the HTTP/2:schemeor its ownX-Forwarded-Proto. - A battery row for each of those three ways on a plain
connectionfile and on a TLS one, on every entry that can run the file, HAProxy's included. docs/auth.mdand the support table'sauth.send_requestrows say what is then true, and the section ofdocs/format.mdfor the next release says who must render again: every Envoy file withauth.send_request: trueandclient_address: connection.- Under
forwardednothing changes: there the scheme is the word of whoever is in front, as the page says.
Acceptance
- The rows above pass on every entry, and each was seen failing on the output before the correction.
proxyfile checkreports a file rendered before the correction as different only when it holdsauth.send_request: truewithclient_address: connection.
Consumers
- Every user of the Envoy output whose file holds
auth.send_request: truewithclient_address: connection: the generated configuration changes, so they render again. - The one known user's proxyfile holds no
auth.send_request(grep -c send_requeston it prints 0; the controlgrep -c -E '^\s*ask *='prints 1), so its check is told no scheme and its render does not change. - The conformance battery's rows of the scheme the check is told, which hold Envoy's literal today.
Lane
FULL - it changes what the auth check is told (auth).
Open tickets
Open tickets checked: gh search issues 'scheme check connection' --repo kitecorp/proxyfile --state open printed none, and the repository's open issues are #65 only.
Activity
envoy: under client_address connection the auth check is told the con…
tudor-pop commentedon Nov 21, 2026
Resolution
Pull request #73 merged as master
b971541on 2026-11-21.With
auth.send_request: trueandclient_address: connection, the Envoy output now tells the check the listener's scheme,httpswithtlsandhttpwithout, whatever the client writes. Measured on Envoy 1.40.2 before and after:connection:scheme: httpshttpshttphttptarget, or:scheme: http, over TLShttphttpshttpstarget over plain HTTP403, check not askedThe two things the ticket named as not measured: HAProxy on a plain
connectionfile already tells the check the connection's scheme and answers an absolute target400without asking the check, so its generator did not change; and the harmless direction over TLS is gone with the same correction.The battery holds a row for each way a client writes a scheme (the request line, an HTTP/2
:scheme, its ownX-Forwarded-Proto) on a plain and a TLS file underconnection, on every entry; the Envoy rows were seen failing on the output before the correction. Underforwardednothing changed: a file without the two keys renders byte for byte as before, andproxyfile checkreports as different exactly the files that hold both.docs/auth.mdand theauth.send_requestrows say what is now true, anddocs/format.mdhas the section "After 2.2.0" with who renders again. The change is on master and ships with the next release.