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

Add Credentials to aws-config #678

Merged
merged 21 commits into from
Sep 1, 2021
Merged

Add Credentials to aws-config #678

merged 21 commits into from
Sep 1, 2021

Conversation

rcoh
Copy link
Collaborator

@rcoh rcoh commented Aug 31, 2021

Motivation and Context

#655

This config migrates aws-auth-providers into aws-config. This enables a relatively seamless instantiation of service clients.

Description

  • Rename AsyncProvideCredentials to ProvideCredentials
  • Change return type of ProvideCredentials to be a newtype future
  • Migrate credential providers from aws-auth-providers to aws-config
  • Delete aws-auth-providers
  • Change the default credential provider to be an inlined NoCredentials when a service builder is constructed directly.
  • ProvideCredentials now also includes a Debug bound
  • Updated examples that manually set a credentials provider to not (it now comes directly from aws-config)
  • Replace Arc<dyn ProvideCredentials> with the newtype SharedCredentialsProvider in the property bag

Testing

  • Ran some examples manually to verify everything gets wired up e2e.
  • Lots of e2e tests already exist

Checklist

  • I have updated the CHANGELOG

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@rcoh rcoh requested a review from jdisanti August 31, 2021 19:08
Copy link
Collaborator

@jdisanti jdisanti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just some minor questions/comments.

aws/rust-runtime/aws-types/Cargo.toml Show resolved Hide resolved
// `LazyCachingCredentialsProvider` will load credentials if it doesn't have any non-expired
// credentials cached. See the docs on the builder for the various configuration options,
// such as timeouts, default expiration times, and more.
let sts_provider = LazyCachingCredentialsProvider::builder()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about making it possible to directly construct the AssumeRoleProvider so that programmatic (without a profile file) access of assumed role credentials is easy?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's a good goal (although there are actually several different variants to handle, so probably a TODO item)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to leave a breadcrumb: awslabs/aws-sdk-rust#3

@rcoh rcoh force-pushed the aws-config-credentials branch from df04b41 to 3922d83 Compare September 1, 2021 13:40
@rcoh rcoh merged commit 0242158 into main Sep 1, 2021
@rcoh rcoh deleted the aws-config-credentials branch September 1, 2021 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants