Skip to content

feat(services/s3): support configuring assume role duration_seconds#7495

Merged
Xuanwo merged 1 commit into
apache:mainfrom
YuangGao:feat/s3-assume-role-duration
May 11, 2026
Merged

feat(services/s3): support configuring assume role duration_seconds#7495
Xuanwo merged 1 commit into
apache:mainfrom
YuangGao:feat/s3-assume-role-duration

Conversation

@YuangGao
Copy link
Copy Markdown
Contributor

@YuangGao YuangGao commented May 10, 2026

Which issue does this PR close?

Closes #4976.

Rationale for this change

AWS STS AssumeRole defaults to a 1-hour session duration.
Upstream reqsign-aws-v4 v3.0.0 already exposes AssumeRoleCredentialProvider::with_duration_seconds(u32), so this PR is purely a config exposure on the OpenDAL side.

What changes are included in this PR?

  • Add assume_role_duration_seconds: Option<u32> field to S3Config.
  • Add S3Builder::assume_role_duration_seconds builder method.
  • Pass the value through in S3Builder::build, mirroring the existing external_id / role_session_name wiring.

Are there any user-facing changes?

Yes — a new public config field and a new builder method. Not a breaking change: the field is Option<u32> defaulting to None, which preserves current behavior.

AI Usage Statement

AI-assisted implementation.

@YuangGao YuangGao marked this pull request as ready for review May 10, 2026 22:12
@YuangGao YuangGao requested a review from Xuanwo as a code owner May 10, 2026 22:12
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. releases-note/feat The PR implements a new feature or has a title that begins with "feat" labels May 10, 2026
Copy link
Copy Markdown
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 11, 2026
@Xuanwo Xuanwo merged commit 116795a into apache:main May 11, 2026
112 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer releases-note/feat The PR implements a new feature or has a title that begins with "feat" size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new feature: Allow s3 service to configure assume role's duration-seconds

2 participants