pierrejeambrun commented on code in PR #42019:
URL: https://github.com/apache/airflow/pull/42019#discussion_r1745822102


##########
airflow/api_ui/app.py:
##########
@@ -32,17 +38,35 @@ def init_dag_bag(app: FastAPI) -> None:
     app.state.dag_bag = get_dag_bag()
 
 
-def create_app() -> FastAPI:
+def init_flask_app(app: FastAPI, testing: bool = False) -> None:
+    """
+    Auth providers and permission logic are tightly coupled to Flask.

Review Comment:
   Thanks to both of you for your comments that is really helpful.
   
   I am opened to both solutions just let me know what you prefer:
   - We leave it like this and rely on the modified `basic_auth` backend with 
some flask_app init thingy to make basic auth work for the time being 
(development purpose until we can move fowrard with with AIP-79)
   - We wait for the SimpleAuthManager PR to be merged and use it, also make it 
the default. Taking a look at the code it appears that a `flask app context` is 
still required. I do not have that in here at the moment. Also are we able to 
load users from the db and have a real auth workflow as we have now with 
basic_auth (permissions granted etc...) For developing airflow 3 front-end if 
we have something closer to the real auth workflow it might be easier.



-- 
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]

Reply via email to