lkindere opened a new issue, #13591:
URL: https://github.com/apache/iceberg/issues/13591

   ### Apache Iceberg version
   
   None
   
   ### Query engine
   
   None
   
   ### Please describe the bug 🐞
   
   Hello,
   
   After looking into the reasons for OAuth2 refresh failing on our side I 
stumbled upon something that I find odd. I am no means an expert in OAuth but 
for it it looks like refreshExpiredToken in of OAuth2Util
   should not be calling refreshToken but instead fetchToken?
   
   At least judging by the comments:
   
https://github.com/apache/iceberg/blob/f40208ae6fb2f33e578c2637d3dea1db18739f31/core/src/main/java/org/apache/iceberg/rest/auth/OAuth2Util.java#L551
   
   and the credential check at the start of refreshExpiredTokens
   
https://github.com/apache/iceberg/blob/f40208ae6fb2f33e578c2637d3dea1db18739f31/core/src/main/java/org/apache/iceberg/rest/auth/OAuth2Util.java#L603
   
   It would appear to me that the intention here is to get a brand new token 
via client credentials, but it seems to only check if the credentials are not 
null and still try to get a new token with an old token?
   
   Please confirm if this is a bug or just my misunderstanding.
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [ ] I would be willing to contribute a fix for this bug with guidance from 
the Iceberg community
   - [ ] I cannot contribute a fix for this bug at this time


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