AWS: Apply S3 access grants and user agent config in AssumeRole s3() - #17246
Draft
thswlsqls wants to merge 1 commit into
Draft
AWS: Apply S3 access grants and user agent config in AssumeRole s3()#17246thswlsqls wants to merge 1 commit into
thswlsqls wants to merge 1 commit into
Conversation
AssumeRoleAwsClientFactory.s3() skipped applyS3AccessGrantsConfigurations and applyUserAgentConfigurations, which the sibling DefaultAwsClientFactory.s3() applies between the signer and retry configurations. As a result, S3 clients built through the assume-role factory did not enable the S3 Access Grants plugin or the "s3fileio/" user agent prefix, even when configured. Add the two mutations in the same order as DefaultAwsClientFactory.s3() (signer -> access grants -> user agent -> retry) so both factories apply the same S3 configuration. Generated-by: Claude Code
thswlsqls
marked this pull request as draft
July 17, 2026 11:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #17245
Summary
AssumeRoleAwsClientFactory.s3()skippedapplyS3AccessGrantsConfigurationsandapplyUserAgentConfigurations, so assume-role S3 clients ignoreds3.access-grants.enabledand never set thes3fileio/user agent.DefaultAwsClientFactory.s3(): signer -> access grants -> user agent -> retry.Testing done
TestAwsClientFactories#testAssumeRoleAwsClientFactoryS3AppliesUserAgent(asserts the built S3 client's user agent prefix starts withs3fileio/) and#testAssumeRoleAwsClientFactoryS3AppliesS3AccessGrants(buildss3()with access grants enabled)../gradlew :iceberg-aws:spotlessCheck :iceberg-aws:test --tests "org.apache.iceberg.aws.TestAwsClientFactories"— 23 tests passed, 0 failed.:iceberg-aws:checkwas not run: it pulls in testcontainers/Docker integration tests that do not complete locally. aws is not a revapi module, so revapi is skipped.AI Disclosure