0
0
Kafkadevops~30 mins

Encryption at rest in Kafka - Mini Project: Build & Apply

Choose your learning style9 modes available
Encryption at rest with Kafka
📖 Scenario: You are setting up a Kafka topic to securely store messages by enabling encryption at rest. This means the data saved on disk will be encrypted to protect it from unauthorized access.
🎯 Goal: You will configure a Kafka topic with encryption at rest enabled by setting the correct configuration properties.
📋 What You'll Learn
Create a Kafka topic configuration dictionary with the exact name topic_config and include the encryption settings.
Add a variable called encryption_algorithm with the value "AES/GCM/NoPadding".
Use the topic_config dictionary to set the encryption algorithm and enable encryption.
Print the topic_config dictionary to show the final configuration.
💡 Why This Matters
🌍 Real World
Encrypting data at rest in Kafka protects sensitive information stored on disk from unauthorized access or theft.
💼 Career
Understanding how to configure encryption at rest is important for roles in data engineering, security, and system administration working with Kafka.
Progress0 / 4 steps
1
Create Kafka topic configuration dictionary
Create a dictionary called topic_config with these exact entries: "encryption.enabled": "true" and "encryption.key.provider": "local".
Kafka
Need a hint?

Use curly braces {} to create a dictionary with the exact keys and values.

2
Add encryption algorithm variable
Add a variable called encryption_algorithm and set it to the string "AES/GCM/NoPadding".
Kafka
Need a hint?

Use a simple assignment statement to create the variable with the exact string value.

3
Add encryption algorithm to topic configuration
Add the encryption_algorithm variable value to the topic_config dictionary with the key "encryption.algorithm".
Kafka
Need a hint?

Use the dictionary key assignment syntax to add the new key and value.

4
Print the final topic configuration
Print the topic_config dictionary to display the final encryption configuration.
Kafka
Need a hint?

Use print(topic_config) to show the dictionary.