Class KerberosFactory
java.lang.Object
org.apache.drill.exec.rpc.security.kerberos.KerberosFactory
- All Implemented Interfaces:
AutoCloseable
,AuthenticatorFactory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
org.apache.hadoop.security.UserGroupInformation
createAndLoginUser
(Map<String, ?> properties) Create and get the login user based on the given properties.createSaslClient
(org.apache.hadoop.security.UserGroupInformation ugi, Map<String, ?> properties) The caller is responsible fordisposing
the returned SaslClient.createSaslServer
(org.apache.hadoop.security.UserGroupInformation ugi, Map<String, ?> properties) The caller is responsible fordisposing
the returned SaslServer.Name of the mechanism, in upper case.
-
Constructor Details
-
KerberosFactory
public KerberosFactory()
-
-
Method Details
-
getSimpleName
Description copied from interface:AuthenticatorFactory
Name of the mechanism, in upper case. If this mechanism is present in the list of enabled mechanisms, an instance of this factory is loaded. Note that the simple name maybe the same as it's SASL name.- Specified by:
getSimpleName
in interfaceAuthenticatorFactory
- Returns:
- mechanism name
-
createAndLoginUser
public org.apache.hadoop.security.UserGroupInformation createAndLoginUser(Map<String, ?> properties) throws IOExceptionDescription copied from interface:AuthenticatorFactory
Create and get the login user based on the given properties.- Specified by:
createAndLoginUser
in interfaceAuthenticatorFactory
- Parameters:
properties
- config properties- Returns:
- ugi
- Throws:
IOException
-
createSaslServer
public SaslServer createSaslServer(org.apache.hadoop.security.UserGroupInformation ugi, Map<String, ?> properties) throws SaslExceptionDescription copied from interface:AuthenticatorFactory
The caller is responsible fordisposing
the returned SaslServer.- Specified by:
createSaslServer
in interfaceAuthenticatorFactory
- Parameters:
ugi
- ugiproperties
- config properties- Returns:
- sasl server
- Throws:
SaslException
-
createSaslClient
public SaslClient createSaslClient(org.apache.hadoop.security.UserGroupInformation ugi, Map<String, ?> properties) throws SaslExceptionDescription copied from interface:AuthenticatorFactory
The caller is responsible fordisposing
the returned SaslClient.- Specified by:
createSaslClient
in interfaceAuthenticatorFactory
- Parameters:
ugi
- ugiproperties
- config properties- Returns:
- sasl client
- Throws:
SaslException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-