Prerequisites
Enable Kerberos
Pre-Configuration
Before launching the wizard, you must set two configurations and restart all services.Get Started
Navigate to Admin -> Kerberos and press the "Enable Kerberos" button. The titles within this section refer to the titles of the Kerberos wizard pages.Configure Kerberos / Install and Test Kerberos Client
Fill in all KDC and admin server information. On step 3 (Install and Test Kerberos Client), the Ambari server will do a smoke test to ensure that you configured Kerberos correctly.
Configure Identities / Confirm Configuration
a) Ambari User Principals (UPNs)
Ambari creates user principals in the form $ -$ @$ , then uses hadoop.security.auth_to_local in core-site.xml to map the principals into just $ on the filesystem.
After configuring the appropriate principals, press "Next". At the "Confirm Configuration" screen, press "Next".
Stop Services / Kerberize Cluster
Stopping and Kerberizing services should succeed.
Do not proceed: Isilon does not allow Ambari to create keytabs for Isilon principals. Instead, you must manually configure Kerberos on Isilon using the steps below.
a) Create KDC as an Isilon auth provider
Note: If this Isilon zone is already configured to use your MIT KDC, you can skip these steps.
isi auth krb5 create --realm=$REALM --admin-server=$admin_server --kdc=$kdc_server --user=$admin_principal --password=$admin_password
isi zone zones modify --zone=$isilon_zone --add-auth-provider=krb5:$REALM
b) Create service principals for HDFS and HTTP (for WebHDFS).
isi auth krb5 spn create --provider-name=$REALM --spn=hdfs/$isilon_smartconnect@$REALM --user=$admin_principal --password=$admin_password
isi auth krb5 spn create --provider-name=$REALM --spn=HTTP/$isilon_smartconnect@$REALM --user=$admin_principal --password=$admin_password
c) Create any necessary proxy users
In unsecured clusters, any user can impersonate any other user. In secured clusters, proxy users need to be explicitly specified.
If you have Hive or Oozie, add the appropriate proxy users.
isi hdfs proxyusers create oozie --zone=$isilon_zone --add-user=ambari-qa
isi hdfs proxyusers create hive --zone=$isilon_zone --add-user=ambari-qa
d) Disable simple authentication
Only Kerberos or delegation token authentication is allowed.
isi hdfs settings modify --zone=$isilon_zone --authentication-mode=kerberos_only
Now that Isilon is configured as well, press "Next" in Ambari to move on to the last step of the wizard.
Start and Test Services
If services do not start, here are some tricks for debugging Kerberos issues:
In HDFS -> Custom core-site set "hadoop.rpc.protection" to "integrity" or "privacy". In addition to authentication, integrity guarantees messages have not been tampered with, and privacy encrypts all messages.
Run a job!
From any client host, try a MapReduce job!
kinit <some-user> yarn jar /usr/hdp/current/hadoop-mapreduce-client/hadoop-mapreduce-examples.jar pi 1 1000
Job Finished in 37.635 seconds
Estimated value of Pi is 3.14800000000000000000
Congratulations--you have secured your cluster with Kerberos!
(Optional) Disable Kerberos
Clean up Isilon
You should clean up Isilon first. This is essentially the inverse of enabling Kerberos.
a) Disable Kerberos authentication
isi hdfs settings modify --authentication-mode=simple_only --zone=$isilon_zone
b) Delete any proxy users
isi hdfs proxyusers delete oozie --zone=$isilon_zone
isi hdfs proxyusers delete hive --zone=$isilon_zone
c) Delete principals
isi auth krb5 spn delete --provider-name=$REALM --spn=hdfs/$isilon_smartconnect@$REALM --all
isi auth krb5 spn delete --provider-name=$REALM --spn=HTTP/$isilon_smartconnect@$REALM --all
Note that the above commands only remove those principals from Isilon, but do not remove them from the KDC. Use these commands to remove the Isilon principals from the KDC:
kadmin -p $admin_principal
kadmin: delete_principal hdfs/$isilon_smartconnect@$REALM
kadmin: delete_principal HTTP/$isilon_smartconnect@$REALM
d) Remove KDC as an Isilon authentication provider
isi zone zones modify --zone=$isilon_zone --remove-auth-provider=krb5:$REALM
isi auth krb5 delete --provider-name=$REALM
Clean up clients using Ambari
Press "Disable Kerberos" in Admin -> Kerberos. All the services should come up green.