Bird
0
0

You have configured your Kafka client as follows:

medium📝 Debug Q6 of 15
Kafka - Security
You have configured your Kafka client as follows:
props.put("security.protocol", "SASL_SSL");
props.put("sasl.mechanism", "SCRAM-SHA-256");
props.put("sasl.jaas.config", "org.apache.kafka.common.security.scram.ScramLoginModule required username=\"user1\" password=\"wrongpass\";");

The client fails to authenticate. What is the most likely cause?
AWrong 'security.protocol' value
BMissing 'ssl.truststore.location' property
CIncorrect password in sasl.jaas.config
DUnsupported SASL mechanism
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the configuration

    The client uses SASL_SSL with SCRAM-SHA-256 and provides a username and password.
  2. Step 2: Identify failure reason

    Authentication failure usually indicates invalid credentials.
  3. Step 3: Check other options

    SSL properties missing would cause SSL handshake failure, not authentication failure. The protocol and mechanism are correct.
  4. Final Answer:

    Incorrect password in sasl.jaas.config -> Option C
  5. Quick Check:

    Authentication fails due to bad credentials [OK]
Quick Trick: Authentication failure usually means bad username/password [OK]
Common Mistakes:
  • Assuming SSL truststore missing causes auth failure
  • Confusing protocol and mechanism settings

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes