-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add option to turn off verification checking on SSL certificate #94
Comments
Enhanced in #105. |
@kwkwan: thanks for opening this issue! I just had a details conversation with @ribose-jeffreylau, let me put together the summary of the conversation so everyone is on the same page and it might be useful in the future.
But as Jeffery mentioned, we are using the cc: @ronaldtse |
@abunashir I've just created a PR #106. |
How about using a purchased certificate on staging then? That said, #106 may be still useful for proxy setup. |
@abunashir @kwkwan If setting Faraday options is not desirable, how about monkey-patching Faraday in development? module FaradayOverrides
def initialize *args
options = args.last
options[:ssl] = {verify: false}
super
end
end
Faraday::Connection.prepend FaradayOverrides Seems to work for me. |
I agree that in release we don't want this sort of option, but in development mode it will be useful. How about just using a @skalee all deployed environments use valid certificates. @kwkwan 's case is local local (same container to same container). @abunashir Let's Encrypt won't work for this case because it requires remote domain validation. The real solution would be to add the locally generated certificate CA into the OS itself. @kwkwan should be straightforward to do like this https://askubuntu.com/questions/73287/how-do-i-install-a-root-certificate . |
@ronaldtse: Adding support to pick up But this also gave another idea like I mentioned in skype, maybe we can do something like, expose the Ideally, if we can solve this using a ca root certificate like you mentioned in your previous comment then that would be perfect, and that might not require any changes on the client end. If that does not work then please let us know so we can add the necessary changes. |
I suppose there is no way to stop user from disabling the verification mode since he can simply monkey-patch Faraday (as I did in #94 (comment)). Only two options make sense to me: either make Faraday configuration easy and unrestricted (as in #106), or do not provide any configuration logic at all and rely on user's monkey-patching skills (or make him using trusted certificates). |
Would the methods detailed in this page be useful? One of the methods, which avoids the need to mess with Faraday, is to simply set an env var: export SSL_CERT_FILE=/path/to/ca.crt |
Agree! Seems easy enough to do. |
When we tried to connect to our local development server which is using a self-signed certificate, the connection failed due to an error "certificate verify failed (Faraday::SSLError)". It is better to add an option to turn off verification checking on SSL certificate when connecting to api_host. Thanks.
The text was updated successfully, but these errors were encountered: