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

[Question / Feature Request] File based Credential Cache using CredentialsCache? #1633

Closed
1 task
Skarlso opened this issue Mar 18, 2022 · 4 comments
Closed
1 task
Assignees
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made. guidance Question that needs advice or information. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@Skarlso
Copy link

Skarlso commented Mar 18, 2022

Describe the feature

Hello!

Do I understand correctly, that right now, the CredentialsCache is only in memory?

Or am I missing something or just can't find it in the documentation. If so, can the credential cache be used as a file based cache out of the box for MFA tokens not being asked over and over for various api calls? To understand as a reference, v1 needed the Expired interface and some extra work from client libraries to create a file based cache and use a provider which could expire.

For example: aws/aws-sdk-go#1329 And as part of that an Expired interface was added: https://github.com/aws/aws-sdk-go/pull/2375/files

This is still the case concerning v2, right?

thanks

Is your Feature Request related to a problem?

No

Proposed Solution

No response

Describe alternatives you've considered

No response

Acknowledge

  • I may be able to implement this feature request

AWS Go SDK version used

Release (2022-03-18)

Go version used

1.18

@Skarlso Skarlso added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Mar 18, 2022
@vudh1 vudh1 self-assigned this Mar 21, 2022
@jasdel
Copy link
Contributor

jasdel commented Mar 24, 2022

Correct credential cache is only in memory. The SDK does not cache AWS credentials in a file. Only the AWS CLI will due this due to its nature of individual command invocation.

With regard to MFA, if an assume role requires MFA token, and the credentials need to be refreshed (or obtained for first time) that handling must be implemented via the a token provider in code. The SDK will throw an error at runtime if a token provider has not been configured, and one is needed.

Both v1 and v2 SDKs have this behavior in common.

The v2 SDK was redesigned so that the expires helper is on the aws.Credentials not the CredentialsProvider. This enabled custom credential caching schemes without knowledge of how the credential provider behaved.

@jasdel jasdel added guidance Question that needs advice or information. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Mar 24, 2022
@github-actions
Copy link

This issue has not received a response in 1 week. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Mar 27, 2022
@Skarlso
Copy link
Author

Skarlso commented Mar 27, 2022

Thank you for your answer @jasdel!

@Skarlso Skarlso closed this as completed Mar 27, 2022
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made. guidance Question that needs advice or information. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

3 participants