botocore icon indicating copy to clipboard operation
botocore copied to clipboard

Support duration_seconds on the web identity token provider

Open pawalt opened this issue 10 months ago • 1 comments

Describe the feature

Right now, there's no way to provide DurationSeconds as an extra kwarg on the AssumeRoleWithWebIdentityCredentialFetcher. We'd like to be able to populate this from the profile config.

Use Case

We need our provider to have a longer lifetime so we can mint pre-signed URLs which won't expire after 1 hour, the default STS timeout.

Proposed Solution

Add a populate for duration_seconds here, the same way that already exists for the assume role provider. https://github.com/boto/botocore/blob/728045e5c6392e4409223c37afebeee35b9d76ea/botocore/credentials.py#L1888-L1899

Other Information

If this is a desired change, we'd be happy to put up the PR ourselves!

Acknowledgements

  • [x] I may be able to implement this feature request
  • [ ] This feature might incur a breaking change

SDK version used

latest

Environment details (OS name and version, etc.)

EKS

pawalt avatar Feb 26 '25 21:02 pawalt

Hi @pawalt, thanks for bringing this up. After talking with the team, Support duration_seconds on the web identity token provider is definitely something we see value in. I don't have a timeline for implementation at this time, but I'll be leaving this feature request open for tracking purposes, and will let you know if I have any updates. Thanks again for this feature request.

adev-code avatar Mar 31 '25 14:03 adev-code