Skip to main content

How to configure impersonation of a Hive user over JDBC?

  • December 22, 2021
  • 0 replies
  • 383 views

AkshayJadhav
StreamSets Employee
Forum|alt.badge.img

The SDC doesn't expose "Hive user" on the Hive components because the connection is done using JDBC and not Hadoop-native RPC.

 

With HDFS/HBase and other native RPC mechanism, there is exactly one way how a user can and should specify the do-as user (e.g. what user should be impersonated). There is no such standard on JDBC - each driver has it's own way how to specify impersonation. For example:

 

1) For the bundled Hive JDBC Driver

A user needs to specify the following JDBC property: "hive.server2.proxy.user" which is covered in docs:

https://www.cloudera.com/documentation/enterprise/latest/topics/cdh_sg_hiveserver2_security.html#concept_vjq_c3x_nm

 

2) For the Cloudera JDBC Driver, a user should use the DelegationUID property instead which is covered in a different doc:

http://www.cloudera.com/documentation/other/connectors/hive-jdbc/latest/Cloudera-JDBC-Driver-for-Apache-Hive-Install-Guide.pdf

A user needs to read the documentation of used JDBC Driver to figure out how impersonation should be configured.

This topic has been closed for replies.