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
Use the SSOTokenProvider in the SSOCredentialProvider #3532
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
03daff3
to
bb973b7
Compare
bb973b7
to
87cf7eb
Compare
zoewangg
reviewed
Nov 3, 2022
core/auth/src/main/java/software/amazon/awssdk/auth/credentials/ProviderSpec.java
Outdated
Show resolved
Hide resolved
core/auth/src/main/java/software/amazon/awssdk/auth/credentials/ProviderSpec.java
Outdated
Show resolved
Hide resolved
.../src/main/java/software/amazon/awssdk/auth/credentials/internal/ProfileCredentialsUtils.java
Show resolved
Hide resolved
pom.xml
Outdated
| @@ -577,7 +577,7 @@ | |||
| <includeModules> | |||
| <includeModule>annotations</includeModule> | |||
| <includeModule>arns</includeModule> | |||
| <includeModule>auth</includeModule> | |||
| <!-- <includeModule>auth</includeModule>--> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of excluding the whole module, should we add the offending class to the excludes list to reduce the blast radius in case we forget to revert this?
...main/java/software/amazon/awssdk/services/sso/auth/SsoProfileCredentialsProviderFactory.java
Outdated
Show resolved
Hide resolved
...main/java/software/amazon/awssdk/services/sso/auth/SsoProfileCredentialsProviderFactory.java
Outdated
Show resolved
Hide resolved
services/sso/src/main/java/software/amazon/awssdk/services/sso/internal/SsoAccessToken.java
Outdated
Show resolved
Hide resolved
...main/java/software/amazon/awssdk/services/sso/auth/SsoProfileCredentialsProviderFactory.java
Outdated
Show resolved
Hide resolved
core/auth/src/main/java/software/amazon/awssdk/auth/credentials/ProviderSpec.java
Outdated
Show resolved
Hide resolved
zoewangg
reviewed
Nov 4, 2022
...src/main/java/software/amazon/awssdk/auth/credentials/ProfileProviderCredentialsContext.java
Outdated
Show resolved
Hide resolved
...main/java/software/amazon/awssdk/services/sso/auth/SsoProfileCredentialsProviderFactory.java
Outdated
Show resolved
Hide resolved
…n has same sso_start_url
zoewangg
approved these changes
Nov 4, 2022
...src/main/java/software/amazon/awssdk/auth/credentials/ProfileProviderCredentialsContext.java
Outdated
Show resolved
Hide resolved
f681848
to
f9790ab
Compare
|
SonarCloud Quality Gate failed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.








Motivation and Context
sso-sessions will be defined in a profile. In this case the SSOCredentialProvider should use SSOTokenProvider.
Profile format
The SSO credential provider MUST support both the profile format defined for the SSO Token Providers
and the legacy profile format defined here.
If either the
sso_account_idorsso_role_nameconfigurations values are present the profile MUST be resolved by the SSO credential provider.Acquiring AWS Credentials
First, the
SSOCredentialProvidershould acquire a token, either using the SSOTokenProvider or the legacy Access tokens. The token MUST NOT be cached in memory and every attempt to resolve credentials MUST result in reloading the token to ensure the latest token is being used.Concrete AWS credentials will be retrieved using the
SSOdata plane service. The SDK client for this service MUST be constructed with the client region as specified in thesso_regionprofile configuration. The SDK MAY explicitlyspecify anonymous credentials or configure the client to be unsigned though this SHOULD NOT be required by the SDK for the client to function.
Modifications
SsoProfileCredentialsProviderFactoryto load SdkTokenProvider based on profile properties.Testing
Screenshots (if appropriate)
Types of changes
Checklist
scripts/new-changescript and following the instructions. Commit the new file created by the script in.changes/next-releasewith your changes.License