public class HiveAuthFactory extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HiveAuthFactory.AuthTypes |
| Modifier and Type | Field and Description |
|---|---|
static String |
HS2_CLIENT_TOKEN |
static String |
HS2_PROXY_USER |
| Constructor and Description |
|---|
HiveAuthFactory(HiveConf conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelDelegationToken(String delegationToken) |
org.apache.thrift.TProcessorFactory |
getAuthProcFactory(ThriftCLIService service)
Returns the thrift processor factory for HiveServer2 running in binary mode
|
org.apache.thrift.transport.TTransportFactory |
getAuthTransFactory() |
String |
getDelegationToken(String owner,
String renewer) |
String |
getIpAddress() |
String |
getRemoteUser() |
Map<String,String> |
getSaslProperties() |
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 |
getSocketTransport(String host,
int port,
int loginTimeout) |
static org.apache.thrift.transport.TTransport |
getSSLSocket(String host,
int port,
int loginTimeout) |
static org.apache.thrift.transport.TTransport |
getSSLSocket(String host,
int port,
int loginTimeout,
String trustStorePath,
String trustStorePassWord) |
String |
getUserFromToken(String delegationToken) |
static void |
loginFromKeytab(HiveConf hiveConf) |
static org.apache.hadoop.security.UserGroupInformation |
loginFromSpnegoKeytabAndReturnUGI(HiveConf hiveConf) |
void |
renewDelegationToken(String delegationToken) |
static void |
verifyProxyAccess(String realUser,
String proxyUser,
String ipAddress,
HiveConf hiveConf) |
public static final String HS2_PROXY_USER
public static final String HS2_CLIENT_TOKEN
public HiveAuthFactory(HiveConf conf) throws org.apache.thrift.transport.TTransportException
org.apache.thrift.transport.TTransportExceptionpublic org.apache.thrift.transport.TTransportFactory getAuthTransFactory()
throws LoginException
LoginExceptionpublic org.apache.thrift.TProcessorFactory getAuthProcFactory(ThriftCLIService service) throws LoginException
service - LoginExceptionpublic String getRemoteUser()
public String getIpAddress()
public static void loginFromKeytab(HiveConf hiveConf) throws IOException
IOExceptionpublic static org.apache.hadoop.security.UserGroupInformation loginFromSpnegoKeytabAndReturnUGI(HiveConf hiveConf) throws IOException
IOExceptionpublic static org.apache.thrift.transport.TTransport getSocketTransport(String host, int port, int loginTimeout)
public static org.apache.thrift.transport.TTransport getSSLSocket(String host, int port, int loginTimeout) throws org.apache.thrift.transport.TTransportException
org.apache.thrift.transport.TTransportExceptionpublic static org.apache.thrift.transport.TTransport getSSLSocket(String host, int port, int loginTimeout, String trustStorePath, String trustStorePassWord) throws org.apache.thrift.transport.TTransportException
org.apache.thrift.transport.TTransportExceptionpublic 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.TTransportExceptionUnknownHostExceptionpublic String getDelegationToken(String owner, String renewer) throws HiveSQLException
HiveSQLExceptionpublic void cancelDelegationToken(String delegationToken) throws HiveSQLException
HiveSQLExceptionpublic void renewDelegationToken(String delegationToken) throws HiveSQLException
HiveSQLExceptionpublic String getUserFromToken(String delegationToken) throws HiveSQLException
HiveSQLExceptionpublic static void verifyProxyAccess(String realUser, String proxyUser, String ipAddress, HiveConf hiveConf) throws HiveSQLException
HiveSQLExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.