lasdf1234 opened a new issue, #13971:
URL: https://github.com/apache/gravitino/issues/13971

   ### Describe the bug
   
   `JwksTokenValidator.validateToken` catches all `Exception`s from 
`principalMapper.map` and rethrows them as `UnauthorizedException("JWKS JWT 
validation error")`. Custom `PrincipalMapper` implementations that throw 
`UnauthorizedException` with a deliberate client message lose that message on 
the JWKS path.
   
   Static-key OAuth already rethrows `UnauthorizedException` unchanged via 
`OAuth2TokenAuthenticator`.
   
   ### Expected behavior
   
   When `principalMapper.map` throws `UnauthorizedException`, 
`JwksTokenValidator` rethrows it as-is (same message, no rewrite to `"JWKS JWT 
validation error"`).
   
   ### Related
   
   Enterprise follow-up for disabled SCIM OAuth users: 
datastrato/gravitino-enterprise#2024


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