-
Notifications
You must be signed in to change notification settings - Fork 8.5k
SSL Proxy: Support PROXY protocol v2. #13861
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
SSL Proxy: Support PROXY protocol v2. #13861
Conversation
✅ Deploy Preview for kubernetes-ingress-nginx ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Welcome @ScheererJ! |
|
Hi @ScheererJ. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
7598339 to
2f232d6
Compare
Gacko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/triage accepted
/kind feature
/priority backlog
/lgtm
/ok-to-test
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Gacko, ScheererJ 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 |
What this PR does / why we need it:
Add support for PROXY protocol v2.
PROXY protocol can be useful to preserve the client IP address when a non-transparent load balancer is used. PROXY protocol v1 is human readable while v2 is binary.
github.com/armon/go-proxyproto supports only PROXY protocol v1. github.com/pires/go-proxyproto supports PROXY protocol v1 & v2. Some load balancers support PROXY protocol v1, e.g. AWS classic load balancer. Others only support PROXY protocol v2, e.g. AWS network load balancer.
If the previous implementation received PROXY protocl v2 it did not detect it and forwarded it as workload data. In conjunction with TLS this lead to a packet including PROXY protocol v2 AND the TLS client hello being forwarded to nginx causing issues (400 Bad Request). With the new library, it is possible to run
ingress-nginxwith ssl passthrough and PROXY protocol enabled in environments using PROXY protocol v2.Types of changes
Which issue/s this PR fixes
fixes #10181
How Has This Been Tested?
ingress-nginxwas deployed into the cluster withuse-proxy-protocol: trueset in the config map and--enable-ssl-passthrough=truebeing added as command line option for the controller.Ingressresource with a corresponding TLS certificate and a corresponding DNS entry:nginx.<my-fancy-domain>viacurland a web browser (onlycurloutput shown below).Before the change:
After the change:
Checklist:
I did not find a hint that only PROXY protocol v1 was supported. Hence, I guess there is no need to document v2 support. Feel free to comment if you have a different point of view.