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

vault CLI does not receive localhost:8250 redirect after auth #190

Open
mipnw opened this issue Dec 6, 2021 · 3 comments
Open

vault CLI does not receive localhost:8250 redirect after auth #190

mipnw opened this issue Dec 6, 2021 · 3 comments

Comments

@mipnw
Copy link

mipnw commented Dec 6, 2021

I run VAULT_ADDR=https://vault.<mydomain>.io vault login -method=oidc in a shell on MacOS and see Google Chrome open, i'm asked to authenticate with credentials, then the browser redirects to http://localhost:8250/oidc/callback?code=[redacted]&state=[redacted]. Vault CLI however does not seem to receive that code, it eventually times out with

> $ VAULT_ADDR=https://vault.<mydomain>.io vault login -method=oidc
Complete the login via your OIDC provider. Launching browser to:

    https://<mydomain>.okta.com/oauth2/default/v1/authorize?client_id=[redacted]&nonce=[redacted]&redirect_uri=http%3A%2F%2Flocalhost%3A8250%2Foidc%2Fcallback&response_type=code&scope=openid+profile+groups+email&state=[redacted]


Waiting for OIDC authentication to complete...
Error authenticating: Timed out waiting for response from provider

Vault CLI does seem to open listening port 8250 on localhost (before it times out, closes it after the timeout) so I'm puzzled...

$ sudo lsof -i -P | grep LISTEN | grep 8250
vault     42874    <myusername>   10u  IPv4      0t0  TCP localhost:8250 (LISTEN)
@kalafut
Copy link
Contributor

kalafut commented Dec 6, 2021

What does chrome say (e.g. the network tab)?

@mipnw
Copy link
Author

mipnw commented Dec 6, 2021

Chrome displays

This page isn’t working
localhost didn’t send any data.
ERR_EMPTY_RESPONSE

@DrDaveD
Copy link

DrDaveD commented Dec 8, 2021

Pr #30 would probably help with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants