You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allowing the Airflow Scheduler to use a custom appless security manager #23232
Currently, Airflow allows the use of a custom security manager for auth within the web application. The custom security manager class is typically declared in the webserver_config.py and dynamically imported and used by flask_appbuilder when the web application starts.
Outside of the web application, the Airflow Scheduler(specifically DagBag) uses ApplessAirflowSecurityManager which is a subclass of AirflowSecurityManager and not the custom security manager. This makes it impossible(without monkey patching) to override the logic for sync_perm_for_dag.
I would like to override this method called by DagBag to implicitly create roles defined in a DAGs access_control dict based on some custom logic.
I believe a possible approach to allowing DagBag to use a custom ApplessAirflowSecurityManager would be to add a config to [core] called something like appless_security_manager_class which declares the class. Then, replace the import of ApplessAirflowSecurityManager with a dynamic import of the custom security manager(if specified) similar to the way it is done for the web application.
Use case/motivation
I would like to override the sync_perm_for_dag method called by DagBag to implicitly create roles defined in a DAGs access_control dict based on some custom logic. This cannot currently be done because DagBag does not use the same custom security manager as the Airflow web application.
Activity
boring-cyborg commentedon Apr 25, 2022
Thanks for opening your first issue here! Be sure to follow the issue template!
vincbeck commentedon Jul 27, 2026
Closing it since this is no longer applicable. All Flask code has been moved to Fab but also I dont think this is something we want/need today