aws-sdk-cpp
aws-sdk-cpp copied to clipboard
Add SDKOption for default Credentials Provider Chain
Describe the feature
Every service client accepts an AwsCredentialsProviderChain that determines how credentials are resolved. It should be possible to configure a default during SDK initialization.
Use Case
STSProfileCredentialsProvider does not exist in default chain [150]. In certain codebases, it would be much more code-efficient to configure the credentials provider chain during initialization as opposed to passing a chain to construction of every client object.
Proposed Solution
- Add a new
CredentialsProviderChainOptionsstruct toAws.h's SDKOptions - During
InitSDK, check for presence of this struct's closure. If it is present, call someSetDefaultCredentialsProviderChainwith the result of the closure. If it is not present, callSet...Chainmethod withDefaultAWSCredentialsProviderChain(current default) - Update all occurrences of
DefaultAWSCredentialsProviderChainacross clients withGetDefaultCredentialsProviderChain(to resolve to configured value or pre-existingDefaultAWSCredentialsProviderChain).
Other Information
posting a PR right now
Acknowledgements
- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
Thanks for opening this feature request and creating a PR to add this option. We are reviewing your PR to see if we would like to accept this changes and change how the credentials work.