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 committed Sep 14, 2023
1 parent fbf6514 commit 9702cc3
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,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 9702cc3

Please sign in to comment.