stephen-bracken commented on PR #70783:
URL: https://github.com/apache/airflow/pull/70783#issuecomment-5315465296

   >How does this work for old provider version (fab) and new core (removing 
the hardcoded JWTRefreshMiddleware to move it to BaseAuthManager ?
   New fab calls super().get_fastapi_middlewares(), old fab do not so the 
refresh token middleware disappears?
   
   In 3.3.1 and prior versions of airflow the `JWTRefreshMiddleware` will be 
injected in the hardcoded initialisation in 
`airflow.api_fastapi.core_api.app.init_middlewares`:
   
   
https://github.com/apache/airflow/blob/d4581aecace0d7874fef1091cff08ca8edfe042d/airflow-core/src/airflow/api_fastapi/core_api/app.py#L178
   
   In Airflow v3.3.0 and v3.3.1 `super.get_fastapi_middlewares()` returns a 
`[]`, but after this change it will return `[(JWTRefreshMiddleware,{})]`.
   
   The `super().get_fastapi_middlewares()` is there to include any middlewares 
we add to `BaseAuthManager` in `FabAuthManager`. This will need to be included 
in any auth managers that alter `get_fastapi_middlewares()` if they also use a 
`JWTRefreshMiddleware`. the `if AIRFLOW_V_3_3_PLUS` guard is there because 
`get_fastapi_middlewares()` was added in 3.3.0


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