Bird
0
0

You have this Kafka client config:

medium📝 Debug Q14 of 15
Kafka - Security
You have this Kafka client config:
props.put("security.protocol", "SASL_PLAINTEXT");
props.put("sasl.mechanism", "PLAIN");
props.put("sasl.jaas.config", "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"admin\" password=\"admin123\";");

The client fails to authenticate. What is the most likely cause?
ABroker does not support SASL_PLAINTEXT
BIncorrect sasl.mechanism value
CWrong format in sasl.jaas.config string
DMissing SSL configuration causes failure
Step-by-Step Solution
Solution:
  1. Step 1: Check security.protocol compatibility

    SASL_PLAINTEXT means SASL without encryption. Many brokers disable this for security reasons.
  2. Step 2: Consider broker support

    If the broker is configured to reject SASL_PLAINTEXT connections, authentication will fail even if credentials and mechanism are correct.
  3. Final Answer:

    Broker does not support SASL_PLAINTEXT -> Option A
  4. Quick Check:

    Broker must allow SASL_PLAINTEXT [OK]
Quick Trick: Check if broker allows SASL_PLAINTEXT connections [OK]
Common Mistakes:
MISTAKES
  • Assuming SSL is required for SASL_PLAINTEXT
  • Misformatting sasl.jaas.config string
  • Using wrong sasl.mechanism value

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes