Skip to content

Conversation

rikatz
Copy link
Member

@rikatz rikatz commented Oct 1, 2025

What type of PR is this?
/kind documentation

What this PR does / why we need it:
TLSRoute documentation has some inconsistencies between what is supported, and how it is supported. This PR fixes these inconsistencies on the documentation.

Which issue(s) this PR fixes:
Fixes #1474

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/documentation Categorizes issue or PR as related to documentation. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 1, 2025
@rikatz
Copy link
Member Author

rikatz commented Oct 1, 2025

/cc @mikemorris

Co-authored-by: Blake Covarrubias <blake.covarrubias@gmail.com>
|HTTPRoute| Layer 7 | Anything in the HTTP Protocol | Terminated only | HTTP and HTTPS Routing|
|TLSRoute| Somewhere between layer 4 and 7| SNI or other TLS properties| Passthrough or Terminated | Routing of TLS protocols including HTTPS where inspection of the HTTP stream is not required.|
|TCPRoute| Layer 4| destination port | Passthrough or Terminated | Allows for forwarding of a TCP stream from the Listener to the Backends |
|TCPRoute| Layer 4| destination port | Terminated | Allows for forwarding of a TCP stream from the Listener to the Backends |
Copy link
Contributor

@mikemorris mikemorris Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is correct and in alignment with the current docs for https://gateway-api.sigs.k8s.io/reference/spec/#tlsmodetype and clarifications in https://gateway-api.sigs.k8s.io/geps/gep-2907/#6-configure-tls-mode.

I believe TCPRoute can still be attached to a listener omitting any TLS configuration, which can be an alternative means of opaque passthrough for TLS connections (the gateway has no understanding that the TCP connection it's proxying may be TLS) where routing based on hostname is not needed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry Mike, your point here is that we should keep the Passthrough, or that this change is fine?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no need to support TCPRoute with mode: Passthrough. When a TCPRoute is used, the GW Listener should use protocol: TCP.

  • A TCP Listener passes TLS traffic through by default, mode: Passthrough is unnecessary.
  • mode: Passthrough is only needed when you need to match TLS-specific metadata (e.g. using TLSRoute) without offloading the TLS.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rikatz Change is good as is.

Copy link
Contributor

@mikemorris mikemorris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM aside from a minor nit about backend connections from the Gateway after TLS termination not necessarily being unencrypted.

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mikemorris, rikatz
Once this PR has been reviewed and has the lgtm label, please assign robscott for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rikatz
Copy link
Member Author

rikatz commented Oct 2, 2025

Thanks @mikemorris , I have fixed/tried to reword, let me know if this works

Co-authored-by: Mike Morris <mikemorris@users.noreply.github.com>
@rikatz
Copy link
Member Author

rikatz commented Oct 2, 2025

sounds good, commited here! thank you!

Comment on lines +53 to +54
`BackendTLSPolicy` can be used in this case to re-encrypt the connection using different
set of certificate authorities, SNI and other configurations.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BackendTLSPolicy doesn't cover TLSRoutes at this point in time. I think we'd need to discuss an addition to the enhancement.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think an update to BackendTLSPolicy may be helpful to clarify this, but the intent with this phrasing is just being explicit about where TLSRoute encryption stops:

  • in Passthrough mode, TLSRoute is encrypted from the client all the way to the workload (and remains as a non-goal/out-of-scope/undefined for BackendTLSPolicy)
  • in Terminate mde, TLSRoute is encrypted from the client to the gateway, and how traffic is passed from the gateway to the backend workload is an implementation detail.

BackendTLSRoute was just mentioned as an example of how the gateway to workload traffic would not necessarily be unencrypted (some mesh-integrated gateways have alternative means of encrypting traffic from an ingress to backend workload), not imply any sort of interoperability or support, and it should be fine to rephrase or remove this mention if it's introducing unnecessary confusion.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, maybe we can remove any mention to BackendTLSPolicy right now, and once the TLSRoute is defined we can extend BackendTLSPolicy GEP to support TLSRoute when terminating

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, we should remove the BackendTLSPolicy for now.

For TLSRoutes, the focus should be on the client-to-gateway connection. The gateway-to-backend connection is a separate concern and is out-of-scope for TLSRoutes, as its configuration can vary based on specific needs.

For example, even with end-to-end client-to-backend TLS (aka TLS Passthrough), a mesh deployment might still choose to re-encrypt internal traffic (see diagram below). TLSRoutes have little to none impact on gateway-to-backend connections.

proxy chaining

Comment on lines +126 to +128
payload. In this latter case, the gateway may be configured to re-encrypt
the traffic before sending it on to the backend, such as when a
`BackendTLSPolicy` has been applied to the destination.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/documentation Categorizes issue or PR as related to documentation. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TLS support docs inconsistencies
6 participants