Add cert that passes SSL checks#1366
Conversation
I'm not sure I have the full context, but in case it might help: the idea might be to filter out misdirected requests. It's indeed not strictly necessary if you don't mind any and all requests, with any and all |
|
Since this PR changes code, I think we should merge into I'm also going to add this PR to the project just to keep track of it in the lead-up to releasing v2025.3. |
|
@yanokwa, it'd be great if this PR could be merged in the next week in order to go out with the v2025.3 release. I see that you tagged @alxndrsn for review, but I bet @brontolosone or Sadiq could review as well. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@yanokwa are you sure the SSL Labs failure relates to the SSL cert changed in this test? "Internal Server Error" suggests this is more likely a problem with SSL Labs code. In addition, you can see that the cert served at https://production.getodk.cloud already has Viewed in Firefox:
The changes in this PR relate to the cert served when an unrelated domain is requested from a Central nginx instance, e.g.: |
|
A couple of similar-looking issues:
The linked report (https://www.ssllabs.com/ssltest/analyze.html?d=production.getodk.cloud) says similar to
|
|
Looking at the verbose output of the SSL Labs API: $ docker run --read-only --cap-drop all --rm jumanjiman/ssllabs-scan:latest -verbosity trace https://production.getodk.cloud
...
{"host":"https://production.getodk.cloud","port":443,"protocol":"http","isPublic":false,"status":"READY","startTime":1760441154576,"testTime":1760441162930,"engineVersion":"2.4.1","criteriaVersion":"2009q","cacheExpiryTime":1760441762930,"endpoints":[{"ipAddress":"35.163.56.100","serverName":"ec2-35-163-56-100.us-west-2.compute.amazonaws.com","statusMessage":"Internal Server Error","statusDetails":"TESTING_PROTO_3_3_NO_SNI","statusDetailsMessage":"Testing TLS 1.2 without SNI","duration":8129,"delegation":1,"details":{"hostStartTime":1760441154576,"certChains":[],"protocols":[],"prefixDelegation":false,"nonPrefixDelegation":true,"zeroRTTEnabled":-1,"zombiePoodle":0,"goldenDoodle":0,"zeroLengthPaddingOracle":0,"sleepingPoodle":0}}],"certs":[]}It looks like the failure may be while "Testing TLS 1.2 without SNI". This makes some sense that it might relate to the "wrong host" certificate. I think you can demonstrate the difference between with/without SNI by comparing the output of these two commands: From Checking without the Is HTTPS usage without SNI worth supporting? |
I don't know, but I don't think so? |
|
@alxndrsn, would you mind taking another look at this PR once you get the chance? It'd be ideal to get this merged within the next couple of days if possible. |
48a5936 to
07b51f8
Compare
The test for SSLLabs implodes if a Common Name is not set for the cert served for incorrect domains. See: https://www.ssllabs.com/ssltest/analyze.html?d=production.getodk.cloud This is a test for the change made in getodk#1366
I think this is now answered in the main PR message:
|
The test for SSLLabs implodes if a Common Name is not set for the cert served for incorrect domains. This is a test for the change made in #1366. See: https://www.ssllabs.com/ssltest/analyze.html?d=production.getodk.cloud&clearCache=on

Currently, Central fails SSL Labs' test with
People (including us) refer to this test to show that our configs are secure. The problem seems to be that the dummy cert we use is too dumb.
What has been done to verify that this works as intended?
ChatGPT told me we need X.509 v3, a subjectAltName and be reasonably valid to work with SSL scanners, so I made those changes and confirmed that everything works.
The lack of SNI means we don't support these old browsers: Android 2.3.7, IE 6 / XP, IE 8 / XP, Java 6u45.
Why is this the best possible solution? Were any other approaches considered?
We could get rid of the dummy block that was added at #814 and make the real vhost the default. Not 100% sure why that was strictly necessary to begin with.
We could also add do something like this...
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
It doesn't
Does this change require updates to documentation? If so, please file an issue here and include the link below.
No.
Before submitting this PR, please make sure you have:
nextbranch OR only changed documentation/infrastructure (masteris stable and used in production)