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 for Kerberos connection #11

Open
feenst opened this issue Sep 6, 2017 · 7 comments
Open

Support for Kerberos connection #11

feenst opened this issue Sep 6, 2017 · 7 comments

Comments

@feenst
Copy link

feenst commented Sep 6, 2017

I'm evaluating node-hbase for connecting to an HBase instance, but it's using REST rather than Thrift to connect.

Has Kerberos support for node-thirft2-hbase been discussed?

@moshewe
Copy link
Contributor

moshewe commented Sep 6, 2017 via email

@feenst
Copy link
Author

feenst commented Sep 7, 2017

@moshewe, I'm not sure where to start on swapping out the connection pool. Would that be something here?

@moshewe
Copy link
Contributor

moshewe commented Sep 7, 2017 via email

@Ran-P
Copy link
Contributor

Ran-P commented Sep 7, 2017

In client.js line 147 the connection to the thrift server is created.
The createConnection is in the node-thrift package, It just create a stream using net.createConnection.
You can add your function of createKerberosConnection :

thrift.createKerberosConnection = function(host, port, options) {
  var stream = kerberos.connect(port, host, options);
  var connection = new Connection(stream, options);
  connection.host = host;
  connection.port = port;
  return connection;
};

@feenst
Copy link
Author

feenst commented Sep 13, 2017

@Ran-P, the Node kerberos packages I've seen (kerberos and node-krb5) both seem to work by generating a token that's used with an Authentication HTTP header.

The thrift connection uses sockets / streams. Any idea how Kerberos authentication works in that scenario?

@moshewe
Copy link
Contributor

moshewe commented Sep 13, 2017

As @Ran-P pointed out, you should discuss this with the node-thrift people. If you figure something out with them, then you can see exactly where @Ran-P had already directed you to how to use it with our package - it's just a library for us.

@Ran-P
Copy link
Contributor

Ran-P commented Sep 13, 2017

@feenst you can use httpConnection in the thrift library instead of the RPC connection.
Add(or extend) to the httpConnection to use krb5.

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

No branches or pull requests

3 participants