moritzheiber / crowbar

Securily generates temporary AWS credentials through identity providers using SAML
Apache License 2.0
34 stars 13 forks source link

Could not find SAML element in HTML response #5

Closed autarchprinceps closed 2 years ago

autarchprinceps commented 3 years ago
Authentication successful!
Could not find SAML element in HTML response

I always get this, when trying to use crowbar. It also only asked me for my password, never one of my MFA options.

moritzheiber commented 3 years ago

Hey, thank you for using crowbar. Could you give me some more details about the profile you're connecting with? e.g. are you using Okta or Jumpcloud, which factors do you have configured etc

JosephKiranBabu commented 3 years ago

I have the same issue when using Okta. I was trying to get a temporary STS token for my user using SAML auth.

Did a cargo install crowbar on Debian testing (after installing libssl-dev and libdbus-1-dev).

$ crowbar --version                     
crowbar 0.3.7

$ crowbar profiles add profilename -u username -p okta --url https://myorg.okta.com
Profile profilename added successfully!

$ AWS_PROFILE=profilename aws s3 ls
Password for username at myorg.okta.com: [hidden]
Please select the factor to use:
Enter MFA code: 123456
Authentication successful!
Could not find SAML element in HTML response

Error when retrieving credentials from custom-process: 

$ crowbar exec profilename -- aws s3 ls                                                  
Please select the factor to use:
Enter MFA code: 123456
Authentication successful!
Could not find SAML element in HTML response

~/.aws/config looks like this

[profile profilename]
credential_process=sh -c 'crowbar creds profilename -p 2> /dev/tty'
moritzheiber commented 3 years ago

@autarchprinceps I've done some debugging with @JosephKiranBabu, and can you verify for me that you are actually using the "full" URL for your profile? The process is described here:

image

(and excerpt from the README)

The URL should like something like https://myorg.okta.com/home/amazon_aws/1234567djdjak/123?fromHome=true

moritzheiber commented 2 years ago

I'm going to close this issue for the time being as I would wager you've either moved on, resolved the issue in the meantime or cannot reproduce it anymore. Should it persist, please don't refrain from opening another issue. Thanks :heart: