sha174n commented on code in PR #45452:
URL: https://github.com/apache/superset/pull/45452#discussion_r4348649081


##########
superset/mcp_service/guest_token_verifier.py:
##########
@@ -112,6 +117,12 @@ def _verify_guest_sync(self, token: str) -> dict[str, Any] 
| None:
                     logger.debug("Guest token failed structural validation; 
deferring")
                     return None
 
+                try:
+                    validate_guest_token_identity(parsed["user"])

Review Comment:
   Kept at the entry points on purpose: `get_guest_user_from_token` runs 
outside the request loader's `try`, so a raise there would be a 500 instead of 
a 401, and the MCP verifier needs to defer (return None) before `auth.py` 
builds the user. Folding the shared consume checks into one raising helper that 
both callers wrap is a reasonable follow-up.



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