-
Notifications
You must be signed in to change notification settings - Fork 26
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
hubot-zulip doesn't work with self signed SSL certs #6
Comments
I think probably the right solution to this problem is to just provide a documented path for passing into the integration the path to an SSL certificate it can use to verify communication with the server. |
Having the same issue here, however the certificate is valid from where I'm connecting from (cURL works, btw): Zulip API Error: SSL Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE Any pointers? I've tried to disable strict-ssl, rejectUnauthorized on Requests lib used by Zulip as well as disabling Node TLS check and it still provides me the same error message. Other alternatives in case it works for anyone else: request/request#418 |
Im getting something similar with the error ...
I did try a couple of the workarounds suggested in request/request#418, but to no avail. |
I'm getting something a little different: zulip@zulip:~/r2z2$ HUBOT_ZULIP_SITE=https://zulip.example.com HUBOT_ZULIP_BOT=[email protected] HUBOT_ZULIP_API_KEY=key bin/hubot -a zulip Is there a way to provide a path to the SSL cert? |
the Hubot integration uses zulip-node, not the Python API: https://github.com/zulip/zulip-node The Python API has an open PR to add support for specifying a certificate, but the Node API bindings do not. If someone wants to address this, I'd recommend working on the problem in zulip-node. I don't think there's a way to provide a path to the SSL cert right now but surely there's an easy way to pass a cert path into the Node HTTPS libraries (if fixing this requires switching to a different library, that's totally fine)... |
I believe I have a work around for this. It's not pretty, but it seems to be working. The Zulip installation I'm working with has an SSL certificate that is signed, but doesn't return a full certificate chain back to the root, so request validation for HTTPS was failing. When I ran hubot with the zulip adapter, right away I started getting the initial "unable to verify the first certificate" errors. After a little research, I found the NODE_TLS_REJECT_UNAUTHORIZED=0 setting and started using it. Then my error changed slightly to the one mentioned above: "Zulip API Error: SSL Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE" Digging into the source a little (/[your_bot_root/node_modules/request/request.js, around line 639), there is a check to validate the secure connection:
Setting "self.strictSSL = true" just before this code (or, presumably, removing the self.strictSSL check in the IF statement) disrupts the error and allows the connection to continue. Ta-daa: a working, connecting hubot. Is there a way to feed this setting into hubot-zulip as a config variable and have it persist to node.js? |
I am running into the same issue richardwlu is running into. Has this been resolved or is there a good work around for it? I tried the work around mentioned by the previous post to no avail. Th ks! |
The easiest solution is to just get a free real SSL cert from LetsEncrypt. |
That's the thing, I am no longer using a self-signed certificate. I replaced it in the nginx config, is there somewhere else that needs to be updated to recognize that I am no longer using a self-signed certificate? I apologize if this is documented somewhere, I haven't been able to find anything related to it other than this issue. Thanks! Sent from my BlackBerry 10 smartphone on the TELUS network. The easiest solution is to get get a free real SSL cert from LetsEncrypt. — |
I followed the steps in the answer on this link and it resolved my certificate issues. http://stackoverflow.com/questions/32248166/socket-io-unable-to-verify-the-first-certificate Thanks! |
We ran into this issue and solved it by setting the NODE_EXTRA_CA_CERTS=/path/to/cert.pem environment variable before starting hubot. It seems that this mechanism didn't exist in nodejs when the issue was initially raised. More info at https://stackoverflow.com/questions/29283040/how-to-add-custom-certificate-authority-ca-to-nodejs |
I ran
HUBOT_ZULIP_SITE=https://zulip.example.com HUBOT_ZULIP_BOT=[email protected] HUBOT_ZULIP_API_KEY=your_key bin/hubot -a zulip
with values corrected for my local installation and got:
Zulip API Error: unable to verify the first certificate
[Fri Oct 16 2015 14:19:28 GMT+0200 (CEST)] ERROR Error: unable to verify the first certificate
at Error (native)
at TLSSocket. (_tls_wrap.js:929:36)
at TLSSocket.emit (events.js:104:17)
at TLSSocket._finishInit (_tls_wrap.js:460:8)
The text was updated successfully, but these errors were encountered: