Configuring Hadoop Authentication

Learn about how to configure Hadoop Authentication for a service.

  1. In the Cloudera console, click the Data Engineering tile. The Cloudera Data Engineering Home page displays.
  2. Click Administration in the left navigation menu. The Administration page displays.
  3. In the Services column, select the environment for which you want to configure the Hadoop Authentication and click Service Details.
  4. Click Hadoop Authentication.
  5. Enter the Principal value.
  6. Under Authentication Type, choose one of the following options:
    • Using the Keytab file:
      1. Under Authentication Type, select the Keytab file checkbox.
      2. Click Select File and select the relevant keytab file. For instructions about getting the keytab file, see Kerberos Configuration Strategies for CDP.
    • Using password:
      1. Under the Authentication Type, select the Password checkbox.
      2. In the Password text box, enter the Kerberos password.
  7. Click Authenticate.
Login to CDE CLI and run the following command to configure the Hadoop authentication:
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
  1. 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
    To get the CDE_TOKEN and service-url values, see Getting a Cloudera Data Engineering API access token.
  2. Update Hadoop Authenticaion 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>"'