-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
SSO Cache filename should be based on sso_session
in addition to sso_start_url
#5184
Comments
Hi @schrobot , Can you please update your SDK version? we are in 1.5x, you are using 1.24.1 which is 5 years old. |
Hi Ran, thanks for getting back. I don't own the code that is giving me this error -- I am trying to use https://github.com/awslabs/amazon-ecr-credential-helper and it seemed like the error described above is what's happening. I can file the issue against that repository if they just need to update the SDK version. That said, from reading the latest code in this repo, it seems like it would still be an issue? Thanks, |
Close the issue as the same issue has been solved for v2 |
Comments on closed issues are hard for our team to see. |
Describe the bug
The SSO cache files in
~/.aws/sso/cache
have filenames based only on thestartUrl
. Other SDKs, namely the Python SDK, and seemingly what the AWS CLI uses, actually use thesso_session
if provided, and fallback to thesso_start_url
otherwise. This leads to issues where if I login via theaws
CLI, with a profile that has asso_session_name
configured, tools that use thego
SDK, like https://github.com/awslabs/amazon-ecr-credential-helper, fail to correctly find my cached credentials and produce authentication errors.See https://github.com/boto/botocore/blob/master/botocore/utils.py#L3354 and
aws-sdk-go/aws/credentials/ssocreds/provider.go
Line 121 in 1a86d22
Expected Behavior
The
go
SDK should generate the same filenames as the other SDKs and CLI.Current Behavior
The
go
SDK computes the filename only based on the start URL, which makes it unable to find the right cached credential file produced by the CLI.Reproduction Steps
~/.aws/config
enabled for SSO, that has asession-name
aws sso login --profile <that profile>
retrieve
aws-sdk-go/aws/credentials/ssocreds/provider.go
Line 98 in 1a86d22
Possible Solution
Replicate the logic in the botocore SDK
Additional Information/Context
No response
SDK version used
1.24.1
Environment details (Version of Go (
go version
)? OS name and version, etc.)1.19
The text was updated successfully, but these errors were encountered: