pierrejeambrun opened a new pull request, #42019: URL: https://github.com/apache/airflow/pull/42019
## What does this PR do Add support for `basic_auth` backend to the new UI Rest API. Add relevant permissions helper and tests. The goal for this is first to show how permissions and auth can be handled in FastAPI and also have a small working POC for us to be able to then work on the front end. (And be able to migrate existing endpoints **with** appropriate permission decorators and write test against that as well). Goal: - Allow the endpoint migrations to be ported with the appropriate permissions and tested, to not loose them in transit - Use this PR as a preliminary work to discuss and see how FastAPI can integrate our permission/auth code, make a POC with the `basic_auth` backend. ## What this PR does not do After some digging in the last two days, I find that our `auth_backends` implementations, `auth_manager` init code, `BaseAuthManager` and more importantly `FabAuthManager` etc. is tightly coupled to flask. For instance the way we read webserver config file from python with `from_pyfile`, check app config with `app.config`, access global flask object from within an app context `g`, `request`, `get_current_user`, `flask_login`, `current_app` etc... So this PR does not rewrite all that code to be `Flask` independant and usable with FastAPI because the effort is too high at the moment and this is not what I am trying to demonstrate with this PR. We basically use the `flask_app` init code to initialize correctly all the different helper classes, and I added a few checks here and there to make the basic auth work outside of a Flask app context.    -- 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]
