Versent / saml2aws

CLI tool which enables you to login and retrieve AWS temporary credentials using a SAML IDP
https://github.com/Versent/saml2aws
MIT License
2.06k stars 563 forks source link

Error authenticating to IdP.: error retrieving auth response: Post "https:///api/v1/authn": http: no Host in request URL #1102

Open Candide7 opened 1 year ago

Candide7 commented 1 year ago

Hello, I've got an issue while trying to login to Okta. Ubuntu 22.04.2. Tested Version: 2.35.0 and 2.36.10

Here is a screenshot of an issue with KDEWallet prompting for nothing but it doen't seem to be blocking (just painful) Screenshot from 2023-07-31 18-22-06

Any thoughts please?

EdgeJ commented 4 months ago

I'm seeing the same when attempting to login via Okta on macOS:

➜ saml2aws configure
? Please choose a provider: Okta
? Please choose an MFA OKTA
? AWS Profile saml
? URL <REDACTED>.okta.com
? Username <REDACTED>
? Password
No password supplied
No password supplied

account {
  DisableSessions: false
  DisableRememberDevice: false
  URL: <REDACTED>.okta.com
  Username: <REDACTED>
  Provider: Okta
  MFA: OKTA
  SkipVerify: false
  AmazonWebservicesURN: urn:amazon:webservices
  SessionDuration: 3600
  Profile: saml
  RoleARN:
  Region:
}

Configuration saved for IDP account: default

➜ saml2aws login
Using IdP Account default to access Okta <REDACTED>.okta.com
To use saved password just hit enter.
? Username <REDACTED>
? Password *******************

Authenticating as <REDACTED> ...
Error authenticating to IdP.: error retrieving auth response: Post "https:///api/v1/authn": http: no Host in request URL

Despite having a correctly configured url (and verifying that it's set in ~/.saml2aws), the application drops the hostname when forming the url in the login command.