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 support for SSO bearer token authentication to the SDK #3453

Merged
merged 26 commits into from
Mar 6, 2024

Conversation

jdisanti
Copy link
Collaborator

@jdisanti jdisanti commented Mar 1, 2024

This PR adds support for SSO bearer token authentication to the AWS SDK, specifically for Code Catalyst, which requires authentication via SSO with a Builder ID using a bearer token rather than SigV4.

This functionality was developed in a feature branch, and this PR merely merges that branch to main. The changes consist of the following previous PRs:

All these changes have been reviewed in the previous PRs, but it would be good to review this again as a whole to verify it all looks good.


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

This PR creates a trait to provide access tokens, which will be used to
configure token providers in `SdkConfig`.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
@jdisanti jdisanti marked this pull request as ready for review March 1, 2024 02:05
@jdisanti jdisanti requested review from a team as code owners March 1, 2024 02:05
jdisanti added a commit that referenced this pull request Mar 1, 2024
This PR adds the Code Catalyst service to the smoke test models, which
is already done as part of #3453, but having it as a separate commit
that merges before #3453 will allow us to see a codegen diff on the Code
Catalyst service during review of that feature.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
@smithy-lang smithy-lang deleted a comment from github-actions bot Mar 1, 2024
Copy link

github-actions bot commented Mar 1, 2024

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

Copy link
Contributor

@ysaito1001 ysaito1001 left a comment

Choose a reason for hiding this comment

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

Ship it 🚀

Comment on lines +84 to +86
/// Note: the [`Self::bearer_token`] and [`Self::bearer_token_resolver`] methods are
/// equivalent to this method, but take the [`Token`] and [`ResolveIdentity`] types
/// respectively.
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for adding these notes!

aws/rust-runtime/aws-config/src/profile/token.rs Outdated Show resolved Hide resolved
/// ```no_run
/// make_test!(live: test_name)
/// ```
macro_rules! make_test {
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we give this macro a different name?

Comment on lines +490 to +497
let err = DisplayErrorContext(
&self
.token_provider
.resolve_token(self.time_source.clone())
.await
.expect_err("expected failure"),
)
.to_string();
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should make an extension trait that does this

Copy link

github-actions bot commented Mar 6, 2024

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@jdisanti jdisanti enabled auto-merge March 6, 2024 20:58
Copy link

github-actions bot commented Mar 6, 2024

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@jdisanti jdisanti added this pull request to the merge queue Mar 6, 2024
Merged via the queue into main with commit 58a14ca Mar 6, 2024
40 of 41 checks passed
@jdisanti jdisanti deleted the feature-sso-token-providers branch March 6, 2024 21:48
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.

4 participants