Create Your Custom Secrets Backend for Apache Airflow
summary
Shows how to implement a pip-installable custom secrets backend for Airflow 2.1.0 by subclassing BaseSecretsBackend and implementing get_connection_ui or get_connection/get_variable, and how Airflow initializes a 2- or 3-element backend list so a configured custom backend always wins precedence. Demo uses Docker Compose + Postgres + local executor, replaces a connection port 8888 with 6666 and variable city “basel” with “shohong,” and adds owner-based access checks that block unauthorized DAGs, proving the approach works.
AI-written summary · about
