adutra opened a new pull request, #1242:
URL: https://github.com/apache/polaris/pull/1242
Two fixes in this PR:
* `JWTBroker` was expecting the `requested_token_type` field to be present,
but this field is optional, and the Iceberg REST client never includes it;
* when `JWTBroker.verify()` throws, the exception was being propagated to
`IcebergExceptionMapper`, which results in an incorrect OAuth response:
```json
{
"error" : {
"message" : "Failed to verify the token",
"type" : "NotAuthorizedException",
"code" : 401
}
}
```
The correct payload would be:
```json
{
"error" : "unauthorized_client",
"error_description" : "The client is not authorized"
}
```
I included tests for both, although it's hard to test the path where the
decoded JWT is invalid.
--
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]