0
0
Kafkadevops~10 mins

Security best practices in Kafka - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to enable SSL encryption for Kafka client.

Kafka
security.protocol=[1]
Drag options to blanks, or click blank then click option'
ASSL
BPLAINTEXT
CSASL_PLAINTEXT
DSASL_SSL
Attempts:
3 left
💡 Hint
Common Mistakes
Using PLAINTEXT disables encryption.
Confusing SASL options with SSL.
2fill in blank
medium

Complete the code to configure SASL mechanism for Kafka authentication.

Kafka
sasl.mechanism=[1]
Drag options to blanks, or click blank then click option'
ANONE
BPLAIN
COAUTHBEARER
DSSL
Attempts:
3 left
💡 Hint
Common Mistakes
Using SSL as a SASL mechanism is incorrect.
Choosing NONE disables authentication.
3fill in blank
hard

Fix the error in the Kafka ACL command to allow user 'alice' to produce to topic 'orders'.

Kafka
kafka-acls --authorizer-properties zookeeper.connect=localhost:2181 --add --allow-principal User:[1] --operation Write --topic orders
Drag options to blanks, or click blank then click option'
Aadmin
Bbob
Calice
Duser
Attempts:
3 left
💡 Hint
Common Mistakes
Using a different username than 'alice'.
Confusing principal format.
4fill in blank
hard

Fill both blanks to configure Kafka broker to require client authentication and enable SSL.

Kafka
ssl.client.auth=[1]
security.protocol=[2]
Drag options to blanks, or click blank then click option'
Arequired
Bnone
CSSL
DPLAINTEXT
Attempts:
3 left
💡 Hint
Common Mistakes
Setting client auth to none disables authentication.
Using PLAINTEXT disables encryption.
5fill in blank
hard

Fill all three blanks to create a Kafka ACL that allows user 'bob' to consume from topic 'payments' with group 'payment-group'.

Kafka
kafka-acls --authorizer-properties zookeeper.connect=localhost:2181 --add --allow-principal User:[1] --operation [2] --topic payments --group [3]
Drag options to blanks, or click blank then click option'
Aalice
Bbob
CRead
Dpayment-group
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong username or operation.
Omitting the consumer group.