Class SaslClientAuthenticationProviders
java.lang.Object
org.apache.hadoop.hbase.security.provider.SaslClientAuthenticationProviders
@LimitedPrivate("Authentication")
@Evolving
public final class SaslClientAuthenticationProviders
extends Object
Accessor for all SaslAuthenticationProvider instances.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprivate static final org.slf4j.Loggerprivate static final AtomicReference<SaslClientAuthenticationProviders>private final Collection<SaslClientAuthenticationProvider>private final AuthenticationProviderSelectorstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionSaslClientAuthenticationProviders(org.apache.hadoop.conf.Configuration conf) Creates a new instance of SaslClientAuthenticationProviders. -
Method Summary
Modifier and TypeMethodDescription(package private) static voidaddExplicitProviders(org.apache.hadoop.conf.Configuration conf, HashMap<Byte, SaslClientAuthenticationProvider> providers) Extracts and instantiates authentication providers from the configuration.(package private) static voidaddProviderIfNotExists(SaslClientAuthenticationProvider provider, HashMap<Byte, SaslClientAuthenticationProvider> providers) Adds the givenproviderto the set, only if an equivalent provider does not already exist in the set.getInstance(org.apache.hadoop.conf.Configuration conf) Deprecated.Since 2.5.14 and 2.6.4, will be removed in newer minor release lines.intReturns the number of providers that have been registered.Pair<SaslClientAuthenticationProvider,org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier>> Returns the provider and token pair for SIMPLE authentication.private static AuthenticationProviderSelectorinstantiateSelector(org.apache.hadoop.conf.Configuration conf, Collection<SaslClientAuthenticationProvider> providers) Instantiates the ProviderSelector implementation from the provided configuration.static voidreset()Deprecated.Since 2.5.14 and 2.6.4, will be removed in newer minor release lines.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.toString()
-
Field Details
-
LOG
-
SELECTOR_KEY
- See Also:
-
EXTRA_PROVIDERS_KEY
- See Also:
-
PROVIDER_REF
-
providers
-
selector
-
-
Constructor Details
-
SaslClientAuthenticationProviders
Creates a new instance of SaslClientAuthenticationProviders.- Parameters:
conf- the configuration to use for loading providers and selector
-
-
Method Details
-
getNumRegisteredProviders
Returns the number of providers that have been registered. -
getInstance
@Deprecated public static SaslClientAuthenticationProviders getInstance(org.apache.hadoop.conf.Configuration conf) Deprecated.Since 2.5.14 and 2.6.4, will be removed in newer minor release lines. This class should not be singleton, please do not use it any more. see HBASE-29144 for more details.Returns a singleton instance ofSaslClientAuthenticationProviders. -
reset
Deprecated.Since 2.5.14 and 2.6.4, will be removed in newer minor release lines. This class should not be singleton, please do not use it any more. see HBASE-29144 for more details.Removes the cached singleton instance ofSaslClientAuthenticationProviders. -
addProviderIfNotExists
static void addProviderIfNotExists(SaslClientAuthenticationProvider provider, HashMap<Byte, SaslClientAuthenticationProvider> providers) Adds the givenproviderto the set, only if an equivalent provider does not already exist in the set. -
instantiateSelector
private static AuthenticationProviderSelector instantiateSelector(org.apache.hadoop.conf.Configuration conf, Collection<SaslClientAuthenticationProvider> providers) Instantiates the ProviderSelector implementation from the provided configuration. -
addExplicitProviders
static void addExplicitProviders(org.apache.hadoop.conf.Configuration conf, HashMap<Byte, SaslClientAuthenticationProvider> providers) Extracts and instantiates authentication providers from the configuration. -
getSimpleProvider
public 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. This method is a "hack" while SIMPLE authentication for HBase does not flow through the SASL codepath. -
selectProvider
public 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. -
toString
-