Bird
0
0

Which command correctly grants user alice permission to consume messages from the Kafka topic orders?

easy📝 Syntax Q3 of 15
Kafka - Security
Which command correctly grants user alice permission to consume messages from the Kafka topic orders?
Akafka-acls --add --allow-principal User:alice --operation Write --topic orders
Bkafka-acls --add --allow-principal alice --operation Read --topic orders
Ckafka-acls --add --allow-principal User:alice --operation Consume --topic orders
Dkafka-acls --add --allow-principal User:alice --operation Read --topic orders
Step-by-Step Solution
Solution:
  1. Step 1: Identify the principal format

    The principal must be specified as User:alice, not just alice.
  2. Step 2: Choose the correct operation

    To allow consuming messages, the operation is Read. Consume is not a valid operation.
  3. Step 3: Verify the resource type

    The resource is a topic named orders.
  4. Final Answer:

    kafka-acls --add --allow-principal User:alice --operation Read --topic orders -> Option D
  5. Quick Check:

    Principal format and operation correctness [OK]
Quick Trick: Use 'User:' and 'Read' for consuming topics [OK]
Common Mistakes:
  • Omitting 'User:' prefix in principal
  • Using invalid operation like 'Consume'
  • Granting 'Write' instead of 'Read' for consuming

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes