Search in sources :

Example 6 with AuthenticateCallbackHandler

use of org.apache.kafka.common.security.auth.AuthenticateCallbackHandler in project kafka by apache.

the class SaslChannelBuilder method createClientCallbackHandler.

private void createClientCallbackHandler(Map<String, ?> configs) {
    @SuppressWarnings("unchecked") Class<? extends AuthenticateCallbackHandler> clazz = (Class<? extends AuthenticateCallbackHandler>) configs.get(SaslConfigs.SASL_CLIENT_CALLBACK_HANDLER_CLASS);
    if (clazz == null)
        clazz = clientCallbackHandlerClass();
    AuthenticateCallbackHandler callbackHandler = Utils.newInstance(clazz);
    saslCallbackHandlers.put(clientSaslMechanism, callbackHandler);
}
Also used : AuthenticateCallbackHandler(org.apache.kafka.common.security.auth.AuthenticateCallbackHandler)

Aggregations

AuthenticateCallbackHandler (org.apache.kafka.common.security.auth.AuthenticateCallbackHandler)6 Subject (javax.security.auth.Subject)4 HashMap (java.util.HashMap)2 Map (java.util.Map)2 ListenerName (org.apache.kafka.common.network.ListenerName)2 ApiVersionsResponse (org.apache.kafka.common.requests.ApiVersionsResponse)2 JaasContext (org.apache.kafka.common.security.JaasContext)2 IOException (java.io.IOException)1 InetSocketAddress (java.net.InetSocketAddress)1 PrivilegedActionException (java.security.PrivilegedActionException)1 PrivilegedExceptionAction (java.security.PrivilegedExceptionAction)1 List (java.util.List)1 SaslException (javax.security.sasl.SaslException)1 KafkaException (org.apache.kafka.common.KafkaException)1 SaslChannelBuilder (org.apache.kafka.common.network.SaslChannelBuilder)1 TransportLayer (org.apache.kafka.common.network.TransportLayer)1 LoginManager (org.apache.kafka.common.security.authenticator.LoginManager)1 SaslServerCallbackHandler (org.apache.kafka.common.security.authenticator.SaslServerCallbackHandler)1 OAuthBearerUnsecuredValidatorCallbackHandler (org.apache.kafka.common.security.oauthbearer.internals.unsecured.OAuthBearerUnsecuredValidatorCallbackHandler)1 PlainLoginModule (org.apache.kafka.common.security.plain.PlainLoginModule)1