public class HiveAuthFactory extends Object
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 remoteAddr) |
String |
getIpAddress() |
String |
getRemoteUser() |
Map<String,String> |
getSaslProperties() |
String |
getUserAuthMechanism() |
String |
getUserFromToken(String delegationToken) |
boolean |
isSASLKerberosUser() |
boolean |
isSASLWithKerberizedHadoop() |
static void |
loginFromKeytab(HiveConf hiveConf) |
static org.apache.hadoop.security.UserGroupInformation |
loginFromSpnegoKeytabAndReturnUGI(HiveConf hiveConf) |
void |
renewDelegationToken(String delegationToken) |
String |
verifyDelegationToken(String delegationToken) |
static void |
verifyProxyAccess(String realUser,
String proxyUser,
String ipAddress,
HiveConf hiveConf) |
public HiveAuthFactory(HiveConf conf) throws org.apache.thrift.transport.TTransportException
org.apache.thrift.transport.TTransportException
public org.apache.thrift.transport.TTransportFactory getAuthTransFactory() throws LoginException
LoginException
public org.apache.thrift.TProcessorFactory getAuthProcFactory(ThriftCLIService service) throws LoginException
service
- LoginException
public String getRemoteUser()
public String getIpAddress()
public String getUserAuthMechanism()
public boolean isSASLWithKerberizedHadoop()
public boolean isSASLKerberosUser()
public static void loginFromKeytab(HiveConf hiveConf) throws IOException
IOException
public static org.apache.hadoop.security.UserGroupInformation loginFromSpnegoKeytabAndReturnUGI(HiveConf hiveConf) throws IOException
IOException
public String getDelegationToken(String owner, String renewer, String remoteAddr) throws HiveSQLException
HiveSQLException
public void cancelDelegationToken(String delegationToken) throws HiveSQLException
HiveSQLException
public void renewDelegationToken(String delegationToken) throws HiveSQLException
HiveSQLException
public String verifyDelegationToken(String delegationToken) throws HiveSQLException
HiveSQLException
public String getUserFromToken(String delegationToken) throws HiveSQLException
HiveSQLException
public static void verifyProxyAccess(String realUser, String proxyUser, String ipAddress, HiveConf hiveConf) throws HiveSQLException
HiveSQLException
Copyright © 2022 The Apache Software Foundation. All rights reserved.