bugraoz93 commented on code in PR #64219:
URL: https://github.com/apache/airflow/pull/64219#discussion_r2989857453


##########
airflow-core/src/airflow/api_fastapi/core_api/security.py:
##########
@@ -123,6 +127,9 @@ async def resolve_user_from_token(token_str: str | None) -> 
BaseUser:
         raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, 
detail="Token Expired")
     except InvalidTokenError:
         raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, 
detail="Invalid JWT token")
+    except Exception:
+        log.exception("Unexpected error during token authentication")

Review Comment:
   I think we shouldn't log anything from this filem raising exceptions would 
be okay since they are generally self contained small information but could 
cause leaks.
   I would suggest removing logs and adding unit tests for these cases



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