Skip to content

Delay SSO options validation until they are used #1850

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

Closed
wants to merge 1 commit into from

Conversation

KenHundley
Copy link
Contributor

Description

Currently if you are using a SSO profile and you do not configure a ClientName or SsoVerificationCallback in your application it will always fail to execute, even if these values aren't currently necessary because of a cached SSO token.

This change allows the use of SSO Profiles without needing to add SSO specific code into the project. You can use applications like the AWS CLI v2 to authenticate and cache an SSO auth token that can then be used by any application pointing to that profile, until that token expires. This does not remove any current validations, but simply delays the validation until the values are actually needed.

Motivation and Context

This is related to the issue: #1821

Testing

I executed the Unit Tests in the solution and they all passed

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed

License

  • I confirm that this pull request can be released under the Apache 2 license

@philasmar philasmar requested a review from normj May 11, 2021 16:07
@KenHundley
Copy link
Contributor Author

Quick update. I did some additional testing today and this also removed the need to install the SSOOIDC package when using an SSO profile. Since you can do the SSO signin outside of the app, like with the aws sso login cli command, the code does not need the SSOOIDC project when using a cached token.

@boyersnet
Copy link

Thank you for this @KenHundley! We are eagerly awaiting the merge and distribution of this update to allow us to proceed with our SSO adoption.

@ashovlin
Copy link
Member

ashovlin commented May 19, 2021

This has been merged manually via 537a981 and released today in version 3.7.36.1 of the SDK (version 3.7.0.23 of AWSSDK.Core).

Manually marking this as closed (I don't think we preserved the commit hash when testing and building this internally, so GitHub won't autoclose).

Thanks for the contribution @KenHundley!

@ashovlin ashovlin closed this May 19, 2021
@boyersnet
Copy link

boyersnet commented May 19, 2021

Thank you all! I was able to get my .net core test project to work with AWS CLI v2 sso login. I did however have to keep the AWSSDK.SSOOIDC package reference.

I have created AWSSSO.S3Buckets as a sample project for demonstration purposes.

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.

5 participants