-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Test client authentication, add https-mtls server #16923
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
Conversation
Analysis of PR #16923 at de80d163: Test 417 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 65 different CI jobs (the link just goes to one of them). Test 2088 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 83 different CI jobs (the link just goes to one of them). Test 1194 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Test 2202 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Generated by Testclutch |
It seems test 417 fails because when stunnel has the CAfile, it sends it in the chain to the client, which is not required. This means test 417 gets two certificates which the test doesn't expect. |
baf858d
to
f9f243e
Compare
SIZE_MAX is an very overkill size for certificates or keys, lower it to 100KiB for both certificate and keys. The default max size of openssl is 100KiB for the entire chain [1], and it seems firefox fails at ~60kb [2]. Found by curl#16923 [0] https://docs.openssl.org/3.2/man3/SSL_CTX_set_max_cert_list/#notes [2] https://0x00.cl/blog/2024/exploring-tls-certs/
Well this seems to have already found a failure in rustls, opened #16951 |
SIZE_MAX is an very overkill size for certificates or keys, lower it to 100KiB for both certificate and keys. The default max size of openssl is 100KiB for the entire chain [1], and it seems firefox fails at ~60kb [2]. Found by curl#16923 [0] https://docs.openssl.org/3.2/man3/SSL_CTX_set_max_cert_list/#notes [2] https://0x00.cl/blog/2024/exploring-tls-certs/
SIZE_MAX is an very overkill size for certificates or keys, lower it to 100KiB for both certificate and keys. The default max size of openssl is 100KiB for the entire chain [1], and it seems firefox fails at ~60kb [2]. Found by curl#16923 [0] https://docs.openssl.org/3.2/man3/SSL_CTX_set_max_cert_list/#notes [2] https://0x00.cl/blog/2024/exploring-tls-certs/
SIZE_MAX is an very overkill size for certificates or keys, lower it to 100KiB for both certificate and keys. The default max size of openssl is 100KiB for the entire chain [1], and it seems firefox fails at ~60kb [2]. Found by #16923 [0] https://docs.openssl.org/3.2/man3/SSL_CTX_set_max_cert_list/#notes [2] https://0x00.cl/blog/2024/exploring-tls-certs/ Closes #16951
f9f243e
to
5bac069
Compare
It wasn't used, and didn't do anything since the folder it got didn't have files with names of the hash of the subjects. [1] [1] https://www.stunnel.org/static/stunnel.html#CApath-CA_DIRECTORY
This adds a new certificate to generate which has the clientAuth key usage enabled, and uses it to connect to a https-mtls server.
5bac069
to
880322b
Compare
- test2088 verifies that mutual tls works This adds a new certificate to generate which has the clientAuth key usage enabled, and uses it to connect to a https-mtls server. Closes #16923
Thanks! |
It wasn't used, and didn't do anything since the folder it got didn't have files with names of the hash of the subjects. [1] [1] https://www.stunnel.org/static/stunnel.html#CApath-CA_DIRECTORY Closes curl#16923
- test2088 verifies that mutual tls works This adds a new certificate to generate which has the clientAuth key usage enabled, and uses it to connect to a https-mtls server. Closes curl#16923
In order to test using mutual TLS (mtls), this adds a new server type,
https-mtls
, which turns on theverifyChain
in stunnel, which forces client to authenticate using a certificate signed by the CA specified byCAfile
.Also generate a client certificate to use when authenticating.
In addition, this removes the
CApath
config since it requires CA files being named with the hash of the subject [1], which isn't done here (if I understand correctly it didn't even point to the certs/ directory).[1] https://www.stunnel.org/static/stunnel.html#CApath-CA_DIRECTORY
Refs #16804 #16686