-
Notifications
You must be signed in to change notification settings - Fork 507
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
BackendTLSPolicy SANs field marked as extended #3591
base: main
Are you sure you want to change the base?
BackendTLSPolicy SANs field marked as extended #3591
Conversation
Signed-off-by: Mattia Lavacca <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mlavacca 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 |
My understanding is this is required to fully validate a certificate. So it seems rather insecure and defeating most benefits of TLS to not validate this, which doesn't seem great. Am I missing something that makes this not essentially insecureSkipVerify (which, as the name implies, is not secure)? |
Or is it specifically subject alt names that is the issue and CN (deprecated for like 20 years IIRC) is used? |
The problem is the list of In the proxy, the certificate is properly validated against the SANs field; what's missing is the possibility of setting multiple SANs in the proxy configuration to check the certificate against. |
Then can we make support for 1 core and support for more than 1 extended? I think we do that with gateway TLS certs |
I guess using Hostname for that is probably pretty close to that. But might be slightly more flexible to allow 1 |
How would it be more flexible? As you said, I don't see much difference compared to using Hostname for cert validation, except for complicating the interface and the validation. |
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.
SNI is not always the same as the certificate subject
for example it's quite common for a kube-apiserver to have IP SANs - those cannot be the SNI.
Or many other SANS exist like email, uri, etc
or I may go through a proxy routing on SNI but the TLS is terminated by another host
Agreed with all the above, which I honestly think we can consider more advanced use cases. Having just the hostname is not an insecure practice, as it boils down to assuming the certificate SAN to be the same as the SNI. All the valid scenarios you proposed are completely legit, but do they need to be treated as core and mandatory for an implementation? |
Yep I didn't make the full connection with Hostname in my initial comments. I think there's still an argument to be made on what exactly is core or not, but as long as "secure is core" then that works for me |
What type of PR is this?
What this PR does / why we need it:
Given the not triviality of supporting this feature for nginx-based implementations (such as Kong) and the fact that this feature is not mandatory to ensure core functionality in the proxy->backend encrypted communication, we can set the
SANs
field of theBackendTLSPolicy
API as an extended feature./cc @robscott @shaneutt @youngnick @LiorLieberman @candita
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: