You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We load our credentials via the default chain. In particular we are ultimately using stscreds.WebIdentityRoleProvider. We would like to be able to set the ExpiryWindow. That way we can generate presigned URLs that will be valid for 15 minutes, without worrying about whether the backing role credentials will expire sooner than that. However, right now this cannot be done, because we only get a credentials.Credentials instance, and the provider is a private field.
Describe the solution you'd like
Add options functions to the aws.Config to allow modifying the default credentials.
When the default credentials are being created, the corresponding function would be applied to the provider before it gets wrapped into a credentials.Credentials. If the function is nil then it is a no-op. In our case we would do this:
Describe alternatives you've considered
We can of course manually create the stscreds.WebIdentityRoleProvider ourselves but that is annoying and requires special code for anything running in EKS as opposed to a lambda.
The text was updated successfully, but these errors were encountered:
Thanks for taking the time to create this issue @rittneje. I've updated the PR with feedback on the design and proposal moving forward.
Also, this hasn't been merged yet, but I created a PR in the V2 SDK which addresses this issue directly without needing to use factories, since the v2 SDK already exposes many functional options for its components. aws/aws-sdk-go-v2#1523
Fixes#4160. It's a little different than what I originally proposed, since (1) this avoid an import cycle, and (2) this is a little more flexible.
Adds a NewWebIdentityRoleProviderWithOptions constructor to be similar to the other credential providers defined by the SDK.
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Is your feature request related to a problem? Please describe.
We load our credentials via the default chain. In particular we are ultimately using
stscreds.WebIdentityRoleProvider
. We would like to be able to set theExpiryWindow
. That way we can generate presigned URLs that will be valid for 15 minutes, without worrying about whether the backing role credentials will expire sooner than that. However, right now this cannot be done, because we only get acredentials.Credentials
instance, and the provider is a private field.Describe the solution you'd like
Add options functions to the
aws.Config
to allow modifying the default credentials.When the default credentials are being created, the corresponding function would be applied to the provider before it gets wrapped into a
credentials.Credentials
. If the function isnil
then it is a no-op. In our case we would do this:Describe alternatives you've considered
We can of course manually create the
stscreds.WebIdentityRoleProvider
ourselves but that is annoying and requires special code for anything running in EKS as opposed to a lambda.The text was updated successfully, but these errors were encountered: