title: Kafka loading SASL callback handling class but not using it
body: <p>I am trying to implement OAUTHBEARER as the SASL mechanism. Part of that is I need to override both the server and login callback handler classes. I am using docker and thus setting them via the environment variables:</p>
  <p>KAFKA_LISTENER_NAME_OUTSIDE_OAUTHBEARER_SASL_SERVER_CALLBACK_HANDLER_CLASS=[class_name]</p>
  <p>What is odd is that it clearly is loading the designated class as I am handily doing a <code>log.warn(&quot;ctor...&quot;)</code> in the constructor of said classes. But the stacktrace shows that it is not calling the <code>handle</code> method of the supplied class, but instead AbstractLogin$DefaultLoginHandler class:</p>
  <p><code>[2021-11-23 17:41:57,137] WARN OAuthAuthenticateValidatorCallbackHandler - ctor: v1.1 (com.oauth2.security.oauthbearer.OAuthAuthenticateValidatorCallbackHandler) [2021-11-23 17:41:57,153] ERROR Unrecognized SASL Login callback (org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule) javax.security.auth.callback.UnsupportedCallbackException: Unrecognized SASL Login callback at org.apache.kafka.common.security.authenticator.AbstractLogin$DefaultLoginCallbackHandler.handle(AbstractLogin.java:105) at org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule.identifyToken(OAuthBearerLoginModule.java:316)</code></p>
  <p>Is there any suggestions as to why it is loading the handler class but not using it? If I simply remove the environment variables for both LOGIN/SERVER_CALLBACK_HANDLER_CLASS, same Exception but without the WARN proving that the class was loaded. One possibility that I can't really reconcile with is that the stacktrace seems to refer to a LoginCallbackHandler but the class invoked is the Server/ValidatorCallbackHandler; as if it wasn't able to load the login callback handler and only the Validator callback handler, but I have double checked that a) the environment variables pertain to the correct class name (login==Login &amp;&amp; server==Validator) and that the class names are indeed correct.</p>