You want to configure a Kafka client to use SCRAM-SHA-512 authentication over SSL. Which of the following sets of properties correctly achieves this?
hard📝 Application Q8 of 15
Kafka - Security
You want to configure a Kafka client to use SCRAM-SHA-512 authentication over SSL. Which of the following sets of properties correctly achieves this?
Asecurity.protocol=SASL_PLAINTEXT, sasl.mechanism=SCRAM-SHA-512, sasl.jaas.config with valid credentials
Bsecurity.protocol=SSL, sasl.mechanism=SCRAM-SHA-512, sasl.jaas.config with valid credentials
Csecurity.protocol=SASL_SSL, sasl.mechanism=SCRAM-SHA-512, sasl.jaas.config with valid credentials
Dsecurity.protocol=PLAINTEXT, sasl.mechanism=PLAIN, sasl.jaas.config with valid credentials
Step-by-Step Solution
Solution:
Step 1: Identify protocol for SASL over SSL
To use SASL with SSL encryption, 'security.protocol' must be 'SASL_SSL'.
Step 2: Confirm SASL mechanism
SCRAM-SHA-512 is a valid SASL mechanism for Kafka.
Step 3: Validate other options
security.protocol=SSL, sasl.mechanism=SCRAM-SHA-512, sasl.jaas.config with valid credentials uses 'SSL' without SASL, so no authentication. security.protocol=SASL_PLAINTEXT, sasl.mechanism=SCRAM-SHA-512, sasl.jaas.config with valid credentials uses 'SASL_PLAINTEXT' which lacks encryption. security.protocol=PLAINTEXT, sasl.mechanism=PLAIN, sasl.jaas.config with valid credentials uses 'PLAINTEXT' and 'PLAIN' mechanism, not SCRAM-SHA-512.
Final Answer:
security.protocol=SASL_SSL, sasl.mechanism=SCRAM-SHA-512, sasl.jaas.config with valid credentials -> Option C
Quick Check:
Correct protocol and mechanism for secure SCRAM-SHA-512 [OK]
Quick Trick:Use SASL_SSL with SCRAM-SHA-512 for secure auth [OK]
Common Mistakes:
MISTAKES
Using SSL instead of SASL_SSL for authentication
Choosing PLAINTEXT protocol for secure auth
Confusing SCRAM-SHA-256 with SCRAM-SHA-512
Master "Security" in Kafka
9 interactive learning modes - each teaches the same concept differently