V2 SDK does not support duration_seconds
for the Assume role credential provider when configured via shared AWS config file
#5695
Labels
Describe the bug
In my shared AWS config file, I set configured it to trigger the SDK to use the
StsAssumeRoleCredentials
provider. I used the following settings in the config file:main-profile
settings not shown, but it configures an sso session setup to use IdC.In code, with wire logging enabled, I create an S3 client
S3Client s3Client = S3Client.create();
.I see the following response that lists the expiration time (
<Expiration>
):No matter what I set the
duration_seconds
value to, the expiration is always 1 hour (the default) after the initial call to STS.Regression Issue
Expected Behavior
The SDK should honor the
duration_seconds
provided in the config file. This setting is not listed as an exception in the SDK reference (https://docs.aws.amazon.com/sdkref/latest/guide/feature-assume-role-credentials.html#assume-role-sdk-compat)Current Behavior
The SDK ignored the
duration_seconds
provided in the config file and used the default value (3600 seconds).Reproduction Steps
See earlier.
Possible Solution
No response
Additional Information/Context
No response
AWS Java SDK version used
2.29.5
JDK version used
17
Operating System and version
Mac - Sonoma 14.5
The text was updated successfully, but these errors were encountered: