-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fixes #5379 - Better handling for wrong SNI. #5398
Conversation
Now returning 400 when SNI does not match any certificate and SecureRequestCustomizer.sniHostCheck=true. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
@sbordet lots of CI failures? |
@gregw yes the problem is when you have a KeyStore that has only 1 certificate. I think we can "force" SNI if there is only one certificate (but we always need to wrap), or we drop this change. |
So if we drop it, is there a way with a single certificate to force the an SNI check is done on the host header? |
Reworked the SNI logic. Added support for IP addresses in the SAN extension of certificates in the X509 class. Fixed keystores to have CN=localhost and SAN with ip=127.0.0.1 and ip=[::1]. Fixed tests that were not using the correct Host header. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
@gregw I updated the PR after discussion with @joakime as follows.
So the 2 properties above are equivalent, the second just allows for a nicer error to users.
Before the However, is it ok to have WDYT? |
@sbordet sounds good. |
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
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.
Wow that was bigger than expected!
Now returning 400 when SNI does not match any certificate
and SecureRequestCustomizer.sniHostCheck=true.
Signed-off-by: Simone Bordet simone.bordet@gmail.com