You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "adutra (via GitHub)" <gi...@apache.org> on 2025/03/22 18:19:48 UTC

[PR] JWTBroker: fix refresh token logic [polaris]

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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] JWTBroker: fix refresh token logic [polaris]

Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra merged PR #1242:
URL: https://github.com/apache/polaris/pull/1242


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] JWTBroker: fix refresh token logic [polaris]

Posted by "wolflex888 (via GitHub)" <gi...@apache.org>.
wolflex888 commented on PR #1242:
URL: https://github.com/apache/polaris/pull/1242#issuecomment-2745400676

   ahh you beat me to it


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org