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

Support SSL connections to Thrift #109

Open
eanups opened this issue Mar 9, 2016 · 6 comments
Open

Support SSL connections to Thrift #109

eanups opened this issue Mar 9, 2016 · 6 comments

Comments

@eanups
Copy link

eanups commented Mar 9, 2016

HappyBase makes an unsecure connection to HBase through thrift over the wire. Need to make a secure connection probably using TSSLSocket.

@wbolster
Copy link
Member

this was not available earlier when i wrote most of the code. api proposals?

— wouter

sent from my phone. please forgive my tpyos.

On March 9, 2016 5:40:44 AM GMT+01:00, eanups [email protected] wrote:

HappyBase makes an unsecure connection to HBase through thrift over
the wire. Need to make a secure connection probably using TSSLSocket.


Reply to this email directly or view it on GitHub:
#109

@wbolster
Copy link
Member

depends on thriftpy supporting it. did not look into it.

@wbolster
Copy link
Member

for reference, upstream report (closed) at Thriftpy/thriftpy#136

@aanwokafor
Copy link

@wbolster. Thanks for your good work. Any progress on this front?

@wbolster
Copy link
Member

hi @aanwokafor, thanks for your message.

no work on this from my side. feel free to propose a clean api for this (and code that implements it).

@rlinke
Copy link

rlinke commented Apr 4, 2018

@wbolster: following proposal.

  • add sslconnection.py
  • add SSLConnection(Connection)
  • add additional TSSLSocket arguments to SSLConnection constructor
  • extract socket = TSocket(host=self.host, port=self.port, socket_timeout=self.timeout) into own method e.g. _init_socket
  • override _init_socket in SSLConnection with TSSLSocket and additional arguments
  • move statics like STRING_OR_BINARY = (six.binary_type, six.text_type) into util.py and import into connection.py and sslconnection.py

open issue: self.open() may be called automatically inside the constructor. This collides with initializing the non SSL related arguments via super.__init__ . This can be circumvented with forcing autoconnect=False and after initializing the SSL related arguments adding the if autoconnect: self.open() inside the SSLConnection.__init__
Any recommendations?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants