Creating Service Principals for Kerberos Ticket Generation in Windows
To create service principals for Kerberos ticket generation:
-
Create a service principal account for HDFS in the Windows Active Directory domain controller:
-
Click Active Directory Users and Computers > domain name (example: intelligence.lab) > right-click Users > New > User.
-
In New Object - User, specify your first, last, and full name.
- Specify User logon name as
hdfs/<DATANODE_HOST>
and click Next. - Specify and confirm your password. Ensure that you select Password Never Expires and click Next.
- Click Active Directory Users and Computers > domain name (example: intelligence.lab) > right-click Users (The user created in the above steps) > Properties.
-
Click Account, and under Account Options:, select all of the following:
-
This account supports Kerberos AES 128 bit encryption.
-
This account supports Kerberos AES 256 bit encryption.
-
Do not require Kerberos preauthentication.
-
- Click Apply and then click OK.
-
-
Create a service principal account for HTTP in the Windows Active Directory domain controller:
-
Click Active Directory Users and Computers > domain name (example: intelligence.lab) > right-click Users > New > User.
-
In New Object - User, specify your first, last, and full name.
- Specify User logon name as
http/<DATANODE_HOST>
and click Next. - Specify and confirm your password. Ensure that you select Password Never Expires and click Next.
- Click Active Directory Users and Computers > domain name (example: intelligence.lab) > right-click Users (The user created in the above steps) > Properties.
-
Click Account, and under Account Options, select all of the following:
-
This account supports Kerberos AES 128 bit encryption.
-
This account supports Kerberos AES 256 bit encryption.
-
Do not require Kerberos preauthentication.
-
- Click Apply and then click OK.
-
- Repeat steps 1 and 2 for all the worker nodes where HDFS datanodes are active.
-
For the service principal account created for HDFS, generate the keytabs by running the following commands in the Windows command prompt:
ktpass /out hdfs_<DATANODE_HOST>.keytab /princ hdfs/<DATANODE_HOST>@<Domain name of domain controller> /mapuser <DATANODE_HOST without domain name>@<Domain name of domain controller> /pass <password> /crypto all /ptype KRB5_NT_PRINCIPAL
-
For the service principal account created for HTTP, generate the keytabs by running the following commands in the Windows command prompt:
ktpass /out http_<DATANODE_HOST>.keytab /princ http/<DATANODE_HOST>@<Domain name of domain controller> /mapuser <DATANODE_HOST without domain name>@<Domain name of domain controller> /pass <password> /crypto all /ptype KRB5_NT_PRINCIPAL
-
Repeat steps 4 and 5 for all the worker nodes where HDFS datanodes are active.