public class SecurityUtils extends Object
| Constructor and Description |
|---|
SecurityUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.kyuubi.shaded.thrift.transport.TServerSocket |
getServerSocket(String hiveHost,
int portNum) |
static org.apache.kyuubi.shaded.thrift.transport.TServerSocket |
getServerSSLSocket(String hiveHost,
int portNum,
String keyStorePath,
String keyStorePassWord,
String keyStoreType,
String keyStoreAlgorithm,
List<String> sslVersionBlacklist) |
static org.apache.kyuubi.shaded.thrift.transport.TTransport |
getSSLSocket(String host,
int port,
int socketTimeout,
int connectionTimeout,
String trustStorePath,
String trustStorePassWord,
String trustStoreType,
String trustStoreAlgorithm) |
static org.apache.kyuubi.shaded.thrift.transport.THttpClient |
getThriftHttpsClient(String httpsUrl,
String trustStorePath,
String trustStorePasswd,
String trustStoreAlgorithm,
String trustStoreType,
org.apache.http.impl.client.HttpClientBuilder underlyingHttpClientBuilder) |
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 |
reloginExpiringKeytabUser()
Relogin if login user is logged in using keytab Relogin is actually done by ugi code only if
sufficient time has passed A no-op if kerberos security is not enabled
|
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 getUser() throws IOException
IOException - if underlying Hadoop call throws LoginExceptionpublic static org.apache.kyuubi.shaded.thrift.transport.TServerSocket getServerSocket(String hiveHost, int portNum) throws org.apache.kyuubi.shaded.thrift.transport.TTransportException
org.apache.kyuubi.shaded.thrift.transport.TTransportExceptionpublic static org.apache.kyuubi.shaded.thrift.transport.TServerSocket getServerSSLSocket(String hiveHost, int portNum, String keyStorePath, String keyStorePassWord, String keyStoreType, String keyStoreAlgorithm, List<String> sslVersionBlacklist) throws org.apache.kyuubi.shaded.thrift.transport.TTransportException, UnknownHostException
org.apache.kyuubi.shaded.thrift.transport.TTransportExceptionUnknownHostExceptionpublic static org.apache.kyuubi.shaded.thrift.transport.TTransport getSSLSocket(String host, int port, int socketTimeout, int connectionTimeout, String trustStorePath, String trustStorePassWord, String trustStoreType, String trustStoreAlgorithm) throws org.apache.kyuubi.shaded.thrift.transport.TTransportException
org.apache.kyuubi.shaded.thrift.transport.TTransportExceptionpublic static org.apache.kyuubi.shaded.thrift.transport.THttpClient getThriftHttpsClient(String httpsUrl, String trustStorePath, String trustStorePasswd, String trustStoreAlgorithm, String trustStoreType, org.apache.http.impl.client.HttpClientBuilder underlyingHttpClientBuilder) throws org.apache.kyuubi.shaded.thrift.transport.TTransportException, IOException, KeyStoreException, NoSuchAlgorithmException, CertificateException, KeyManagementException
org.apache.kyuubi.shaded.thrift.transport.TTransportExceptionIOExceptionKeyStoreExceptionNoSuchAlgorithmExceptionCertificateExceptionKeyManagementExceptionpublic static void reloginExpiringKeytabUser()
throws MetaException
MetaExceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.