bharos commented on code in PR #9788:
URL: https://github.com/apache/gravitino/pull/9788#discussion_r2733041307


##########
server-common/src/main/java/org/apache/gravitino/server/authentication/StaticSignKeyValidator.java:
##########
@@ -97,7 +104,10 @@ public Principal validateToken(String token, String 
serviceAudience) {
         throw new UnauthorizedException(
             "Audiences in token is not in expected format: %s", 
audienceObject);
       }
-      return new UserPrincipal(jwt.getBody().getSubject());
+
+      // Use principal mapper to extract username
+      Principal mappedPrincipal = 
principalMapper.map(jwt.getBody().getSubject());

Review Comment:
   Done



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