Using a Hadoop Delegation Token
This authentication mechanism requires a Hadoop delegation token. This token must be provided to the connector in the form of a Base64 URL-safe encoded string. It can be obtained from the connector using the getDelegationToken()
function, or by utilizing the Hadoop distribution .jar
files. For a code sample that demonstrates how to retrieve the token using the getDelegationToken()
function, see Code Samples: Retrieving a Hadoop Delegation Token.
You provide this information to the connector in the connection URL. For more information about the syntax of the connection URL,
- This authentication mechanism is available only for Hive Server 2.
- This authentication mechanism requires that Kerberos be configured on the server.
To configure Hadoop delegation token authentication:
- Make sure Kerberos is configured on the server.
- Set the
AuthMech
property to6
. - Set the
delegationToken
property to an appropriately encoded Hadoop delegation token.
For example:
jdbc:hive
- Security and Authentication
- Building the Connection URL
- Authentication Driver Configuration Options on page 1
- Authentication Mechanisms
- Using No Authentication
- Using Kerberos
- Using User Name And Password