@InterfaceAudience.LimitedPrivate(value="Authentication") @InterfaceStability.Evolving public final class SaslClientAuthenticationProviders extends Object
Modifier and Type | Field and Description |
---|---|
static String |
EXTRA_PROVIDERS_KEY |
private static org.slf4j.Logger |
LOG |
private Collection<SaslClientAuthenticationProvider> |
providers |
private static AtomicReference<SaslClientAuthenticationProviders> |
providersRef |
private AuthenticationProviderSelector |
selector |
static String |
SELECTOR_KEY |
Modifier | Constructor and Description |
---|---|
private |
SaslClientAuthenticationProviders(Collection<SaslClientAuthenticationProvider> providers,
AuthenticationProviderSelector selector) |
Modifier and Type | Method and Description |
---|---|
(package private) static void |
addExplicitProviders(org.apache.hadoop.conf.Configuration conf,
HashMap<Byte,SaslClientAuthenticationProvider> providers)
Extracts and instantiates authentication providers from the configuration.
|
(package private) static void |
addProviderIfNotExists(SaslClientAuthenticationProvider provider,
HashMap<Byte,SaslClientAuthenticationProvider> providers)
Adds the given
provider to the set, only if an equivalent provider does not already
exist in the set. |
static SaslClientAuthenticationProviders |
getInstance(org.apache.hadoop.conf.Configuration conf)
Returns a singleton instance of
SaslClientAuthenticationProviders . |
int |
getNumRegisteredProviders()
Returns the number of providers that have been registered.
|
Pair<SaslClientAuthenticationProvider,org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier>> |
getSimpleProvider()
Returns the provider and token pair for SIMPLE authentication.
|
(package private) static SaslClientAuthenticationProviders |
instantiate(org.apache.hadoop.conf.Configuration conf)
Instantiates all client authentication providers and returns an instance of
SaslClientAuthenticationProviders . |
(package private) static AuthenticationProviderSelector |
instantiateSelector(org.apache.hadoop.conf.Configuration conf,
Collection<SaslClientAuthenticationProvider> providers)
Instantiates the ProviderSelector implementation from the provided configuration.
|
static void |
reset()
Removes the cached singleton instance of
SaslClientAuthenticationProviders . |
Pair<SaslClientAuthenticationProvider,org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier>> |
selectProvider(String clusterId,
User clientUser)
Chooses the best authentication provider and corresponding token given the HBase cluster
identifier and the user.
|
String |
toString() |
private static final org.slf4j.Logger LOG
public static final String SELECTOR_KEY
public static final String EXTRA_PROVIDERS_KEY
private static final AtomicReference<SaslClientAuthenticationProviders> providersRef
private final Collection<SaslClientAuthenticationProvider> providers
private final AuthenticationProviderSelector selector
private SaslClientAuthenticationProviders(Collection<SaslClientAuthenticationProvider> providers, AuthenticationProviderSelector selector)
public int getNumRegisteredProviders()
public static SaslClientAuthenticationProviders getInstance(org.apache.hadoop.conf.Configuration conf)
SaslClientAuthenticationProviders
.public static void reset()
SaslClientAuthenticationProviders
.static void addProviderIfNotExists(SaslClientAuthenticationProvider provider, HashMap<Byte,SaslClientAuthenticationProvider> providers)
provider
to the set, only if an equivalent provider does not already
exist in the set.static AuthenticationProviderSelector instantiateSelector(org.apache.hadoop.conf.Configuration conf, Collection<SaslClientAuthenticationProvider> providers)
static void addExplicitProviders(org.apache.hadoop.conf.Configuration conf, HashMap<Byte,SaslClientAuthenticationProvider> providers)
static SaslClientAuthenticationProviders instantiate(org.apache.hadoop.conf.Configuration conf)
SaslClientAuthenticationProviders
.public Pair<SaslClientAuthenticationProvider,org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier>> getSimpleProvider()
public Pair<SaslClientAuthenticationProvider,org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier>> selectProvider(String clusterId, User clientUser)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.