bharos opened a new pull request, #16023:
URL: https://github.com/apache/iceberg/pull/16023

   Fixes https://github.com/apache/iceberg/issues/16022
   
   When `exchangeEnabled` is false, both `refreshExpiredToken()` and the static 
`refreshToken()` were calling `fetchToken()` with an empty map instead of 
forwarding `optionalOAuthParams` (which carries `audience`, `resource`, 
`scope`).
   
   This was introduced in #14059 when the deprecated 5-arg `fetchToken()` 
overloads were removed and the 6-arg calls were inlined with 
`ImmutableMap.of()` instead of the available `optionalOAuthParams`.
   
   The initial token fetch passes the params correctly, so the first token 
works. After expiry, the refreshed token is missing the audience/scope, causing 
401/403 errors.
   
   **Fix:** Pass `optionalOAuthParams` instead of `ImmutableMap.of()` / 
`Map.of()` in the two non-exchange branches.
   
   **Tests:** Two new tests in `TestOAuth2Util` verify that `audience` appears 
in the token request form data for both the expired-token and proactive-refresh 
paths.


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