Skip to content

[filesystem][s3] Mirror s3.session-token to fs.s3a.session.token - #10228

Open
thswlsqls wants to merge 1 commit into
apache:masterfrom
thswlsqls:fix/s3-mirror-session-token
Open

thswlsqls wants to merge 1 commit into
apache:masterfrom
thswlsqls:fix/s3-mirror-session-token

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Purpose

fix #10227

  • S3FileIO mirrors hyphenated access-key/secret-key to the dotted S3A keys, but not the session token.
  • s3.session-token became fs.s3a.session-token, which S3A never reads, so temporary STS credentials passed via Flink/Spark/Hive catalog options were signed without the token (403).
  • Adds {"fs.s3a.session-token", "fs.s3a.session.token"} to MIRRORED_CONFIG_KEYS; precedence matches the existing mirrors. Dotted s3.session.token is unaffected.
  • Aligns with PyPaimon, which accepts s3.session-token ([python] Support S3 options in filesystem catalog #7712).
  • Documents s3.session-token in the S3 section of filesystems.mdx.

Tests

  • Added offline S3FileIOConfigTest: testHyphenSessionTokenIsMirrored (conf key plus resolved AwsSessionCredentials), testDotSessionTokenIsKept.
  • Without the fix, testHyphenSessionTokenIsMirrored fails (fs.s3a.session.token is null).
  • mvn -pl paimon-filesystems/paimon-s3-impl clean install green on JDK 11 (S3FileIOConfigTest 2/2, spotless/checkstyle); Docker-based MinIO tests not run locally.

S3FileIO mirrors the hyphenated access-key and secret-key options to the
dotted keys read by S3A, but not the session token. s3.session-token was
rewritten to fs.s3a.session-token, which S3A never reads, so temporary
credentials were signed without their token. Mirror it like its siblings
and document the option in the S3 filesystem docs.

Generated-by: Claude Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Support s3.session-token for temporary credentials in the S3 filesystem plugin

1 participant