0
0
Apache Airflowdevops~5 mins

Variable encryption for secrets in Apache Airflow - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of variable encryption in Airflow?
Variable encryption in Airflow protects sensitive information like passwords or API keys by storing them in an encrypted form, so only authorized users or systems can read them.
Click to reveal answer
intermediate
Which Airflow component is responsible for encrypting variables?
The Airflow metadata database stores variables, and encryption is handled by the Fernet key configured in Airflow's settings to encrypt and decrypt variable values.
Click to reveal answer
beginner
How do you enable variable encryption in Airflow?
Set the 'fernet_key' in the airflow.cfg configuration file with a valid Fernet key. Airflow will then use this key to encrypt and decrypt variables automatically.
Click to reveal answer
intermediate
What happens if the Fernet key is lost or changed in Airflow?
If the Fernet key is lost or changed, Airflow cannot decrypt previously encrypted variables, causing secret data to become inaccessible until the original key is restored.
Click to reveal answer
beginner
Why is it better to use Airflow's variable encryption instead of storing secrets in plain text?
Encrypting variables prevents unauthorized users from reading sensitive data directly from the database or configuration files, reducing the risk of data leaks and improving security.
Click to reveal answer
What configuration setting enables variable encryption in Airflow?
Afernet_key
Bsecret_key
Cencryption_enabled
Dvariable_encryption
What is the main risk if the Fernet key is lost?
AAirflow stops working
BVariables become readable by anyone
CVariables cannot be decrypted
DVariables get deleted automatically
Where are Airflow variables stored?
AIn the metadata database
BIn the DAG files
CIn environment variables
DIn the Airflow logs
Which library does Airflow use for variable encryption?
AHashlib
BPyCrypto
COpenSSL
DFernet from cryptography
Why should secrets be encrypted rather than stored in plain text?
ATo improve performance
BTo prevent unauthorized access
CTo reduce storage size
DTo make variables easier to edit
Explain how Airflow uses the Fernet key to secure variables.
Think about how a secret key locks and unlocks information.
You got /3 concepts.
    Describe the consequences of losing the Fernet key in Airflow.
    What happens if you lose the key to a locked box?
    You got /3 concepts.