Package org.apache.hadoop.hbase.security
Class HBaseKerberosUtils
java.lang.Object
org.apache.hadoop.hbase.security.HBaseKerberosUtils
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
static String
static org.apache.hadoop.conf.Configuration
static String
static String
static org.apache.hadoop.conf.Configuration
static boolean
static org.apache.hadoop.security.UserGroupInformation
loginKerberosPrincipal
(String krbKeytab, String krbPrincipal) static void
setClientKeytabForTesting
(String clientKeytab) static void
setClientPrincipalForTesting
(String clientPrincipal) static void
setKeytabFileForTesting
(String keytabFile) static void
setPrincipalForTesting
(String principal) static void
setSecuredConfiguration
(org.apache.hadoop.conf.Configuration conf) static void
setSecuredConfiguration
(org.apache.hadoop.conf.Configuration conf, String servicePrincipal, String spnegoPrincipal) Set up configuration for a secure HDFS+HBase cluster.private static void
setSecuredHadoopConfiguration
(org.apache.hadoop.conf.Configuration conf, String spnegoServerPrincipal) static void
setSSLConfiguration
(HBaseCommonTestingUtil utility, Class<?> clazz) Set up SSL configuration for HDFS NameNode and DataNode.static void
setSystemProperty
(String propertyName, String propertyValue)
-
Field Details
-
LOG
-
KRB_PRINCIPAL
- See Also:
-
MASTER_KRB_PRINCIPAL
- See Also:
-
KRB_KEYTAB_FILE
- See Also:
-
CLIENT_PRINCIPAL
- See Also:
-
CLIENT_KEYTAB
- See Also:
-
-
Constructor Details
-
HBaseKerberosUtils
private HBaseKerberosUtils()
-
-
Method Details
-
isKerberosPropertySetted
-
setPrincipalForTesting
-
setKeytabFileForTesting
-
setClientPrincipalForTesting
-
setClientKeytabForTesting
-
setSystemProperty
-
getKeytabFileForTesting
-
getPrincipalForTesting
-
getClientPrincipalForTesting
-
getClientKeytabForTesting
-
getConfigurationWoPrincipal
-
getSecuredConfiguration
-
setSecuredConfiguration
public static void setSecuredConfiguration(org.apache.hadoop.conf.Configuration conf, String servicePrincipal, String spnegoPrincipal) Set up configuration for a secure HDFS+HBase cluster.- Parameters:
conf
- configuration object.servicePrincipal
- service principal used by NN, HM and RS.spnegoPrincipal
- SPNEGO principal used by NN web UI.
-
setSecuredConfiguration
-
setSecuredHadoopConfiguration
private static void setSecuredHadoopConfiguration(org.apache.hadoop.conf.Configuration conf, String spnegoServerPrincipal) -
setSSLConfiguration
public static void setSSLConfiguration(HBaseCommonTestingUtil utility, Class<?> clazz) throws Exception Set up SSL configuration for HDFS NameNode and DataNode.- Parameters:
utility
- a HBaseTestingUtility object.clazz
- the caller test class.- Throws:
Exception
- if unable to set up SSL configuration
-
loginKerberosPrincipal
public static org.apache.hadoop.security.UserGroupInformation loginKerberosPrincipal(String krbKeytab, String krbPrincipal) throws Exception - Throws:
Exception
-