Support SNI preread module and routing of TCP traffic with TransportServer #5544
Replies: 3 comments 6 replies
-
We will need to use the This allows us to extract the information from the We would need a flag/toggle of some sort to enable A simple example of how to configure this in NGINX: not terminating and doing TLS passthrough:
terminating TLS and passing to upstream:
I can do some mockups for the |
Beta Was this translation helpful? Give feedback.
-
Can we use |
Beta Was this translation helpful? Give feedback.
-
As I think about this from a resource design perspective I envision something a bit different from the VS/VSR pattern, and nearly its inverse. A TransportServer resource would link to the listener (following the listener enhancements that have been in the works). Thoughts? |
Beta Was this translation helpful? Give feedback.
-
SNI based routing of Layer 4 traffic is a way to support customers using DNS names for TCP traffic and support routing based on the SNI header.
With NGINX this is implemented using the stream ssl pre-read module.
https://nginx.org/en/docs/stream/ngx_stream_ssl_preread_module.html
This module is already present in the NGINX Plus binary.
Today, this is possible with heavy use of snippets. The ask is to make this present and first class with the TransportServer resource.
This also historically described here:
https://stackoverflow.com/questions/34741571/nginx-tcp-forwarding-based-on-hostname
There are some additional considerations that need to be included here:
This is conceptually no different than the suggestion to make the VS/VSR relationship easier to implement like Ingress master/minion but with some level of security controls like Gateway API ReferenceGrant.
The overall concept is multiple upstream targets for TCP behind a single listener and to route based on SNI.
This would support both TLS Passthrough as well as advanced programmability that might require TLS decryption and re-encryption.
To bring this all together:
this would be available in the TransportServer or possible with a TransportServerRoute 'attaching' to a TransportServer
This is the same relationship pattern with think about with Ingress master/minion or with VirtualServer/VirtualServerRoute
TLS traffic in -> TransportServer matches TLD of hostheader -> TransportServerRoute matches server.TLD of host header and defines upstream.
Beta Was this translation helpful? Give feedback.
All reactions