tolbertam commented on code in PR #3602:
URL: https://github.com/apache/cassandra/pull/3602#discussion_r1793797466
##########
src/java/org/apache/cassandra/auth/IAuthenticator.java:
##########
@@ -54,6 +57,17 @@ public interface IAuthenticator
*/
void setup();
+ /**
+ * Allows custom authenticators to return a {@link AuthenticateMessage}
with a known
+ * authenticator implementation (e.g.
"com.datastax.bdp.cassandra.auth.DseAuthenticator"
+ * which enables SASL scheme negotiation) based on {@link Connection} and
{@link ClientState}
+ * information.
+ */
+ default AuthenticateMessage getAuthenticateMessage(Connection connection,
ClientState clientState)
Review Comment:
Thank you for considering my use case! One thing I have been thinking about
is I think we probably only need one of these parameters, but I'm not sure
which.
* I've noticed that in this context, we're always dealing with a
`ServerConnection` object (there's quite a bit of casting in other classes to
inspect `ServerConnection`) that `ServerConnection` itself has a
`getClientState()`. So that could be an argument for just passing only a
`ServerConnection` instance.
* `ClientState` itself could have everything we might want to inspect, and
if it doesn't we could add to it (e.g. we could later add a
`hasClientCertificates()` or something to this to meet my use case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]