craig-rueda commented on a change in pull request #18651:
URL: https://github.com/apache/superset/pull/18651#discussion_r804925948



##########
File path: superset/security/manager.py
##########
@@ -1337,13 +1341,22 @@ def get_guest_user_from_request(self, req: Request) -> 
Optional[GuestUser]:
             return None
 
         try:
+            aud = (
+                current_app.config["GUEST_TOKEN_JWT_DECODE_AUDIENCE"] or 
get_url_host()
+            )
             token = self.parse_jwt_guest_token(raw_token)

Review comment:
       FWIW, `aud` validation is provided by the `jwt.decode()` method See: 
https://github.com/jpadilla/pyjwt/blob/master/jwt/api_jwt.py#L147 Suggest using 
this :) 




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