-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TLS terminated listener + proxy protocol conflict #3188
Comments
I think that There's a comment in the code that says that supporting |
Doesn't ClientTrafficPolicy CRs only affects downstream communication (between load balancer and envoy proxy)? Moreover in my proxy protocol without TLS test I got it working fine (with a gateway-wide ClientTrafficPolicy, I'm waiting for #3163 for a per-listener proxy protocol strategy ; and a BackendTrafficPolicy attached to the TCPRoute). |
The
If I had to guess, then since you didn't configure TLS, probably the server was tolerant enough to ignore the |
#3163 should fix this, BTP support for TCPRoute was recently added ( available.on v0.0.0-latest) |
Thank you for the explanations @liorokman and @arkodg. |
@bhamon rethinking, for your use case (TCP proxying) you dont even need a CTP with |
To follow your idea I've tried different setups. Upstream serviceI've configured my service without proxy protocol support:
I've then configured it with proxy protocol support:
With this baseline I know exactly how my upstream service reacts in all cases. Without TLSI've then configured my load balancer with proxy protocol injection. When I reach my service through the external IP everything works. With TLSI've then configured the gateway listener in TLS mode (my final use-case). In this configuration envoy expects a proper TLS handshake but gets the proxy protocol header packet first from the load balancer. For this use-case to work the proxy protocol header must be read by envoy before TLS handshaking (TCP ClientTrafficPolicy) + re-injected to the upstream stream (TCP BackendTrafficPolicy). I've already confirmed the upstream proxy protocol support with a TCP BackendTrafficPolicy with the actual implementation. So in the end, I'll wait for a proper support of TCP ClientTrafficPolicy (#3163) and replay my tests again. |
closing this one, since its done, feel free to reopen if you are still hitting this issue |
Description:
I want to expose a TCP service behind a load balancer with TLS + proxy protocol support.
I've tested a TLS-only setup first:
I can reach my service through the load balancer external IP with
openssl s_client
.The TLS session is properly terminated by envoy and the raw TCP stream is sent to my upstream service.
I then tested a proxy protocol only setup:
I have set a provider-specific annotation on the envoy service to activate proxy protocol on the load balancer (through an EnvoyProxy CR properly registered with a parametersRef on the gateway class).
I modified my service config to support incoming proxy protocol.
With this setup I can also reach my service (with
netcat
).I then tried a TLS + proxy protocol setup:
And it doesn't work. A call to
openssl s_client
fails:I activated the debug logs of envoy and got the following trace:
It seems like a filter order issue to me:
The proxy protocol header should be read first before TLS handshake.
Environment:
Envoy gateway: 1.0.1
The text was updated successfully, but these errors were encountered: