Challenge - 5 Problems
Kafka ACL 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?
Given the following Kafka ACL command, what will be the result when trying to produce to topic 'orders' as user 'alice'?
Kafka
kafka-acls --authorizer-properties zookeeper.connect=localhost:2181 \
--add --allow-principal User:alice --operation Write --topic ordersAttempts:
2 left
💡 Hint
The command explicitly grants write permission to Alice on the 'orders' topic.
✗ Incorrect
The command adds an ACL that allows user 'alice' to perform the Write operation on the 'orders' topic. This means Alice can produce messages to that topic.
❓ Predict Output
intermediate2:00remaining
What error occurs with this ACL command?
What error will this command produce when executed?
Kafka
kafka-acls --authorizer-properties zookeeper.connect=localhost:2181 \
--add --allow-principal User:bob --operation Read --topicAttempts:
2 left
💡 Hint
Check if all required arguments are provided.
✗ Incorrect
The command is missing the topic name after --topic, so it will fail with a missing argument error.
🔧 Debug
advanced3:00remaining
Why does this ACL not allow user 'carol' to consume?
User 'carol' cannot consume from topic 'payments' despite this ACL. Identify the issue.
Kafka
kafka-acls --authorizer-properties zookeeper.connect=localhost:2181 \
--add --allow-principal User:carol --operation Write --topic paymentsAttempts:
2 left
💡 Hint
Check the operation type granted by the ACL.
✗ Incorrect
The ACL grants only Write permission, which allows producing messages. To consume, Read permission is required.
🧠 Conceptual
advanced3:00remaining
What is the effect of this ACL wildcard?
What does this ACL command do?
Kafka
kafka-acls --authorizer-properties zookeeper.connect=localhost:2181 \ --add --allow-principal User:dave --operation Read --topic '*'
Attempts:
2 left
💡 Hint
The '*' wildcard matches all topics.
✗ Incorrect
Using '*' as the topic name grants the permission on all topics in the cluster.
❓ Predict Output
expert4:00remaining
How many ACL entries exist after these commands?
After running these commands, how many ACL entries are present for user 'eve'?
Kafka
kafka-acls --authorizer-properties zookeeper.connect=localhost:2181 --add --allow-principal User:eve --operation Read --topic logs kafka-acls --authorizer-properties zookeeper.connect=localhost:2181 --add --allow-principal User:eve --operation Write --topic logs kafka-acls --authorizer-properties zookeeper.connect=localhost:2181 --remove --allow-principal User:eve --operation Read --topic logs
Attempts:
2 left
💡 Hint
Removing an ACL deletes only the specified permission.
✗ Incorrect
The Read permission ACL was removed, leaving only the Write permission ACL for user 'eve' on 'logs'.