-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Add option to strictly enforce SNI #7698
Comments
@rittneje: This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The 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/test-infra repository. |
@theunrealgeek , you may find this informative |
@longwuyuan thanks for bringing this up. This is a common problem with a multi-homing nginx setup and some extra config is needed to enforce things correctly. Let me take this up as well |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
Currently ingress-nginx only partially enforces SNI. When a TLS connection is established, it uses the SNI from the ClientHello to determine which certificate to send back, as per the configuration of the earliest applicable Ingress resource.
However, it does not enforce that the SNI from the ClientHello match the Host header included in the actual HTTP requests, and it is the Host header that determines which Ingress these requests will be routed through. This leads to a confusing situation where an ingress-nginx deployment that is supporting multiple hostnames with separate Ingresses will allow a client to handshake with the wrong hostname, as long as the Host header is correct.
A similar issue arises with configuring the default SSL certificate. For the Ingress resource to contain details about the TLS certificate to present is really a design flaw in Kubernetes, so it would be a lot nicer to just configure the certificate once via
--default-ssl-certificate
. However, in addition to the aforementioned Host header issue, this also allows the client to specify no SNI at all and still get the right certificate, which is undesirable for us.In particular, the main issue here is by allowing the client to do bad things, it can lock us into using ingress-nginx forever (due to the need for backwards compatibility), even if a more suitable ingress service comes along in the future.
/kind feature
The text was updated successfully, but these errors were encountered: