We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public static KafkaContainer kafka = new KafkaContainer(DockerImageName.parse(KAFKA_TEST_IMAGE)) .withNetwork(Network.newNetwork()) .withEnv("KAFKA_AUTO_CREATE_TOPICS_ENABLE", "false") .withEnv("KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND", "true") .withEnv("KAFKA_SUPER_USERS", "User:OnlySuperUser") .withEnv("KAFKA_SASL_ENABLED_MECHANISMS", "PLAIN,SASL_PLAINTEXT") .withEnv("KAFKA_SASL_JAAS_CONFIG", JAAS_CONFIG);
and I get the following error:
org.apache.kafka.common.errors.IllegalSaslStateException: Unexpected handshake request with client mechanism PLAIN, enabled mechanisms are []
The client seems to be setup fine, but the configured mechanism (PLAIN) seems like it's being ignored completely.
The text was updated successfully, but these errors were encountered:
This is an overlay or env vars to enable SASL_PLAINTEXT with TestContainer's KafkaContainer:
public KafkaContainer buildBrokerInstance() { final Map<String, String> env = new LinkedHashMap<>(); env.put("KAFKA_LISTENER_SECURITY_PROTOCOL_MAP", "BROKER:PLAINTEXT,PLAINTEXT:SASL_PLAINTEXT"); env.put("KAFKA_LISTENER_NAME_PLAINTEXT_SASL_ENABLED_MECHANISMS", "PLAIN"); env.put("KAFKA_LISTENER_NAME_PLAINTEXT_PLAIN_SASL_JAAS_CONFIG", "org.apache.kafka.common.security.plain.PlainLoginModule required " + "username=\"admin\" " + "password=\"admin-secret\" " + "user_admin=\"admin-secret\" " + "user_producer=\"producer-secret\" " + "user_consumer=\"consumer-secret\";"); env.put("KAFKA_SASL_JAAS_CONFIG", "org.apache.kafka.common.security.plain.PlainLoginModule required " + "username=\"admin\" " + "password=\"admin-secret\";"); return new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka:5.4.2")) .withEmbeddedZookeeper() .withStartupAttempts(1) .withEnv(env); }
Sorry, something went wrong.
I've added some examples demonstrating SASL with JAAS. See #7763
No branches or pull requests
and I get the following error:
The client seems to be setup fine, but the configured mechanism (PLAIN) seems like it's being ignored completely.
The text was updated successfully, but these errors were encountered: