From aee21e5690d016705a94a8b9f9779f7b3357865b Mon Sep 17 00:00:00 2001 From: Ning Yu Date: Tue, 29 Oct 2024 12:11:11 +0800 Subject: [PATCH] fix(sasl): fix sasl configs Signed-off-by: Ning Yu --- .../org/apache/kafka/common/network/SaslChannelBuilder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clients/src/main/java/org/apache/kafka/common/network/SaslChannelBuilder.java b/clients/src/main/java/org/apache/kafka/common/network/SaslChannelBuilder.java index c5f2968065..9c8b8beff9 100644 --- a/clients/src/main/java/org/apache/kafka/common/network/SaslChannelBuilder.java +++ b/clients/src/main/java/org/apache/kafka/common/network/SaslChannelBuilder.java @@ -320,7 +320,8 @@ private void createServerCallbackHandlers(Map configs) { AuthenticateCallbackHandler callbackHandler; String prefix = ListenerName.saslMechanismPrefix(mechanism); @SuppressWarnings("unchecked") - Class clazz = (Class) configs.get(SaslConfigs.SASL_CLIENT_CALLBACK_HANDLER_CLASS); + Class clazz = + (Class) configs.get(prefix + BrokerSecurityConfigs.SASL_SERVER_CALLBACK_HANDLER_CLASS_CONFIG); // AutoMQ inject start if (clazz != null) { if (Utils.hasConstructor(clazz, SaslChannelBuilder.class)) {