Configure Kerberos Authentication for WebHCat
About this task
To enable WebHCat to use Kerberos, complete the following steps on the node where WebHCat is installed.
Procedure
-
Create the principal
HTTP/<FQDN@REALM>for WebHCat and add the principal to the keytab file. For example:kadmin: addprinc -randkey HTTP/<FQDN@REALM> kadmin: xst -k /opt/mapr/HTTP.keytab HTTP/<FQDN> -
Verify the following:
- The principal was added to the
/opt/mapr/conf/HTTP.keytabfile and that the file is only readable by themapruser. For example: chown mapr /opt/mapr/conf/HTTP.keytab - The node where the WebHCat server is running has an HTTP user with a valid
maprloginpassword.
- The principal was added to the
-
Add the following section to the
/opt/mapr/hive/hive-<version>/hcatalog/etc/webhcat/webhcat-site.xmlfile:<property> <name>templeton.kerberos.secret</name> <value>secret value</value> </property> <property> <name>templeton.kerberos.principal</name> <value>HTTP/<FQDN@REALM></value> </property> <property> <name>templeton.kerberos.keytab</name> <value>/opt/mapr/conf/HTTP.keytab</value> </property> -
Add the following section to the
/opt/mapr/hadoop/hadoop-<version>/etc/hadoop/core-site.xmlfile:<property> <name>hadoop.proxyuser.HTTP.groups</name> <value>*</value> <description>Allow the superuser mapr to impersonate any member of any group</description> </property> <property> <name>hadoop.proxyuser.HTTP.hosts</name> <value>*</value> <description>The superuser can connect from any host to impersonate a user</description> </property> - Start WebHCat. See Managing the WebHCat Server.
-
To test if the connection is working, generate a Kerberos ticket with the
kinitutility and then run the following command:curl --negotiate -i -u : 'http://<FQDN>:50111/templeton/v1/ddl/database/'