Skip to content

Under client_address: connection, the Envoy output tells the auth check https for an HTTP/2 request sent over plain HTTP with :scheme https #70

Closed

Description

@tudor-pop

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 connection over plain HTTP: no HAProxy entry of the battery runs a plain connection file with auth.send_request, so what its check is told for a request line or an HTTP/2 :scheme that names https is not known.
  • The Envoy output over TLS tells the check http when the absolute target or the :scheme says http. 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 :scheme or its own X-Forwarded-Proto.
  • A battery row for each of those three ways on a plain connection file and on a TLS one, on every entry that can run the file, HAProxy's included.
  • docs/auth.md and the support table's auth.send_request rows say what is then true, and the section of docs/format.md for the next release says who must render again: every Envoy file with auth.send_request: true and client_address: connection.
  • Under forwarded nothing 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 check reports a file rendered before the correction as different only when it holds auth.send_request: true with client_address: connection.

Consumers

  • Every user of the Envoy output whose file holds auth.send_request: true with client_address: connection: the generated configuration changes, so they render again.
  • The one known user's proxyfile holds no auth.send_request (grep -c send_request on it prints 0; the control grep -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

  1. added
    bug
    on Nov 20, 2026
  2. tudor-pop commented on Nov 21, 2026

    @tudor-pop
    ContributorAuthor

    Resolution

    Pull request #73 merged as master b971541 on 2026-11-21.

    With auth.send_request: true and client_address: connection, the Envoy output now tells the check the listener's scheme, https with tls and http without, whatever the client writes. Measured on Envoy 1.40.2 before and after:

    Request under connection Before Now
    HTTP/2 over plain HTTP with :scheme: https told https told http
    An absolute http target, or :scheme: http, over TLS told http told https
    An absolute https target over plain HTTP 403, check not asked the same

    The two things the ticket named as not measured: HAProxy on a plain connection file already tells the check the connection's scheme and answers an absolute target 400 without 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 own X-Forwarded-Proto) on a plain and a TLS file under connection, on every entry; the Envoy rows were seen failing on the output before the correction. Under forwarded nothing changed: a file without the two keys renders byte for byte as before, and proxyfile check reports as different exactly the files that hold both.

    docs/auth.md and the auth.send_request rows say what is now true, and docs/format.md has the section "After 2.2.0" with who renders again. The change is on master and ships with the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions