tirkarthi commented on issue #60265:
URL: https://github.com/apache/airflow/issues/60265#issuecomment-3724015151
The other issue I can see is that user resolution is done twice in token
refresh middleware and also GetUserDep dependency resolution.
```
/home/karthikeyan/stuff/python/airflow/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py(85)__call__()
-> await self.app(scope, receive, send)
/home/karthikeyan/stuff/python/airflow/.venv/lib/python3.11/site-packages/starlette/middleware/gzip.py(22)__call__()
-> await self.app(scope, receive, send)
/home/karthikeyan/stuff/python/airflow/.venv/lib/python3.11/site-packages/starlette/middleware/base.py(179)__call__()
-> response = await self.dispatch_func(request, call_next)
/home/karthikeyan/stuff/python/airflow/airflow-core/src/airflow/api_fastapi/auth/middlewares/refresh_token.py(47)dispatch()
-> new_user = await self._refresh_user(current_token)
/home/karthikeyan/stuff/python/airflow/airflow-core/src/airflow/api_fastapi/auth/middlewares/refresh_token.py(72)_refresh_user()
-> user = await resolve_user_from_token(current_token)
/home/karthikeyan/stuff/python/airflow/airflow-core/src/airflow/api_fastapi/core_api/security.py(118)resolve_user_from_token()
-> user = await get_auth_manager().get_user_from_token(token_str)
/home/karthikeyan/stuff/python/airflow/airflow-core/src/airflow/api_fastapi/auth/managers/base_auth_manager.py(119)get_user_from_token()
-> return self.deserialize_user(payload)
>
/home/karthikeyan/stuff/python/airflow/.venv/lib/python3.11/site-packages/airflow/providers/fab/auth_manager/fab_auth_manager.py(264)deserialize_user()
-> self.user_cache[id] = user
```
```
/home/karthikeyan/stuff/python/airflow/.venv/lib/python3.11/site-packages/fastapi/dependencies/utils.py(614)solve_dependencies()
-> solved_result = await solve_dependencies(
/home/karthikeyan/stuff/python/airflow/.venv/lib/python3.11/site-packages/fastapi/dependencies/utils.py(643)solve_dependencies()
-> solved = await call(**solved_result.values)
/home/karthikeyan/stuff/python/airflow/airflow-core/src/airflow/api_fastapi/core_api/security.py(145)get_user()
-> return await resolve_user_from_token(token_str)
/home/karthikeyan/stuff/python/airflow/airflow-core/src/airflow/api_fastapi/core_api/security.py(118)resolve_user_from_token()
-> user = await get_auth_manager().get_user_from_token(token_str)
/home/karthikeyan/stuff/python/airflow/airflow-core/src/airflow/api_fastapi/auth/managers/base_auth_manager.py(119)get_user_from_token()
-> return self.deserialize_user(payload)
>
/home/karthikeyan/stuff/python/airflow/.venv/lib/python3.11/site-packages/airflow/providers/fab/auth_manager/fab_auth_manager.py(264)deserialize_user()
-> self.user_cache[id] = user
```
--
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]