Bird
0
0

Given this Kafka client config snippet:

medium📝 Predict Output Q4 of 15
Kafka - Security
Given this Kafka client config snippet:
security.protocol=SASL_SSL
sasl.mechanism=SCRAM-SHA-256
sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="user" password="pass";

What will happen when the client tries to connect?
AClient will connect without authentication due to missing security.protocol
BClient will authenticate using SCRAM over SSL successfully if credentials are correct
CClient will fail because sasl.jaas.config is missing required SSL settings
DClient will use PLAINTEXT protocol ignoring SASL settings
Step-by-Step Solution
Solution:
  1. Step 1: Analyze security.protocol and sasl.mechanism

    security.protocol=SASL_SSL means client uses SASL authentication over SSL. sasl.mechanism=SCRAM-SHA-256 specifies SCRAM method.
  2. Step 2: Check sasl.jaas.config correctness

    The sasl.jaas.config provides the login module with username and password, enabling authentication.
  3. Final Answer:

    Client will authenticate using SCRAM over SSL successfully if credentials are correct -> Option B
  4. Quick Check:

    SASL_SSL with SCRAM and JAAS config = successful auth [OK]
Quick Trick: SASL_SSL + sasl.jaas.config enables secure SCRAM auth [OK]
Common Mistakes:
MISTAKES
  • Assuming SSL settings are missing in sasl.jaas.config
  • Ignoring security.protocol setting
  • Confusing PLAINTEXT with SASL_SSL

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes