rajinisivaram commented on a change in pull request #10007: URL: https://github.com/apache/kafka/pull/10007#discussion_r568488231
########## File path: clients/src/main/java/org/apache/kafka/common/network/ChannelBuilders.java ########## @@ -129,6 +136,22 @@ private static ChannelBuilder create(SecurityProtocol securityProtocol, jaasContexts = new HashMap<>(enabledMechanisms.size()); for (String mechanism : enabledMechanisms) jaasContexts.put(mechanism, JaasContext.loadServerContext(listenerName, mechanism, configs)); + + // SSL client authentication is enabled in brokers for SASL_SSL only if listener-prefixed config is specified. + if (listenerName != null && securityProtocol == SecurityProtocol.SASL_SSL) { + String configuredClientAuth = (String) configs.get(BrokerSecurityConfigs.SSL_CLIENT_AUTH_CONFIG); + String listenerClientAuth = (String) config.originalsWithPrefix(listenerName.configPrefix(), true) + .get(BrokerSecurityConfigs.SSL_CLIENT_AUTH_CONFIG); + if (listenerClientAuth == null) { + sslClientAuthOverride = SslClientAuth.NONE.name().toLowerCase(Locale.ROOT); Review comment: We let SslFactory deal with the override since it needs to apply the override when it is reconfigured. Added a comment. Let me know what you think. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org