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

Cannot use SSO credentials #438

Closed
geekingfrog opened this issue Feb 3, 2022 · 7 comments
Closed

Cannot use SSO credentials #438

geekingfrog opened this issue Feb 3, 2022 · 7 comments
Assignees
Labels
bug This issue is a bug. investigating This issue is being investigated and/or work is in progress to resolve the issue.

Comments

@geekingfrog
Copy link

geekingfrog commented Feb 3, 2022

What is the problem?

I run the official aws cli to configure SSO credentials and everything works. I set up the env var AWS_PROFILE to the right value, and running aws s3 ls works as expected.
However, when trying to run some code using the rust sdk I am greeted with:

Error: failed to construct request: Failed to load credentials from the credentials provider: An error occurred while loading credentials: An error occurred while loading credentials: SSO Token was invalid (expected JSON): Invalid field in response: `expiresAt`. invalid date-time: invalid RFC-3339 date-time: the 'offset hour' component could not be parsed

Caused by:
    Failed to load credentials from the credentials provider: An error occurred while loading credentials: An error occurred while loading credentials: SSO Token was invalid (expected JSON): Invalid field in response: `expiresAt`. invalid date-time: invalid RFC-3339 date-time: the 'offset hour' component could not be parsed

Under ~/.aws/sso/cache there are three json files with the following content:

{
  "startUrl": "REDACTED",
  "region": "eu-west-1",
  "accessToken": "REDACTED",
  "expiresAt": "2021-12-07T01:19:12UTC"
}
{
  "startUrl": "REDACTED",
  "region": "eu-west-1",
  "accessToken": "REDACTED",
  "expiresAt": "2022-02-03T19:44:13UTC"
}
{
  "clientId": "REDACTED",
  "clientSecret": "REDACTED",
  "expiresAt": "2022-02-23T10:56:02UTC"
}

Version

0.6.0

Platform

Linux arch-desktop 5.16.2-arch1-1 #1 SMP PREEMPT Thu, 20 Jan 2022 16:18:29 +0000 x86_64 GNU/Linux

@geekingfrog geekingfrog added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 3, 2022
@Velfi Velfi added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Feb 3, 2022
@Velfi Velfi self-assigned this Feb 3, 2022
@Velfi
Copy link
Contributor

Velfi commented Feb 3, 2022

Thanks for submitting this issue. I'm looking into it. In the meantime, can you post the version of the AWS CLI that you're using? We'd expect the expiresAt dates to end with Z instead of UTC.

@geekingfrog
Copy link
Author

$ aws --version
aws-cli/2.0.56 Python/3.7.3 Linux/5.16.2-arch1-1 exe/x86_64.arch

@Velfi
Copy link
Contributor

Velfi commented Feb 3, 2022

v2.0.56 of the CLI was released on Oct 8 , 2020, are you able to update to a more recent version an see if that fixes things? I believe v2.4.12 is the latest.

@geekingfrog
Copy link
Author

Alright, I updated my cli to latest version, and indeed, the expiresAt field now ends with a Z.
Feel free to close the bug if you don't plan to support older format.

@Velfi Velfi closed this as completed Feb 3, 2022
@github-actions
Copy link

github-actions bot commented Feb 3, 2022

⚠️COMMENT VISIBILITY WARNING⚠️

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.

@mrjeanjoseph
Copy link

I just ran into a similar issue. mine return error:
SSL validation failed for https://oidc.us-east-1.amazonaws.com/client/register [Errno 2] No such file or directory

I am getting this error when trying to configure sso with or w/o --no-verify-ssl

@jdisanti
Copy link
Contributor

jdisanti commented Dec 7, 2022

@mrjeanjoseph - That looks like a different problem. Please file a separate issue or discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. investigating This issue is being investigated and/or work is in progress to resolve the issue.
Projects
None yet
Development

No branches or pull requests

4 participants