0
0
Kafkadevops~20 mins

ACL-based authorization in Kafka - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Kafka ACL Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2: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 orders
AThe command will fail due to missing consumer permission.
BAlice will get a 'Not authorized' error when producing to 'orders'.
CAlice can produce messages to the 'orders' topic successfully.
DThe ACL will allow Alice to consume but not produce to 'orders'.
Attempts:
2 left
💡 Hint
The command explicitly grants write permission to Alice on the 'orders' topic.
Predict Output
intermediate
2: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 --topic
AError: Missing topic name argument.
BError: Invalid principal format.
CError: Unknown operation 'Read'.
DNo error, ACL added successfully.
Attempts:
2 left
💡 Hint
Check if all required arguments are provided.
🔧 Debug
advanced
3: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 payments
AThe ACL only grants Write permission, not Read, so Carol cannot consume.
BThe principal format 'User:carol' is incorrect.
CZookeeper connection string is invalid.
DThe topic name 'payments' is misspelled.
Attempts:
2 left
💡 Hint
Check the operation type granted by the ACL.
🧠 Conceptual
advanced
3: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 '*'
AAllows user 'dave' to read only from a topic literally named '*'.
BAllows user 'dave' to read from all topics.
CDenies user 'dave' from reading any topic.
DCauses a syntax error due to invalid wildcard usage.
Attempts:
2 left
💡 Hint
The '*' wildcard matches all topics.
Predict Output
expert
4: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
AThree ACL entries exist including the removed one.
BTwo ACL entries remain: Read and Write permissions on 'logs'.
CNo ACL entries remain for user 'eve'.
DOne ACL entry remains: Write permission on 'logs' for user 'eve'.
Attempts:
2 left
💡 Hint
Removing an ACL deletes only the specified permission.