Skip to content

Conversation

@J12934
Copy link

@J12934 J12934 commented Oct 14, 2025

Sorry didn't get to it for quit a while.
Closes #2136

This allows to specify a ExpiryWindow when building up a AWS IAM Credential Provider.
Full transparentcy: the tests were genereated by an LLM, only had a look over them to make sure they acutally do something reasonable, the actual iam_aws code change was written by me (a human :D)

What I don't super like about this change is that the ExpiryWindow is passed as a time.Duration, the default with percentage based approach (rotate after 80% of the token duration) seems to have less footgun potential.

A time.Duration would allow people to configure windows which are longer than their IAM credentials are valid for. This would cause the token to get rotated constantly. I was hestitent to use a percentage here though, the credential Value wrapper type doesn't seem to support a percentage based approach and I wasn't sure if overcomplicating this was a good idea. Any ideas how we could prevent this? Or am I overthinking this :D

Primary use case (from me) is to:
Use the client for to generate presigned urls which are valid for longer.
With the the previous rotate after 80% rule this still cuts away a lot of time of the max. 12h token duration.
This allows the users to use IAM Auth and create presigned urls which can be valid for as long as the expiry window is configured.

Signed-off-by: Jannik Hollenbach <[email protected]>
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.

Make AWS IAM Credentials Expiry Window Customizable

1 participant