You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "AutomationDev85 (via GitHub)" <gi...@apache.org> on 2026/10/01 12:17:29 UTC
[PR] Sync Dag permissions for FabAuthManager subclasses [airflow]
AutomationDev85 opened a new pull request, #74022:
URL: https://github.com/apache/airflow/pull/74022
# Overview
We faced the issue that the DAG permission are not sync when using a subclass of the FabAuthManager because
Dag permission syncing currently checks the auth manager's name, so subclasses of `FabAuthManager` can be missed. This change checks the configured class instead.
# Details of change:
- Sync Dag permissions for FAB subclasses and cache the optional FAB class lookup.
- Add a regression test for subclass detection and the cached lookup.
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — GitHub Copilot
Generated-by: GitHub Copilot following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Sync Dag permissions for CustomAuthManager [airflow]
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck commented on code in PR #74022:
URL: https://github.com/apache/airflow/pull/74022#discussion_r4166644191
##########
airflow-core/src/airflow/dag_processing/collection.py:
##########
@@ -291,7 +301,10 @@ def _serialize_dag_capturing_errors(
DagCode.update_source_code(
dag.dag_id, dag.fileloc, dag_source_code=dag_source_code, session=session
)
- if "FabAuthManager" in conf.get("core", "auth_manager"):
+
+ auth_manager_cls = conf.getimport(section="core", key="auth_manager")
+ fab_auth_manager_cls = _get_fab_auth_manager_class()
+ if fab_auth_manager_cls and auth_manager_cls and issubclass(auth_manager_cls, fab_auth_manager_cls):
Review Comment:
I would move `_sync_dag_perms` to Fab auth manager class and then do `if getattr(get_auth_manager(), "sync_dag_perms")`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Sync Dag permissions for CustomAuthManager [airflow]
Posted by "AutomationDev85 (via GitHub)" <gi...@apache.org>.
AutomationDev85 commented on code in PR #74022:
URL: https://github.com/apache/airflow/pull/74022#discussion_r4230601973
##########
airflow-core/src/airflow/dag_processing/collection.py:
##########
@@ -291,7 +301,10 @@ def _serialize_dag_capturing_errors(
DagCode.update_source_code(
dag.dag_id, dag.fileloc, dag_source_code=dag_source_code, session=session
)
- if "FabAuthManager" in conf.get("core", "auth_manager"):
+
+ auth_manager_cls = conf.getimport(section="core", key="auth_manager")
+ fab_auth_manager_cls = _get_fab_auth_manager_class()
+ if fab_auth_manager_cls and auth_manager_cls and issubclass(auth_manager_cls, fab_auth_manager_cls):
Review Comment:
@vincbeck Thanks for this idea. I adapted the code accordantly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Sync Dag permissions for CustomAuthManager [airflow]
Posted by "jscheffl (via GitHub)" <gi...@apache.org>.
jscheffl commented on PR #74022:
URL: https://github.com/apache/airflow/pull/74022#issuecomment-6126314959
Cool!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Sync Dag permissions for CustomAuthManager [airflow]
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck merged PR #74022:
URL: https://github.com/apache/airflow/pull/74022
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org