Unable to access SSO credentials due to msimatch in hashing behavior compared to the AWS CLI #3412
Labels
bug
This issue is a bug.
needs-review
This issue or pull request needs review from a core team member.
p2
This is a standard priority issue
Describe the bug
If the
sso_start_url
ends with/#
, then there's a difference in the hashes computed byaws sso login
(which includes the#
) and this CPP client (which excludes the#
). These hashes are used as the filenames in~/.aws/sso/cache/*.json
, so the CPP client can't find the sso cache file, so it fails to connect and prints a 403 error.Regression Issue
Expected Behavior
After I run
aws sso login
andaws s3 ls
(both successful), I can also access S3 resources using this CPP client.Current Behavior
Despite
aws sso login
andaws s3 ls
both succeeding, the CPP client reports the error:Reproduction Steps
Use a
sso_start_url
that ends with#
in~/.aws/config
.(If you already have cached credentials for that start url without the
#
, also delete the caches.)Possible Solution
From the behavior I've seen, I suspect that
GetCachedConfigProfile
is normalizing the url (removing the trailing#
) before its hashed bySSOCredentialsProvider
. It should be normalizing after hashing, instead.Additional Information/Context
No response
AWS CPP SDK version used
1.11.555
Compiler and Version used
clang v16.0.6
Operating System and version
Linux Mint 22.1 (essentially equivalent to Ubuntu 24.04)
The text was updated successfully, but these errors were encountered: