Is it possible to connect to Hive via beeline using (kerberos) keytab file similar to the approach used for JDBC at
https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-UsingKerberoswithaPre-AuthenticatedSubject
PS : beeline does support connecting on a kerberos secured hive server with username and password. But I am looking for a way to connect it with a keytab file. http://doc.mapr.com/display/MapR40x/Configuring+Hive+on+a+Secure+Cluster#ConfiguringHiveonaSecureCluster-UsingBeelinewithKerberos
Start Beeline to Connect to Hive To start Beeline, run beeline shell which is located at $HIVE_HOME/bin directory. This prompts you to an interactive Hive Beeline CLI Shell where you can run HiveQL commands. You can enter ! help on CLI to get all commands that are supported.
Kerberos Authentication is the security mechanism that is commonly used for controlling access to the HDFS and HIVE. This knowledge base post is intended to provide the details on configuration steps needed for creating a connection in ETL Validator to Hive using Kerberos as the authentication mechanism.
The primary difference between the two involves how the clients connect to Hive. The Hive CLI, which connects directly to HDFS and the Hive Metastore, and can be used only on a host with access to those services. Beeline, which connects to HiveServer2 and requires access to only one .
I think you cannot connect with keytab file into beeline but you can get ticket with keytab using kinit
and then pass the hive server principal with the jdbc connection string of beeline to connect.
kinit -k -t keytab principal
Connection string to connect with beeline
!connect jdbc:hive2://hostname:10000/default;principal=hive/_HOST@REALM
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With