Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide better caching logic for Credentials #2868

Open
1 of 2 tasks
JamesGAWS opened this issue Aug 3, 2023 · 1 comment
Open
1 of 2 tasks

Provide better caching logic for Credentials #2868

JamesGAWS opened this issue Aug 3, 2023 · 1 comment
Labels
Cross-SDK Requires cross-sdk coordination. Implementation under consideration feature-request A feature should be added or improved. p2 This is a standard priority issue

Comments

@JamesGAWS
Copy link

Describe the feature

Add a feature that would permit credentials.Credentials to return the last successful retrieved tokens if the configured credentials provider is unable to assume new credentials.

Use Case

This feature provides resiliency to TMDS, IMDS and STS service disruptions. The intended usage would be to set the max session duration on a role for 4-8 hours, set the session duration to that length, and for credentials to rotate more frequently (every hour for example). In the event of an outage in creds vending infrastructure, credentials would persist for 3-7 hours providing time for service to be restored without impacting clients.

Proposed Solution

This feature could be implemented at the credentials.Credentials.Get() method, or in the AssumeRoleProviderProvider.Retrieve() method.

Other Information

No response

Acknowledgements

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

SDK version used

v1.44.315

Environment details (Version of Go (go version)? OS name and version, etc.)

macOX Monterey 12.6.5 (21G531)

@JamesGAWS JamesGAWS added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Aug 3, 2023
@RanVaknin RanVaknin self-assigned this Aug 15, 2023
@RanVaknin
Copy link
Contributor

Hi @JamesGAWS,

Thanks for reaching out.

I think this is a reasonable feature request, however extending / changing the functionality of a credential provider would be a cross-SDK effort.
Since cross-SDK feature requests require multi team coordination and are time consuming, they are weighed based on customer impact and engagement (upvotes, comments, duplicate requests). I just want to set your expectations that this will likely not get implemented in the near future.

In terms of immediate resolution, you can implement your own credential provider that extends the credential provider interface and implement your own retrieval logic with the desired 1-hour window and potentially cache the previous set of credentials in-memory.

Thanks again,
Ran~

@RanVaknin RanVaknin removed the needs-triage This issue or PR still needs to be triaged. label Aug 15, 2023
@RanVaknin RanVaknin transferred this issue from aws/aws-sdk-go Aug 15, 2023
@RanVaknin RanVaknin assigned bhoradc and unassigned RanVaknin Sep 27, 2023
@bhoradc bhoradc added the p2 This is a standard priority issue label Aug 29, 2024
@tim-finnigan tim-finnigan transferred this issue from aws/aws-sdk Oct 30, 2024
@RanVaknin RanVaknin added the Cross-SDK Requires cross-sdk coordination. Implementation under consideration label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cross-SDK Requires cross-sdk coordination. Implementation under consideration feature-request A feature should be added or improved. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

3 participants