Created on 11-10-2017 01:50 PM - edited 09-16-2022 05:30 AM
I'm trying to connect to Hive via JDBC, authenticated by Kerberos. I'm not connecting through custom Java code where I could just call UserGroupInformation.loginUserFromKeytab prior to establishing the connection; rather, I'm connecting through an SQL tool that uses JDBC drivers to connect, and my options to provide authentication information are rather limited to JDBC URL itself, and its connection properties. Is there a way to specify the Kerberos authentication there?
Created 11-10-2017 01:53 PM
Following HCC Article provides Various examples of HiveSerevr2 connection:
https://community.hortonworks.com/articles/4103/hiveserver2-jdbc-connection-url-examples.html
Created 11-10-2017 02:03 PM
Yes, I've seen this article, and it specifically notes that "The client is required to 'kinit' before connecting through JDBC" - this might be fine for a custom code, but not for a tool, where one doesn't have control of what happens before the connection.
Created 11-10-2017 02:16 PM
The Kerberos ticket is not specific to the "Client".
So as long as the user who is running the SQL tool has a valid ticket created already before running the query, Should be able to access the Hive.
The common utility to create get the kerberos ticket is "kinit" . It is not necessary that the Tool that we are using will have to create create the kerberos ticket.
.
Created 11-10-2017 02:48 PM
Following is a Blog link which shows how to configure SQL Developer tool to setup keytool. (but "kinit" we will need to do manually)
Created 08-21-2018 10:34 PM
Alex,
Did you find any solution for this? i also have similar requirement to connect to JDBC through Kerberos.