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 sso-support #3610

Closed
wants to merge 1 commit into from
Closed

Add sso-support #3610

wants to merge 1 commit into from

Conversation

antonosmond
Copy link

Currently the SDK doesn't support SSO tokens for authentication.
This is an attempt to add support for SSO tokens to address this issue by fetching the token from the CLI SSO cache and exchanging it for a set of temporary credentials via the sso.GetRoleCredentials method.
I'm not really sure if this is a suitable approach (I tried to copy roughly what the WebIdentityProvider does) but this does seem to work as I expect however I'd welcome help and feedback to get this PR moving forwards.
There's still a fair bit to do e.g. adding tests but I wanted to get some feedback before investing too much time in this.
Thanks!

@borgoat
Copy link

borgoat commented Nov 24, 2020

Hey @antonosmond !
I just wanted to say that I tested the code and it works fine for me.
The only part that I find counter-intuitive here (but I guess this is more a question to the maintainers) is that SSO credentials only get loaded if AWS_SDK_LOAD_CONFIG is set. I believe this differs from the default behaviour of Boto?

From the Go SDK docs:

By default NewSession will only load credentials from the shared credentials file (~/.aws/credentials). If the AWS_SDK_LOAD_CONFIG environment variable is set to a truthy value the Session will be created from the configuration values from the shared config (~/.aws/config) and shared credentials (~/.aws/credentials) files. Using the NewSessionWithOptions with SharedConfigState set to SharedConfigEnable will create the session as if the AWS_SDK_LOAD_CONFIG environment variable was set.

@mforutan
Copy link

This is almost all we need to switch to AWS SSO. what is the next step?

@skmcgrail
Copy link
Member

Sorry for the delay in this feature becoming available within this SDK. This feature work was completed in #3755 and was released a v1.37.0.

@skmcgrail skmcgrail closed this Jan 29, 2021
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