public class SecurityUtils extends Object
| Constructor and Description |
|---|
SecurityUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.thrift.transport.TServerSocket |
getServerSocket(String hiveHost,
int portNum) |
static org.apache.thrift.transport.TServerSocket |
getServerSSLSocket(String hiveHost,
int portNum,
String keyStorePath,
String keyStorePassWord,
List<String> sslVersionBlacklist) |
static org.apache.thrift.transport.TTransport |
getSSLSocket(String host,
int port,
int loginTimeout,
String trustStorePath,
String trustStorePassWord) |
static String |
getTokenStoreClassName(org.apache.hadoop.conf.Configuration conf)
This method should be used to return the metastore specific tokenstore class name to main
backwards compatibility
|
static String |
getTokenStrForm(String tokenSignature)
Get the string form of the token given a token signature.
|
static org.apache.hadoop.security.UserGroupInformation |
getUGI() |
static String |
getUser() |
static void |
setTokenStr(org.apache.hadoop.security.UserGroupInformation ugi,
String tokenStr,
String tokenService)
Create a delegation token object for the given token string and service.
|
static void |
setZookeeperClientKerberosJaasConfig(String principal,
String keyTabFile)
Dynamically sets up the JAAS configuration that uses kerberos
|
public static org.apache.hadoop.security.UserGroupInformation getUGI()
throws LoginException,
IOException
LoginExceptionIOExceptionpublic static void setZookeeperClientKerberosJaasConfig(String principal, String keyTabFile) throws IOException
principal - keyTabFile - IOExceptionpublic static String getTokenStrForm(String tokenSignature) throws IOException
tokenSignature - IOExceptionpublic static void setTokenStr(org.apache.hadoop.security.UserGroupInformation ugi,
String tokenStr,
String tokenService)
throws IOException
ugi - tokenStr - tokenService - IOExceptionpublic static String getTokenStoreClassName(org.apache.hadoop.conf.Configuration conf)
conf - - HiveConf objectpublic static String getUser() throws IOException
IOException - if underlying Hadoop call throws LoginExceptionpublic static org.apache.thrift.transport.TServerSocket getServerSocket(String hiveHost, int portNum) throws org.apache.thrift.transport.TTransportException
org.apache.thrift.transport.TTransportExceptionpublic static org.apache.thrift.transport.TServerSocket getServerSSLSocket(String hiveHost, int portNum, String keyStorePath, String keyStorePassWord, List<String> sslVersionBlacklist) throws org.apache.thrift.transport.TTransportException, UnknownHostException
org.apache.thrift.transport.TTransportExceptionUnknownHostExceptionCopyright © 2019 The Apache Software Foundation. All Rights Reserved.