Skip to content

Honor duration_seconds in assume-role profiles - #7360

Open
afarber wants to merge 1 commit into
aws:masterfrom
afarber:5695-duration-seconds
Open

Honor duration_seconds in assume-role profiles#7360
afarber wants to merge 1 commit into
aws:masterfrom
afarber:5695-duration-seconds

Conversation

@afarber

@afarber afarber commented Sep 9, 2026

Copy link
Copy Markdown

Motivation and Context

Fixes #5695.

Assume-role profiles could specify duration_seconds, but the STS request did not use the configured value. STS therefore issued sessions using its default duration.

Modifications

  • Map duration_seconds from assume-role profiles to AssumeRoleRequest.durationSeconds.
  • Extract package-visible request construction for direct unit testing.
  • Add regression tests for configured and absent duration values.
  • Add a changelog entry.

Testing

./mvnw -pl :sts -am \
  -Dtest=AssumeRoleProfileTest \
  -Dsurefire.failIfNoSpecifiedTests=false test

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

License

  • I confirm that this pull request can be released under the Apache 2 license

@afarber
afarber requested a review from a team as a code owner September 9, 2026 13:04
@afarber
afarber force-pushed the 5695-duration-seconds branch 2 times, most recently from a107700 to cf0a836 Compare September 9, 2026 16:43
@afarber
afarber force-pushed the 5695-duration-seconds branch from cf0a836 to 0eaf227 Compare September 12, 2026 07:45
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.

V2 SDK does not support duration_seconds for the Assume role credential provider when configured via shared AWS config file

1 participant