bito-code-review[bot] commented on PR #40864:
URL: https://github.com/apache/superset/pull/40864#issuecomment-4651609433

   <!-- Bito Reply -->
   The flagged issue is correct. Calling `sorted(scopes)` on a list containing 
mixed types (e.g., strings and integers) will raise a `TypeError` in Python 3, 
causing the authentication process to fail even when the token is otherwise 
valid. 
   
   To resolve this, you should log the scopes without sorting them, or convert 
them to strings first. Here is the corrected implementation for 
`superset/mcp_service/jwt_verifier.py`:
   
   ```python
               logger.info(
                   "JWT authentication succeeded for client '%s' (scopes=%s)",
                   client_id,
                   [str(s) for s in scopes],
               )
   ```
   
   There are no other comments on this PR to address. Would you like me to 
implement this change for you?
   
   **superset/mcp_service/jwt_verifier.py**
   ```
   logger.info(
                   "JWT authentication succeeded for client '%s' (scopes=%s)",
                   client_id,
                   [str(s) for s in scopes],
               )
   ```


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to