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

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

@rikatz
Copy link
Member Author

rikatz commented Oct 2, 2025

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

@rikatz
Copy link
Member Author

rikatz commented Oct 2, 2025

sounds good, commited here! thank you!

@rikatz rikatz requested a review from candita October 9, 2025 12:49
Comment on lines 125 to 126
allowing traffic inspection and routing based on attributes of the inner request
payload.
Copy link
Member

Choose a reason for hiding this comment

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

What are the TLS "attributes of the inner request payload"?

  1. we don't support ECH yet to route based on ClientHelloInner
  2. TLSRoute is restricted to SNI-based routing and doesn't use other TLS metadata that requires decryption
  3. TLSRoute doesn't rout based on the properties of higher-level protocols such as HTTP (as mentioned above)

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, I had the same feeling of it, but I would say right now this should be clarified on the GEP + the routing is decided specifically on SNI.

Do you have a proposal to improve this text?

Copy link
Member

Choose a reason for hiding this comment

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

Added my suggestion.

  1. In both TLS Passthrough and Terminate modes, TLSRoute makes routing decisions by inspecting unencrypted TLS metadata.
  2. I'd reword "use the SNI as the main routing method" to "route based on TLS metadata" so that when we add ALPN we don't need to rework this section again.

A side note: Even when we add ECH support, it won't change this much, as both TLS Passthrough and Terminate modes will have access to ESNI.

the Gateway.

For `TLSRoute`, the use of `Terminate` means that the TLS termination happens on
the `Gateway` and the connection to the backend resumes as an unencrypted connection.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
the `Gateway` and the connection to the backend resumes as an unencrypted connection.
the `Gateway` and the connection to the backend resumes as an unencrypted connection,
unless the connection from the Gateway to the backend is encrypted by some other
mechanism.

I'm specifically thinking of mesh-integrated ingress gateways here, whether Istio's ingress which can initiate mTLS to a backend, or Linkerd deploying a sidecar next to an ingress, and trying to avoid any explicit mention of BackendTLSPolicy. Does this sound okay to you @candita?

Copy link
Contributor

@candita candita Oct 10, 2025

Choose a reason for hiding this comment

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

I think we don't need this section here, it can be removed. We already say this in https://github.com/kubernetes-sigs/gateway-api/pull/4139/files#diff-631650e61708a9c464016c50834d5def9b4967b7daade9fcd5d8c2c175c3e317R120-R126.

If we keep it, the two sections should express consistent views.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok I have removed the session and kept only the phrase

"The use of Terminate on TLSRoute is available on Extended [Support Level]." as we may want to be explicit that Terminate is Extended support level

Comment on lines 123 to 126
without any introspection beyond the TLS metadata. When using a `Terminate`
TLS listener, encryption is terminated at the gateway to "unwrap" the connection,
allowing traffic inspection and routing based on attributes of the inner request
payload.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
without any introspection beyond the TLS metadata. When using a `Terminate`
TLS listener, encryption is terminated at the gateway to "unwrap" the connection,
allowing traffic inspection and routing based on attributes of the inner request
payload.
without any introspection beyond the TLS metadata. When using a `Terminate`
TLS listener, the encryption is terminated at the gateway.

Comment on lines 119 to 126
for where you want to use the SNI as the main routing method, and are not interested
in properties of the higher-level protocols like HTTP. The byte stream of the
connection is proxied without any inspection to the backend.
in properties of the higher-level protocols like HTTP. When using a `Passthrough`
TLS listener, the encrypted byte stream of the connection is proxied directly to
the backend destination (which is then responsible for decrypting the stream)
without any introspection beyond the TLS metadata. When using a `Terminate`
TLS listener, encryption is terminated at the gateway to "unwrap" the connection,
allowing traffic inspection and routing based on attributes of the inner request
payload.
Copy link
Member

@rostislavbobo rostislavbobo Oct 9, 2025

Choose a reason for hiding this comment

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

Suggested change
for where you want to use the SNI as the main routing method, and are not interested
in properties of the higher-level protocols like HTTP. The byte stream of the
connection is proxied without any inspection to the backend.
in properties of the higher-level protocols like HTTP. When using a `Passthrough`
TLS listener, the encrypted byte stream of the connection is proxied directly to
the backend destination (which is then responsible for decrypting the stream)
without any introspection beyond the TLS metadata. When using a `Terminate`
TLS listener, encryption is terminated at the gateway to "unwrap" the connection,
allowing traffic inspection and routing based on attributes of the inner request
payload.
for where you want to route based on TLS metadata, and are not interested in properties
of the higher-level protocols like HTTP. When using a `Passthrough` TLS listener, the
encrypted byte stream of the connection is proxied directly to the destination backend,
which is then responsible for decrypting the stream. When using a `Terminate` TLS
listener, encryption is terminated at the gateway.

Copy link
Contributor

Choose a reason for hiding this comment

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

The "unwrap" metaphor doesn't really add much here. Reminds me of a gift or a sandwich.

Copy link
Member

@rostislavbobo rostislavbobo Oct 10, 2025

Choose a reason for hiding this comment

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

Agree, dropping it makes the sentence clean and clearer without impacting the meaning.
Updated.

Copy link
Member Author

Choose a reason for hiding this comment

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

I will have to copy/paste on my own commit here because Github is being annoying and not allowing me to add it directly

Comment on lines 125 to 126
allowing traffic inspection and routing based on attributes of the inner request
payload.
Copy link
Member

Choose a reason for hiding this comment

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

Added my suggestion.

  1. In both TLS Passthrough and Terminate modes, TLSRoute makes routing decisions by inspecting unencrypted TLS metadata.
  2. I'd reword "use the SNI as the main routing method" to "route based on TLS metadata" so that when we add ALPN we don't need to rework this section again.

A side note: Even when we add ECH support, it won't change this much, as both TLS Passthrough and Terminate modes will have access to ESNI.

@rostislavbobo
Copy link
Member

Thanks @rikatz !

/ok-to-test
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Oct 10, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 10, 2025
@candita
Copy link
Contributor

candita commented Oct 10, 2025

/lgtm
/assign @robscott

@robscott
Copy link
Member

Thanks @rikatz!

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mikemorris, rikatz, robscott, rostislavbobo

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

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 10, 2025
@k8s-ci-robot k8s-ci-robot merged commit 5f1a339 into kubernetes-sigs:main Oct 10, 2025
20 checks passed
tylerauerbeck pushed a commit to tylerauerbeck/gateway-api that referenced this pull request Nov 27, 2025
* Fix inconsistencies on TLSRoute documentation

* Apply suggestions

Co-authored-by: Blake Covarrubias <[email protected]>

* Clarify on TLSRoute termination

* Reword on TLSRoute termination

Co-authored-by: Mike Morris <[email protected]>

* Remove mention to BTLSPolicy on TLSroute

* clarify that TLSRoute termination is extended feature

* Reword how termination happens on TLSRoute

Co-authored-by: Candace Holman <[email protected]>

* Finalize TLSRoute wording

---------

Co-authored-by: Blake Covarrubias <[email protected]>
Co-authored-by: Mike Morris <[email protected]>
Co-authored-by: Candace Holman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/documentation Categorizes issue or PR as related to documentation. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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

7 participants