Class MutualTlsWithPasswordFallbackAuthenticator

java.lang.Object
org.apache.cassandra.auth.PasswordAuthenticator
org.apache.cassandra.auth.MutualTlsWithPasswordFallbackAuthenticator
All Implemented Interfaces:
AuthCache.BulkLoader<String,String>, IAuthenticator

public class MutualTlsWithPasswordFallbackAuthenticator extends PasswordAuthenticator
This authenticator can be used in optional mTLS mode, If the client doesn't make an mTLS connection this fallbacks to password authentication.
  • Constructor Details

    • MutualTlsWithPasswordFallbackAuthenticator

      public MutualTlsWithPasswordFallbackAuthenticator(Map<String,String> parameters)
  • Method Details

    • setup

      public void setup()
      Description copied from interface: IAuthenticator
      Setup is called once upon system startup to initialize the IAuthenticator. For example, use this method to create any required keyspaces/column families.
      Specified by:
      setup in interface IAuthenticator
      Overrides:
      setup in class PasswordAuthenticator
    • newSaslNegotiator

      public IAuthenticator.SaslNegotiator newSaslNegotiator(InetAddress clientAddress, Certificate[] certificates)
      Description copied from interface: IAuthenticator
      Provide 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 of X509Certificate, but we pass them as the base Certificate in case future implementations leverage other certificate types.
      Returns:
      org.apache.cassandra.auth.IAuthenticator.SaslNegotiator implementation (see PasswordAuthenticator.PlainTextSaslAuthenticator)