Skip to content

Commit

Permalink
Stop advertising Aiven custom authenticator
Browse files Browse the repository at this point in the history
We decorate standard PasswordAuthenticator with a few platform specific
features, that don't change the externally observable behavior - so it's
absolutely compatible with PasswordAuthenticator.

A few tools and client libraries do not support custom authenticators.
For example: ZDM Proxy. They fail whenever they see anything but
PasswordAuthenticator nevertheless they are in fact completely
compatible.

So we want to stop advertising our custom authenticator and pretend that
it's a standard PasswordAuthenticator.
  • Loading branch information
meatlink authored and tilman-aiven committed Jun 19, 2024
1 parent 6076e0e commit 322b382
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,12 @@ else if (compression.equals("lz4"))
clientState.setDriverVersion(options.get(DRIVER_VERSION));
}

if (DatabaseDescriptor.getAuthenticator().requireAuthentication())
return new AuthenticateMessage(DatabaseDescriptor.getAuthenticator().getClass().getName());
if (DatabaseDescriptor.getAuthenticator().requireAuthentication()) {
String authenticatorClassName = DatabaseDescriptor.getAuthenticator().getClass().getName();
if (authenticatorClassName.equals("io.aiven.cassandra.auth.AivenAuthenticator"))
authenticatorClassName = "org.apache.cassandra.auth.PasswordAuthenticator";
return new AuthenticateMessage(authenticatorClassName);
}
else
return new ReadyMessage();
}
Expand Down

0 comments on commit 322b382

Please sign in to comment.