dabla commented on code in PR #76353:
URL: https://github.com/apache/airflow/pull/76353#discussion_r4592591896
##########
providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py:
##########
@@ -224,7 +224,9 @@ async def get_user_from_token(
# the cookie path those claims are covered by the Airflow JWT
signature, so they
# need no separate subject check. A browser token does not carry them
and can
# only be completed by KeycloakJWTMiddleware from the cookies; without
them
- # there is nothing to authorize against.
+ # there is nothing to authorize against. Return None rather than
raise: the
+ # core JWTRefreshMiddleware resolves this token on every request
without the
+ # cookies, and an exception there would end every browser session.
return user if user.access_token else None
Review Comment:
Agreed, and it is a core change, so I opened it separately: #77182. `POST
/ui/auth/token` now calls `generate_api_jwt`, with a test on the route for both
token types.
--
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]