After trying to debug why kafka was throwing this error when trying to enable sasl auth without using sasl auth for zookeeper:

[2022-07-20 23:11:18,655] WARN SASL configuration failed: javax.security.auth.login.LoginException: No JAAS configuration section named 'Client' was found in specified JAAS configuration file: '/data/server/jaas.conf'. Will continue connection to Zookeeper server without SASL authentication, if Zookeeper server allows it. (org.apache.zookeeper.ClientCnxn)
[2022-07-20 23:11:18,671] ERROR [ZooKeeperClient] Auth failed. (kafka.zookeeper.ZooKeeperClient)

Turns out you can disable this check and squash the error by setting zookeeper.sasl.client=false. However, if you’re using wurstmeister/kafka docker image setting KAFKA_ZOOKEEPER_SASL_CLIENT: false environment variable doesn’t work. For some reason it needs to be a system property KAFKA_OPTS: '-Dzookeeper.sasl.client=false'.