Class BuiltInProviderSelector
java.lang.Object
org.apache.hadoop.hbase.security.provider.BuiltInProviderSelector
- All Implemented Interfaces:
AuthenticationProviderSelector
- Direct Known Subclasses:
ShadeProviderSelector
@LimitedPrivate("Authentication")
@NotThreadSafe
public class BuiltInProviderSelector
extends Object
implements AuthenticationProviderSelector
Default implementation of
AuthenticationProviderSelector
which can choose from the
authentication implementations which HBase provides out of the box: Simple, Kerberos, and
Delegation Token authentication. This implementation will ignore any
SaslAuthenticationProvider
's which are available on the classpath or specified in the
configuration because HBase cannot correctly choose which token should be returned to a client
when multiple are present. It is expected that users implement their own
AuthenticationProviderSelector
when writing a custom provider. This implementation is not
thread-safe. configure(Configuration, Collection)
and
selectProvider(String, User)
is not safe if they are called concurrently.-
Field Summary
Modifier and TypeFieldDescription(package private) org.apache.hadoop.conf.Configuration
(package private) DigestSaslClientAuthenticationProvider
(package private) org.apache.hadoop.io.Text
(package private) GssSaslClientAuthenticationProvider
private static final org.slf4j.Logger
(package private) SimpleSaslClientAuthenticationProvider
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(org.apache.hadoop.conf.Configuration conf, Collection<SaslClientAuthenticationProvider> providers) Initializes the implementation with configuration and a set of providers available.Pair<SaslClientAuthenticationProvider,
org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier>> selectProvider
(String clusterId, User user) Chooses the authentication provider which should be used given the provided client context from the authentication providers passed in viaAuthenticationProviderSelector.configure(Configuration, Collection)
.
-
Field Details
-
LOG
-
conf
org.apache.hadoop.conf.Configuration conf -
simpleAuth
-
krbAuth
-
digestAuth
-
digestAuthTokenKind
org.apache.hadoop.io.Text digestAuthTokenKind
-
-
Constructor Details
-
BuiltInProviderSelector
public BuiltInProviderSelector()
-
-
Method Details
-
configure
public void configure(org.apache.hadoop.conf.Configuration conf, Collection<SaslClientAuthenticationProvider> providers) Description copied from interface:AuthenticationProviderSelector
Initializes the implementation with configuration and a set of providers available. This method should be called exactly once per implementation prior to callingAuthenticationProviderSelector.selectProvider(String, User)
.- Specified by:
configure
in interfaceAuthenticationProviderSelector
-
selectProvider
public Pair<SaslClientAuthenticationProvider,org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier>> selectProvider(String clusterId, User user) Description copied from interface:AuthenticationProviderSelector
Chooses the authentication provider which should be used given the provided client context from the authentication providers passed in viaAuthenticationProviderSelector.configure(Configuration, Collection)
.- Specified by:
selectProvider
in interfaceAuthenticationProviderSelector
-