Package org.apache.cassandra.auth
Class MutualTlsWithPasswordFallbackAuthenticator
java.lang.Object
org.apache.cassandra.auth.PasswordAuthenticator
org.apache.cassandra.auth.MutualTlsWithPasswordFallbackAuthenticator
- All Implemented Interfaces:
AuthCache.BulkLoader<String,,String> IAuthenticator
This authenticator can be used in optional mTLS mode, If the client doesn't make an mTLS connection
this fallbacks to password authentication.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.cassandra.auth.PasswordAuthenticator
PasswordAuthenticator.CredentialsCache, PasswordAuthenticator.CredentialsCacheMBeanNested classes/interfaces inherited from interface org.apache.cassandra.auth.IAuthenticator
IAuthenticator.SaslNegotiator -
Field Summary
Fields inherited from class org.apache.cassandra.auth.PasswordAuthenticator
PASSWORD_KEY, USERNAME_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnewSaslNegotiator(InetAddress clientAddress, Certificate[] certificates) Provide a SASL handler to perform authentication for an single connection.voidsetup()Setup is called once upon system startup to initialize the IAuthenticator.Methods inherited from class org.apache.cassandra.auth.PasswordAuthenticator
bulkLoader, checkpw, getCredentialsCache, legacyAuthenticate, newSaslNegotiator, protectedResources, requireAuthentication, validateConfigurationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cassandra.auth.IAuthenticator
getAuthenticateMessage
-
Constructor Details
-
MutualTlsWithPasswordFallbackAuthenticator
-
-
Method Details
-
setup
public void setup()Description copied from interface:IAuthenticatorSetup is called once upon system startup to initialize the IAuthenticator. For example, use this method to create any required keyspaces/column families.- Specified by:
setupin interfaceIAuthenticator- Overrides:
setupin classPasswordAuthenticator
-
newSaslNegotiator
public IAuthenticator.SaslNegotiator newSaslNegotiator(InetAddress clientAddress, Certificate[] certificates) Description copied from interface:IAuthenticatorProvide a SASL handler to perform authentication for an single connection. SASL is a stateful protocol, so a new instance must be used for each authentication attempt. This method accepts certificates as well. Authentication strategies can override this method to gain access to client's certificate chain, if present.- Parameters:
clientAddress- the IP address of the client whom we wish to authenticate, or null if an internal client (one not connected over the remote transport).certificates- the peer's Certificate chain, if present. It is expected that these will all be instances ofX509Certificate, but we pass them as the baseCertificatein case future implementations leverage other certificate types.- Returns:
- org.apache.cassandra.auth.IAuthenticator.SaslNegotiator implementation
(see
PasswordAuthenticator.PlainTextSaslAuthenticator)
-