Dynamic Security Roles in Airflow for Multi Tenancy
summary
Builds a custom AirflowSecurityManager that reads Active Directory via LDAP, auto-creates Airflow roles from a role mapping dict, and ties roles to DAGs using the DAG arg (can_read/can_edit) so teams only see their DAGs. Runs on Airflow 1.10.14 with notes about Airflow 2.0 and auth_roles_mapping support. Permissions sync happens at login (a sync on login CLI hook), new DAGs require logout/login to appear, and consolidation cuts infrastructure from about four EC2s to one, successfully preserving isolation and lowering cost.
AI-written summary · about
