Configure HBase to use Kerberos
HBase supports MapR-SASL and Kerberos security, and can run securely independently of the security status of your HPE Data Fabric cluster.
Procedure
To configure HBase to use Kerberos, perform the following
steps:
-
Install the
mapr-hbase-masterandmapr-hbase-regionserverpackages on the cluster. -
On all HBase nodes, perform the following steps:
-
Install the
krb5packages and configure the Kerberos client as per the configuration for your environment. -
Set up the HBase Kerberos principal
mapr/<fqdn>@<realm>. Each node requires a unique keytab file and Kerberos identity. -
Create an
hbase.keytabfile with the HBase Kerberos principal with the same process used to generate the CLDB keytab. -
Copy the
hbase.keytabfile to the/opt/mapr/confdirectory. -
Use the
chowncommand to change the keytab file's ownership tomapr:mapr. -
Use the
chmodcommand to set the file's permissions to600. -
Update the
hbase-site.xmlfile by adding the following section:<property> <name>hbase.security.authentication</name> <value>kerberos</value> </property> <property> <name>hbase.security.authorization</name> <value>true</value> </property> <property> <name>hbase.regionserver.kerberos.principal</name> <value>mapr/_HOST@<KERBEROS_REALM></value> </property> <property> <name>hbase.master.kerberos.principal</name> <value>mapr/_HOST@<KERBEROS_REALM></value> </property> -
On a
HPE Data Fabric cluster
with security features enabled, replace the
${SIMPLE_LOGIN_OPTS}value of theMAPR_HBASE_SERVER_OPTSproperty with${KERBEROS_LOGIN_OPTS}and the value of theMAPR_HBASE_CLIENT_OPTSproperty with${HYBRID_LOGIN_OPTS}. Also remove the-Dzookeeper.sasl.client=falseoption from the definition ofMAPR_HBASE_CLIENT_OPTS.These properties are located in the
/opt/mapr/conf/env.shfile. -
On a
HPE Data Fabric cluster
with security features disabled, replace the
${SIMPLE_LOGIN_OPTS}value of theMAPR_HBASE_SERVER_OPTSandMAPR_HBASE_CLIENT_OPTSproperties in the/opt/mapr/conf/env.shfile with${KERBEROS_LOGIN_OPTS}.
-
Install the
-
On all HBase regionserver nodes, update the
hbase-site.xmlfile by adding the following section:<property> <name>hbase.regionserver.keytab.file</name> <value>/opt/mapr/conf/hbase.keytab</value> </property> <property> <name>hbase.coprocessor.region.classes</name> <value> org.apache.hadoop.hbase.security.token.TokenProvider,org.apache.hadoop.hbase.security.access.AccessController</value> </property> -
On the HBase master node, update the
hbase-site.xmlfile by adding the following section:<property> <name>hbase.master.keytab.file</name> <value>/opt/mapr/conf/hbase.keytab</value> </property> <property> <name>hbase.coprocessor.master.classes</name> <value>org.apache.hadoop.hbase.security.access.AccessController</value> </property> - Restart the HBase master and regionserver nodes.