vincbeck commented on code in PR #45009:
URL: https://github.com/apache/airflow/pull/45009#discussion_r1889322346
##########
airflow/api_connexion/security.py:
##########
@@ -32,8 +32,8 @@
PoolDetails,
VariableDetails,
)
+from airflow.providers.fab.www.extensions.init_auth_manager import
get_auth_manager
Review Comment:
I think we need to have two `get_auth_manager` because we need to init the
auth manager twice:
- One (the main one) in `airflow/api_fastapi/app.py` that is used across the
application. This auth manager is init with no parameter as it should be
- One in
`providers/src/airflow/providers/fab/www/extensions/init_auth_manager.py`. This
auth manager is init with the appbuilder as parameter. The appbuilder is used
across the FAB provider codebase for many different features.
Overall, `get_auth_manager` from `airflow/api_fastapi/app.py` should be used
everywhere in the codebase but FAB provider. `get_auth_manager` from
`providers/src/airflow/providers/fab/www/extensions/init_auth_manager.py`
should be used only in FAB provider.
I am aware this is confusing. Maybe renaming `get_auth_manager` to something
else like `get_fab_auth_manager` in the fab provider would make it less
confusing?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]