Class GssSaslClientAuthenticationProvider
java.lang.Object
org.apache.hadoop.hbase.security.provider.BuiltInSaslAuthenticationProvider
org.apache.hadoop.hbase.security.provider.GssSaslAuthenticationProvider
org.apache.hadoop.hbase.security.provider.GssSaslClientAuthenticationProvider
- All Implemented Interfaces:
SaslAuthenticationProvider
,SaslClientAuthenticationProvider
@Private
public class GssSaslClientAuthenticationProvider
extends GssSaslAuthenticationProvider
implements SaslClientAuthenticationProvider
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.security.provider.GssSaslAuthenticationProvider
SASL_AUTH_METHOD
Fields inherited from class org.apache.hadoop.hbase.security.provider.BuiltInSaslAuthenticationProvider
AUTH_TOKEN_TYPE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canRetry()
Returns true if the implementation is capable of performing some action which may allow a failed authentication to become a successful authentication.createClient
(org.apache.hadoop.conf.Configuration conf, InetAddress serverAddr, String serverPrincipal, org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> token, boolean fallbackAllowed, Map<String, String> saslProps) Create the SASL client instance for this authentication method.org.apache.hadoop.security.UserGroupInformation
getRealUser
(User user) Returns the "real" user, the user who has the credentials being authenticated by the remote service, in the form of anUserGroupInformation
object.org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.UserInformation
getUserInfo
(User user) Constructs aRPCProtos.UserInformation
from the givenUserGroupInformation
void
relogin()
Executes any necessary logic to re-login the client.Methods inherited from class org.apache.hadoop.hbase.security.provider.GssSaslAuthenticationProvider
getSaslAuthMethod
Methods inherited from class org.apache.hadoop.hbase.security.provider.BuiltInSaslAuthenticationProvider
createSaslAuthMethod, getTokenKind
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.security.provider.SaslAuthenticationProvider
getSaslAuthMethod, getTokenKind
Methods inherited from interface org.apache.hadoop.hbase.security.provider.SaslClientAuthenticationProvider
createClient
-
Field Details
-
LOG
-
-
Constructor Details
-
GssSaslClientAuthenticationProvider
public GssSaslClientAuthenticationProvider()
-
-
Method Details
-
createClient
public SaslClient createClient(org.apache.hadoop.conf.Configuration conf, InetAddress serverAddr, String serverPrincipal, org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> token, boolean fallbackAllowed, Map<String, String> saslProps) throws IOExceptionDescription copied from interface:SaslClientAuthenticationProvider
Create the SASL client instance for this authentication method.The default implementation is create a fake
SecurityInfo
and call the above method, for keeping compatible with old customized authentication method- Specified by:
createClient
in interfaceSaslClientAuthenticationProvider
- Throws:
IOException
-
getUserInfo
public org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.UserInformation getUserInfo(User user) Description copied from interface:SaslClientAuthenticationProvider
Constructs aRPCProtos.UserInformation
from the givenUserGroupInformation
- Specified by:
getUserInfo
in interfaceSaslClientAuthenticationProvider
-
canRetry
Description copied from interface:SaslClientAuthenticationProvider
Returns true if the implementation is capable of performing some action which may allow a failed authentication to become a successful authentication. Otherwise, returns false- Specified by:
canRetry
in interfaceSaslClientAuthenticationProvider
-
relogin
Description copied from interface:SaslClientAuthenticationProvider
Executes any necessary logic to re-login the client. Not all implementations will have any logic that needs to be executed.- Specified by:
relogin
in interfaceSaslClientAuthenticationProvider
- Throws:
IOException
-
getRealUser
Description copied from interface:SaslClientAuthenticationProvider
Returns the "real" user, the user who has the credentials being authenticated by the remote service, in the form of anUserGroupInformation
object. It is common in the Hadoop "world" to have distinct notions of a "real" user and a "proxy" user. A "real" user is the user which actually has the credentials (often, a Kerberos ticket), but some code may be running as some other user who has no credentials. This method gives the authentication provider a chance to acknowledge this is happening and ensure that any RPCs are executed with the real user's credentials, because executing them as the proxy user would result in failure because no credentials exist to authenticate the RPC. Not all implementations will need to implement this method. By default, the provided User's UGI is returned directly.- Specified by:
getRealUser
in interfaceSaslClientAuthenticationProvider
-