Configuring Hadoop Authentication
Learn about how to configure Hadoop Authentication for a Spark Compute.
Hadoop authentication is available only if you have created at least one Spark Compute that is Cloudera Base-Connected. If you have more Cloudera Base-Connected Spark Computes, you need to set up Hadoop authentication only once, and all your Base-Connected Spark Computes will use the specified Principal value, and keytab file or Kerberos password that you provide.
- In the Cloudera Data Engineering UI, click Spark Compute in the left navigation menu. The Spark Compute page displays.
- Click the Hadoop Authentication button in the top-right corner.
- Enter the Principal value.
- Under Authentication method, choose one of the following options:
- Keytab file:
Under the Authentication method option, select the Keytab file radio button.
- Click the Upload button under the Keytab
file option and select the relevant keytab file.
Result: The selected Keytab file is displayed. For instructions about getting the keytab file, see Kerberos Configuration Strategies for CDP.
- Click the Upload button under the Keytab
file option and select the relevant keytab file.
- Password:
- Under the Authentication method option, select the Password radio button.
- In the Password text box, enter your Kerberos password.
- Keytab file:
- Click Authenticate.
cde kerberos authenticate [***KERBEROS-AUTHENTICATION-FLAG***]Use
one of the following flag value pairs depending on the type of authentication you want to use:- Using a password:
--principal string– Enter the Kerberos principal when prompted--password– Enter the password when prompted
- Using the Keytab file:
--principal string– Enter the Kerberos principal when prompted--keytab-file string– Enter the keytab file path when prompted
- Get the Keytab metadata. For instructions about getting the keytab file, see Kerberos Configuration Strategies for
CDP.
curl -X GET -H "Authorization: Bearer ${CDE_TOKEN}" \ <service-url>/user-auth/api/v1/kerberos - Update Hadoop Authentication using one of the following methods:
- Using a
password:
curl -H "Authorization: Bearer ${CDE_TOKEN}" <service-url>/user-auth/api/v1/kerberos \ -H "Content-Type: application/json" \ -X POST --form 'principal="<Principal>"' \ --form 'password="<password>"' - Using the Keytab
file:
curl -H "Authorization: Bearer ${CDE_TOKEN}" <service-url>/user-auth/api/v1/kerberos \ -H "Content-Type: application/json" \ -X POST --form 'principal="<Principal>"' \ --form 'file=@"</path/to/keytab/file>"'
- Using a
password:
