Skip to content
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

Does the python grpc have the ability to disable ssl validation on the client? #15461

Closed
dshylov opened this issue May 18, 2018 · 5 comments
Closed

Comments

@dshylov
Copy link

dshylov commented May 18, 2018

Does the python grpc have the ability to disable ssl validation on the python client?
I didn't find this ability in ssl_channel_credentials or secure_channel options.

@dshylov
Copy link
Author

dshylov commented May 18, 2018

I tried this:
ssl_credentials = grpc.ssl_channel_credentials()
self.__channel = grpc.secure_channel(connection_url, ssl_credentials, (('grpc.ssl_target_name_override', 'my.host.name',),))
self.__connection = ServerStub(self.__channel)
And just get
<_Rendezvous of RPC that terminated with (StatusCode.UNAVAILABLE, Connect Failed)>

E0519 01:21:43.648971832 2424 ssl_transport_security.cc:979] Handshake failed with fatal error SSL_ERROR_SSL: error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED.

@dshylov
Copy link
Author

dshylov commented May 18, 2018

All works fine if I add correct CN and pem file. But I can't connect without pem file.
In Java we have GrpcSslContexts which can use InsecureTrustManagerFactory.INSTANCE
for avoiding this.
.sslContext(GrpcSslContexts.forClient().trustManager(InsecureTrustManagerFactory.INSTANCE).build())
Is there an alternative way for python?

@dshylov
Copy link
Author

dshylov commented May 21, 2018

Okay, I found the answer here.

@dshylov dshylov closed this as completed May 21, 2018
@prateek2408
Copy link

whats the resolution, even I am facing the same issue

@dshylov
Copy link
Author

dshylov commented Sep 21, 2018

@prateek2408
It's still wasn't merged
#12656

@lock lock bot locked as resolved and limited conversation to collaborators Dec 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants