Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. Interview prep
  3. How do you handle secrets?

Airflow & DAGs · Advanced Development

How do you handle secrets?

Easyairflow-30
secretssecurityconnections

Question

How do you handle secrets in Airflow?

Solution

Never hardcode passwords in DAG code.

Use:

  • Airflow Connections
  • Environment variables
  • Secret backends / cloud secret managers (AWS Secrets Manager, GCP Secret Manager, Vault, Azure Key Vault)

A Secret Backend retrieves secrets from an external secure system instead of storing them in plain config or Git.

PreviousNext