You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that Boto core was updated in boto/botocore@af86417 to cache SSO tokens based on the sso-session name if it's set. See the updated _generate_cache_key function. The rust SDK still uses the old method of just using the start_url and not the session name, see the sso_token_path function.
Expected Behavior
Find the correct cached SSO credentials.
Current Behavior
If your .aws/config contains a configured sso_session, which is recommended and promoted by the aws configure sso wizard. aws sso login --profile **** stores the cached SSO credentials in a file named after the hash of the session name. When loaded in rust, the cache is not found
`/Users/***/.aws/sso/cache/e7109c80c9aa657df146180817236f33d6854cc6.json`: No such file or directory (os error 2): No such file or directory (os error 2) (ProviderError(ProviderError { source: IoError { err: Os { code: 2, kind: NotFound, message: "No such file or directory" }, path: "/Users/***/.aws/sso/cache/e7109c80c9aa657df146180817236f33d6854cc6.json" } }))
2023-02-14T05:14:30.167Z WARN [aws_config::meta::credentials::chain] provider failed to provide credentials provider=Profile error=an error occurred while loading credentials: an error occurred while loading credentials: failed to read `/Users/***/.aws/sso/cache/e7109c80c9aa657df146180817236f33d6854cc6.json`: No such file or directory (os error 2): No such file or directory (os error 2) (ProviderError(ProviderError { source: ProviderError(ProviderError { source: IoError { err: Os { code: 2, kind: NotFound, message: "No such file or directory" }, path: "/Users/***/.aws/sso/cache/e7109c80c9aa657df146180817236f33d6854cc6.json" } }) }))
Error: failed to construct request
Caused by:
0: failed to load credentials from the credentials cache
1: an error occurred while loading credentials
2: an error occurred while loading credentials
3: failed to read `/Users/***/.aws/sso/cache/e7109c80c9aa657df146180817236f33d6854cc6.json`: No such file or directory (os error 2)
4: No such file or directory (os error 2)
Reproduction Steps
Create a .aws/config with a SSO profile and a configured sso_session. Use the aws cli to grab a token and then use a the Rust SDK DefaultCredentialsChain to load the token
Possible Solution
See the python code, sso_token_path needs to use the sso_session name if set.
### Environment details (OS name and version, etc.)
Darwin zoidberg 20.6.0 Darwin Kernel Version 20.6.0: Fri Dec 16 00:35:00 PST 2022; root:xnu-7195.141.49~1/RELEASE_X86_64 x86_64
### Logs
_No response_
The text was updated successfully, but these errors were encountered:
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
Hi!
It seems that Boto core was updated in boto/botocore@af86417 to cache SSO tokens based on the sso-session name if it's set. See the updated _generate_cache_key function. The rust SDK still uses the old method of just using the
start_url
and not the session name, see the sso_token_path function.Expected Behavior
Find the correct cached SSO credentials.
Current Behavior
If your .aws/config contains a configured
sso_session
, which is recommended and promoted by theaws configure sso
wizard.aws sso login --profile ****
stores the cached SSO credentials in a file named after the hash of the session name. When loaded in rust, the cache is not foundReproduction Steps
Create a
.aws/config
with a SSO profile and a configuredsso_session
. Use the aws cli to grab a token and then use a the Rust SDKDefaultCredentialsChain
to load the tokenPossible Solution
See the python code,
sso_token_path
needs to use thesso_session
name if set.Additional Information/Context
No response
Version
The text was updated successfully, but these errors were encountered: