-
Notifications
You must be signed in to change notification settings - Fork 107
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
macOS Sierra no longer trusts the puma-dev certificate #84
Comments
I encountered the same issue, I also tried uninstalling and regenerating the certificates but still had errors. A dirty workaround is to open the url with Safari, then selecting |
@gbonfant I tried that same method, but I found that it eventually goes back to not trusting it again. |
I fixed this issue by opening Keychain Access and moving the |
@joshmanders good find! This trick worked for me: went from having to bypass the security once every 5 minutes to not being asked at all (granted, it's only been an hour, but...) |
It only worked for an hour for you? I've been going fine since doing it few hours ago. |
I mean it was working, and stayed working for at least an hour, but then I had to stop coding... |
The Keychain on macOS has been renamed, which could be the cause of this problem. |
Currently puma-dev uses a hardcoded I think we should try to use the security add-trusted-cert -k $(security login-keychain) ~/Library/Application\ Support/io.puma.dev/cert.pem I'll try to find the time and submit a patch, assuming @evanphx agrees with my approach. |
This commit adds conditional logic to determine which keychain file `security` should add puma-dev’s certificate to. On OS X, the keychain file was named `login.keychain` and macOS Sierra changed to `login.keychain-db`. Fixes puma#84
Thanks! The original version from @attilagyorffy didn't quite work for me, but this one did:
|
@danrabinowitz can i ask what did you get after having run my command mentioned above? |
Sure. :-)
I decided to try (based only on a guess) using just the filename without the full path, and it worked. |
@danrabinowitz This is just a bare guess but your login keychain might be screwed. You see, the
in my case, I'm getting the following:
I also wonder whether you would be willing to give me a little more help with cases like yours so that I could make the PR more robust, or at least improve it to provide better output to help people. @evanphx What are your thoughts? |
I'm happy to help, @attilagyorffy. (I'm visiting family for the next couple of days, so I'll be less responsive than usual.) On my computer, I get the following:
I copied the keychain from my old MacBook Pro, which is why the middle entry is there. But I don't think that matters. Here is the output of the command you use in your code:
I tried just including that directly, and it failed. But when I used the filename only (login.keychain-db) it worked. |
Any chance the version with this patch could be released @evanphx? We ended up building the latest dev version in hopes of solving this issue. |
I just want to mention the Chrome error code The Keychain Access approached solved my issue on Chrome and Safari. Thanks. Firefox is still having issue, showing |
I am also getting an SSL issue with Ruby HTTP libraries, while Chrome is now fine after the keychain manipulation. |
@ecielam I suspect your Ruby installation is probably using the OpenSSL library from Homebrew, not the one that came with your system and has the keychain hooks. This means that you are going to need to make your OpenSSL aware of the puma-dev certificates. To do this, you need to invoke the two commands:
@evanphx I wonder, should we improve puma-dev by invoking these commands these during install? (given that the openssl install is in place of course) |
@attilagyorffy @danrabinowitz I completely uninstalled puma-dev and re-installed the latest released version, and I still got that Chrome warning. Running Line 41 in 085e195
But I'm still getting that big red warning in Chrome. On my side, removing the I'm unsure if EDIT Found a Radar explaining the issue: https://openradar.appspot.com/29271915 So I think we should either use the solution I found (drop the |
I believe the problem is also because of domain security policies, and that the .dev domain is configured to have HTST enabled by default, because the domain extension is owned by google |
@koenpunt I'm using the .dev domain extension as well and we've been using puma-dev without https for a while, we just switched today to https in dev 😄 |
Thanks for the heads up, @allaire. If I remember correctly (the PR was done a long time ago) the The |
@attilagyorffy I don't think I'm an exception, and it looks like it's broken on High Sierra according to the Radar (my Macbook was clean install couple weeks ago). Can you try on your side to completely uninstall puma-dev, uninstall certificates and re-install and see if you still get the chrome error? |
@allaire Sure thing. I'll find some time to do today and report back. |
Just updated to latest Chrome (Version 63.0.3239.84) on High Sierra and ran into the same issue. Again. Suggested solution from @joshmanders works
But there is one more step required. Right-click on the Cert once it's in the Keychain, and go to Get Info. When there change the certificate to be trusted, like in this screenshot You can just alway trust the whole cert for everything if you want, but I wouldn't recommend it. Just SSL should be enough |
@allaire I've removed the puma-dev certificate from the keychain and uninstalled puma-dev from Homebrew. I've also removed the
Everything seems fine on my side , Chrome (62.0.3202.94) won't complain about the certificates. I'm running High Sierra 10.13.2 (17C89). I've found is that the certificate in keychain seems to be Always Trusted by default (this is a screenshot without having to manually modify the certificates in keychain): |
I had issues similar to the ones mentioned in this issue. After trying out the solutions including @joshmanders' one about moving/copying the certificate to the System keychain in Keychain Access, it got resolved in Chrome, Safari and Opera. However, I'm still having this problem in Firefox Quantum 57.0.1 (64-bit) on macOS—and the error is similar to the one faced by @lulalala. Anyone know how to solve this? It seems like Firefox is being suspicious of certain "SSL issuers" like Puma-dev CA. This is the full error:
I'm thinking of using the Advanced > Add Exception feature in the error page but it would be great if someone could point me to a better direction. |
I'm not sure how important it is to have this resolved in FF, if none of us developers use it for development as it's only an issue in development. If we still need it to work there, your solution to treat it as an exception is a very good one. |
@flaki you may have a better understanding of FF than I do. Do you happen to know what's causing FF to be 'picky' about self-signed certificates despite them being trusted in the system keychain? |
Not sure. Let's Encrypt won't work for your usecase?
…---- On Thu, 21 Dec 2017 15:10:47 +0100 notifications@github.com wrote ----
@flaki you may have a better understanding of FF than I do. Do you happen to know what's causing FF to be 'picky' about self-signed certificates despite them being trusted in the system keychain?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
If you can't get puma-dev to work, https://github.com/rchampourlier/tunnelss is a good alternative. |
I ran into this problem today after doing a full puma-dev reinstall:
I also changed the domain from I think a step-by-step guide on the proper way to manage these errors should appear on the README of the project. I feel a little intimated by this task as I'm by no mean an expert in certificates stuff and I'm not sure I took the right actions after reading this pretty verbose and work-in-progressy thread. |
I was also running into an issue with trusting the puma-dev certificate authority in Firefox. Even though I had marked the certificate as "Always Trust" in Keychain Access, it seems like Firefox isn't respecting those settings. Here's how I manually added puma-dev as a trusted certificate authority. First, I symlinked the
Next, I navigated to the "Privacy and Security" Preferences screen in Firefox. Scroll down to the bottom and click the "View Certificates" button. On the "Authorities" tab, click the "Import..." button. Select the |
that worked for me @joshmanders |
For those wondering about Firefox, I believe Firefox uses its own certificate store, not the system's store. |
Thinking out loud about the security here, does trusting the CA mean that anyone can sign a certificate for any website and my system will trust it? Are there limitations to the cert? I'm not that well versed in the cert science here. |
@andrewhavens' solution didn't work using symlink but copy paste worked : |
I had some issues where puma-dev wasn't working in HTTPS even though a cert appeared in Keychain as Trusted, and I even uninstalled and reinstalled and ran
Then everything started worked. |
It seems the reason the
They can be removed with a little bit of a longer command.
and then adding it back to a one-liner
|
I believe this is still an outstanding issue as of v0.13 on macOS Mojave. I'm working on some tests to verify the behavior, but |
Was there a resolution to this? I'm on Big Sur and still running into problems with the certificate being trusted. |
AFAIK it has been resolved as of the most recent version. What version are you running? Can you see the |
Ah, ok. It seems to work well on Safari but not on Firefox on MacOS Big Sur. Though perhaps that's a different problem? Do you all have a workaround for that? |
Firefox controls its own CA store. You'll need to import your puma-dev CA manually (from |
Hi,
After upgrading to Sierra, Safari and Chrome show an SSL error when trying to access sites served by puma-dev over https. Uninstalling and reinstalling puma-dev did not have any effect. Furthermore it appears that uninstalling does not remove the io.puma.dev directory and reinstalling does not prompt you to trust the certificate again.
I manually deleted
~/Application Support/io.puma.dev
and reinstalled which did prompt me to trust the certificate again, but still had invalid certificate errrors.Thanks for puma-dev!
The text was updated successfully, but these errors were encountered: