@ThreadSafe public abstract class DseGssApiAuthProviderBase extends Object implements AuthProvider
Modifier and Type | Class and Description |
---|---|
protected static class |
DseGssApiAuthProviderBase.GssApiAuthenticator |
static class |
DseGssApiAuthProviderBase.GssApiOptions
The options to initialize a new authenticator.
|
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SASL_SERVICE_NAME
The default SASL service name used by this auth provider.
|
static String |
SASL_SERVICE_NAME_PROPERTY
The name of the system property to use to specify the SASL service name.
|
Modifier | Constructor and Description |
---|---|
protected |
DseGssApiAuthProviderBase(String logPrefix) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected abstract DseGssApiAuthProviderBase.GssApiOptions |
getOptions(EndPoint endPoint,
String serverAuthenticator) |
Authenticator |
newAuthenticator(EndPoint endPoint,
String serverAuthenticator)
The authenticator to use when connecting to
host . |
void |
onMissingChallenge(EndPoint endPoint)
What to do if the server does not send back an authentication challenge (in other words, lets
the client connect without any form of authentication).
|
public static final String DEFAULT_SASL_SERVICE_NAME
public static final String SASL_SERVICE_NAME_PROPERTY
protected DseGssApiAuthProviderBase(@NonNull String logPrefix)
logPrefix
- a string that will get prepended to the logs (this is used for discrimination
when you have multiple driver instances executing in the same JVM). Config-based
implementations fill this with Session.getName()
.@NonNull protected abstract DseGssApiAuthProviderBase.GssApiOptions getOptions(@NonNull EndPoint endPoint, @NonNull String serverAuthenticator)
@NonNull public Authenticator newAuthenticator(@NonNull EndPoint endPoint, @NonNull String serverAuthenticator) throws AuthenticationException
AuthProvider
host
.newAuthenticator
in interface AuthProvider
endPoint
- the Cassandra host to connect to.serverAuthenticator
- the configured authenticator on the host.AuthenticationException
public void onMissingChallenge(@NonNull EndPoint endPoint)
AuthProvider
This is suspicious because having authentication enabled on the client but not on the server is probably a configuration mistake.
Provider implementations are free to handle this however they want; typical approaches are:
AuthenticationException
to abort the connection (but note that it
will be retried according to the ReconnectionPolicy
).
onMissingChallenge
in interface AuthProvider
public void close()
close
in interface AutoCloseable
Copyright © 2017–2024. All rights reserved.