Bird
0
0

Examine this Kafka client configuration snippet:

medium📝 Debug Q6 of 15
Kafka - Security
Examine this Kafka client configuration snippet:
security.protocol=SASL_SSL
sasl.mechanism=PLAIN
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="user" password="pass";

What is missing or incorrect in this configuration?
AThe sasl.jaas.config string is missing a semicolon at the end.
BThe security.protocol should be set to PLAINTEXT for SASL PLAIN.
CThe sasl.mechanism should be set to SCRAM-SHA-256 instead of PLAIN.
DThe username and password should not be enclosed in quotes.
Step-by-Step Solution
Solution:
  1. Step 1: Review sasl.jaas.config syntax

    The JAAS config string must end with a semicolon to be valid.
  2. Step 2: Check security.protocol and sasl.mechanism

    security.protocol=SASL_SSL and sasl.mechanism=PLAIN are valid combinations.
  3. Step 3: Validate username and password format

    Username and password should be enclosed in quotes as shown.
  4. Final Answer:

    The missing semicolon at the end of sasl.jaas.config causes the error. -> Option A
  5. Quick Check:

    JAAS config strings require semicolons [OK]
Quick Trick: Always end sasl.jaas.config with a semicolon [OK]
Common Mistakes:
  • Omitting the semicolon at the end of sasl.jaas.config
  • Using PLAINTEXT instead of SASL_SSL for encrypted connections
  • Incorrect sasl.mechanism for the intended authentication
  • Not quoting username or password properly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes