Challenge - 5 Problems
Kafka Security Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
What is the output of this Kafka ACL command?
Consider the following Kafka ACL command to allow a user to produce to a topic:
What will be the result when Alice tries to produce messages to the topic
kafka-acls --authorizer-properties zookeeper.connect=localhost:2181 --add --allow-principal User:Alice --operation Write --topic sales-data
What will be the result when Alice tries to produce messages to the topic
sales-data?Kafka
kafka-acls --authorizer-properties zookeeper.connect=localhost:2181 --add --allow-principal User:Alice --operation Write --topic sales-dataAttempts:
2 left
💡 Hint
Think about what the --operation Write permission allows.
✗ Incorrect
The command explicitly grants Alice the Write operation on the topic sales-data, so she can produce messages to it.
🧠 Conceptual
intermediate1:30remaining
Which Kafka security feature encrypts data in transit?
Kafka supports several security features. Which one specifically ensures that data sent between clients and brokers is encrypted to prevent eavesdropping?
Attempts:
2 left
💡 Hint
Encryption protects data while it moves over the network.
✗ Incorrect
SSL/TLS encrypts data in transit, protecting it from being read by unauthorized parties.
🔧 Debug
advanced2:30remaining
Why does this Kafka client fail to authenticate?
A Kafka client configured with SASL/PLAIN authentication fails to connect to the broker. The client config snippet is:
The broker expects username "user1" with password "correctpass".
What is the cause of the failure?
security.protocol=SASL_PLAINTEXT sasl.mechanism=PLAIN sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="user1" password="wrongpass";
The broker expects username "user1" with password "correctpass".
What is the cause of the failure?
Attempts:
2 left
💡 Hint
Check the username and password values carefully.
✗ Incorrect
The client provides the wrong password, so the broker rejects the authentication.
📝 Syntax
advanced2:00remaining
Which Kafka ACL command syntax correctly removes all ACLs for a user?
You want to remove all ACLs for user Bob. Which command is syntactically correct?
Attempts:
2 left
💡 Hint
The correct flag to remove ACLs is --remove and the principal must be specified correctly.
✗ Incorrect
Option B uses the correct --remove flag and specifies the principal as User:Bob, which is the correct syntax.
🚀 Application
expert3:00remaining
How to securely configure Kafka brokers for multi-tenant environment?
You manage a Kafka cluster used by multiple teams. You want to ensure:
1. Each team can only access their own topics.
2. Data in transit is encrypted.
3. Clients authenticate securely.
Which combination of Kafka security features should you enable?
1. Each team can only access their own topics.
2. Data in transit is encrypted.
3. Clients authenticate securely.
Which combination of Kafka security features should you enable?
Attempts:
2 left
💡 Hint
Think about encryption, authentication, and authorization all together.
✗ Incorrect
To secure a multi-tenant Kafka cluster, you need encryption (SSL), authentication (SASL), and authorization (ACLs) to restrict access.