proxy.golang.org : github.com/aws/aws-sdk-go-v2/credentials/stscreds
Package stscreds are credential Providers to retrieve STS AWS credentials. STS provides multiple ways to retrieve credentials which can be used when making future AWS service API operation calls. The SDK will ensure that per instance of credentials.Credentials all requests to refresh the credentials will be synchronized. But, the SDK is unable to ensure synchronous usage of the AssumeRoleProvider if the value is shared between multiple Credentials or service clients. To assume an IAM role using STS with the SDK you can create a new Credentials with the SDKs's stscreds package. To assume an IAM role with a MFA token you can either specify a custom MFA token provider or use the SDK's built in StdinTokenProvider that will prompt the user for a token code each time the credentials need to to be refreshed. Specifying a custom token provider allows you to control where the token code is retrieved from, and how it is refreshed. With a custom token provider, the provider is responsible for refreshing the token code when called. To assume an IAM role with MFA for longer running tasks where the credentials may need to be refreshed setting the TokenProvider field of AssumeRoleProvider will allow the credential provider to prompt for new MFA token code when the role's credentials need to be refreshed. The StdinTokenProvider function is available to prompt on stdin to retrieve the MFA token code from the user. You can also implement custom prompts by satisfying the TokenProvider function signature. Using StdinTokenProvider with multiple AssumeRoleProviders, or Credentials will have undesirable results as the StdinTokenProvider will not be synchronized. A single Credentials with an AssumeRoleProvider can be shared safely.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/aws/aws-sdk-go-v2/credentials/stscreds
Keywords:
aws
, aws-sdk
, go
, golang
License: Apache-2.0
Latest release: 15 days ago
Namespace: github.com/aws/aws-sdk-go-v2/credentials
Stars: 2,531 on GitHub
Forks: 612 on GitHub
Total Commits: 2384
Committers: 101
Average commits per author: 23.604
Development Distribution Score (DDS): 0.573
More commit stats: commits.ecosyste.ms
See more repository details: repos.ecosyste.ms
Last synced: 15 days ago