hutiefang76 opened a new pull request, #17021: URL: https://github.com/apache/iceberg/pull/17021
Fixes #17019. This preserves custom REST `header.*` properties when creating standalone OAuth2 table sessions. Previously `OAuth2Manager.tableSession` built the parent session only from the bearer token. For REST catalog deployments that rely on custom headers, such as Polaris realm headers for multi-tenant credential vending, the table-level token refresh path dropped those headers before calling the token endpoint. This change merges configured REST headers with the OAuth2 auth header for the standalone table session parent. The existing auth header still wins if there is an overlap. The added tests cover both the provided-token path and the credential/token-fetch path, including the parent auth session used by the refresh client. Tests: - `JAVA_HOME=$(/usr/libexec/java_home -v 17) PATH="$JAVA_HOME/bin:$PATH" ./gradlew :iceberg-core:test --tests org.apache.iceberg.rest.auth.TestOAuth2Manager` - `JAVA_HOME=$(/usr/libexec/java_home -v 17) PATH="$JAVA_HOME/bin:$PATH" ./gradlew :iceberg-core:spotlessCheck` - `git diff --check` AI disclosure: - Implemented with assistance from Codex, with manual review of the affected code path and local test execution before submission. -- 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]
