-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix(server): Add extKeyUsage to self-signed cert #2274
Conversation
MacOS 10.15 Catalina has additional requirements for self-signed certs: https://support.apple.com/en-us/HT210176 Chrome (and, I assume, Safari) will not let you clickthrough the "invalid cert" warning (error is NET::ERR_CERT_INVALID) if the ExtendedKeyUsage extension is not present with at least the id-kp-serverAuth OID.
|
Codecov Report
@@ Coverage Diff @@
## master #2274 +/- ##
=======================================
Coverage 93.92% 93.92%
=======================================
Files 34 34
Lines 1284 1284
Branches 369 369
=======================================
Hits 1206 1206
Misses 71 71
Partials 7 7
Continue to review full report at Codecov.
|
@tarrall hm, so with this PR, it is allow to clickthrough the |
That is correct; apparently clickthrough not allowed with I should be able to get some screenshots tomorrow AM (USA time). |
@tarrall Do you have |
Before and after screenshots attached -- courtesy of a teammate. Re reporting upstream... I considered it, but I think the upstream modules are functioning as intended. You're using the The cert isn't outright a "bad cert"; it just doesn't include all the stuff that MacOS 10.15 demands of a cert used for a website. The forge example includes these extensions. (I skipped "emailProtection" in this PR because I can't think of any case where the self-signed cert we're creating would be used for that purpose.) Before: After: |
@tarrall thanks for feedback, we can merge this PR for better development experience, but we should ivnestigate why cert doesn't work on MacOS 10.15 Catalina. Maybe you can do it and help us? |
MacOS 10.15 Catalina has additional requirements for self-signed While Apple does not say in that doc exactly why they did it, I think "improved security" is the general goal; they are ensuring that only certificates which explicitly say they're intended to be used for server authentication. Per https://tools.ietf.org/html/rfc5280#page-44 clients are allowed to require specific extensions:
Since the certificate you are generating is for server authentication, you should always include that extension. |
@evilebottnawi what about merging this hotfix? we cant run development with https on updated MACos ;(
|
Same here. Really looking forward for this hotfix
|
@tarrall can you fix lint problem (need run prettier on file) |
OK I think the one failing lint that's left is from the commit message... in theory should pass if run again? Not positive, not sure how to test that locally and can't find anything in the repo that defines the required spec for commit messages. Please feel free to reword that commit message if necessary! |
@tarrall don't worry we fix it before merge |
In the meantime I found out you can visit the local webpage in safari but not in chrome. So until this fix is released you can at least get the dev environment running in safari. |
Yeah let me just fire up Safari on my linux laptop... Thanks for fucking all chromium based browsers. Luckily 3.8.2 still works. |
@k1sul1 what is problem? |
This does break Chrome on Linux, unfortunately. See my discussion and investigation in #2313 (comment). |
For issue #2273
For Bugs and Features; did you add new tests?
Sorry, I did not. I am not sure if the codebase has tests to ensure that the generated cert works on MacOS?
I did manually test to confirm the new cert works on both MacOS 10.14 and MacOS 10.15; it should not impact users on other platforms.
Motivation / Use-Case
Self-signed cert does not work on MacOS 10.15 Catalina.
Breaking Changes
None.
Additional Info
MacOS 10.15 Catalina has additional requirements for self-signed
certs: https://support.apple.com/en-us/HT210176
Chrome (and, I assume, Safari) will not let you clickthrough the
"invalid cert" warning (error is NET::ERR_CERT_INVALID) if the
ExtendedKeyUsage extension is not present with at least the
id-kp-serverAuth OID.
Firefox does not seem to be affected; I think they may have their
own SSL stack.