ruimarinho / gsts

Obtain and store AWS STS credentials to interact with Amazon services by authenticating via G Suite SAML.
MIT License
219 stars 38 forks source link

Expecting value: line 1 column 1 (char 0) #38

Closed michaelconnor00 closed 3 years ago

michaelconnor00 commented 3 years ago

I am trying to install this tool using the credential_process. I have all the values as per the docs. When I run a test command such as aws sts get-caller-identity or aws ec2 describe-instances, I get the following output Expecting value: line 1 column 1 (char 0). I must be missing something.

I am a Linux user if it helps.

ruimarinho commented 3 years ago

Have you tried running in verbose mode to see if the output matches your credentials?

michaelconnor00 commented 3 years ago

Here is a verbose output.

➜ gsts --aws-role-arn arn:aws:iam::<account_id>:role/aws-reserved/sso.amazonaws.com/AdministratorAccess --sp-id <sp_id> --idp-id <idp_id> --verbose
ℹ Attempting to retrieve session expiration credentials
ℹ Request to "https://us-east-1.signin.aws.amazon.com/platform/saml/acs/<some_id>" has been aborted

Edit: When I run the above command without --verbose it sits at the spinner Logging in.

ruimarinho commented 3 years ago

@michaelconnor00 it seems like sso.amazonaws.com uses a different flow to authenticate. Can you tell me which requests are made when? I believe that domain must be whitelisted, or gsts will automatically abort the request.

michaelconnor00 commented 3 years ago

The awscli v2 had the sso support we needed. I don't think I understood what I needed when I created this issue. I will close it. Thanks.

ruimarinho commented 3 years ago

@michaelconnor00 are you using AWS SSO with Google Workspace?

michaelconnor00 commented 3 years ago

Yes.

On Mon, 1 Feb 2021 at 16:45, Rui Marinho notifications@github.com wrote:

@michaelconnor00 https://github.com/michaelconnor00 are you using AWS SSO with Google Workspace?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ruimarinho/gsts/issues/38#issuecomment-771264300, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3PPL55HKXOPXRHYNME2OLS45DL5ANCNFSM4UVPBTLA .