aws/aws-sdk-cpp

Add SDKOption for default Credentials Provider Chain

MitchellKagerKodiak opened this issue · 3 comments

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 CredentialsProviderChainOptions struct to Aws.h's SDKOptions
  • During InitSDK, check for presence of this struct's closure. If it is present, call some SetDefaultCredentialsProviderChain with the result of the closure. If it is not present, call Set...Chain method with DefaultAWSCredentialsProviderChain (current default)
  • Update all occurrences of DefaultAWSCredentialsProviderChain across clients with GetDefaultCredentialsProviderChain (to resolve to configured value or pre-existing DefaultAWSCredentialsProviderChain).

Other Information

posting a PR right now

Acknowledgements

  • 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.

Thanks for taking the time and effort to make this PR. But we don't want to accept these changes, as we have plans to rework the Credentials Provider.

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.