0
0
Apache Airflowdevops~20 mins

Variable encryption for secrets in Apache Airflow - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Variable Encryption Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Why encrypt Airflow variables containing secrets?

Airflow variables can store sensitive data like API keys. Why is it important to encrypt these variables?

ATo make the variables load faster during DAG execution.
BTo allow variables to be shared publicly without restrictions.
CTo prevent unauthorized users from reading sensitive data if they access the metadata database.
DTo reduce the size of the metadata database.
Attempts:
2 left
💡 Hint

Think about what happens if someone gains access to the Airflow database.

💻 Command Output
intermediate
1:00remaining
Output of enabling variable encryption in Airflow config

What is the output when you run airflow config get-value core encrypt_variable after setting encrypt_variable = True in airflow.cfg?

AFalse
BTrue
CNone
DError: option not found
Attempts:
2 left
💡 Hint

Check the exact value you set in the config file.

🔀 Workflow
advanced
2:30remaining
Steps to enable variable encryption in Airflow

Arrange the steps to enable variable encryption in Airflow in the correct order.

A1,2,3,4
B2,1,3,4
C1,3,2,4
D3,1,2,4
Attempts:
2 left
💡 Hint

You need the key before setting it in the config.

Troubleshoot
advanced
2:00remaining
Error when decrypting Airflow variables after changing Fernet key

You changed the Fernet key in airflow.cfg but now Airflow raises errors when accessing encrypted variables. What is the cause?

AThe new Fernet key does not match the key used to encrypt existing variables.
BVariable encryption must be disabled before changing the key.
CThe Airflow database is corrupted and needs repair.
DThe Airflow version does not support variable encryption.
Attempts:
2 left
💡 Hint

Think about how encryption keys work with encrypted data.

Best Practice
expert
3:00remaining
Best practice for managing Fernet keys in Airflow variable encryption

Which option is the best practice for managing Fernet keys to ensure secure and reliable Airflow variable encryption?

AShare the Fernet key publicly to allow team members to decrypt variables.
BHardcode the Fernet key in DAG files for easy access.
CUse the default Fernet key generated by Airflow without changes.
DStore the Fernet key securely outside the Airflow server and rotate it periodically with a key management system.
Attempts:
2 left
💡 Hint

Consider security and operational reliability.