hashicorp / hashicorp/vault-plugin-auth-jwt

vault CLI does not receive localhost:8250 redirect after auth

Open
#190 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
107
Forks
73
Avg merge
13h 49m
Merged PRs (30d)
7

Description

I run `VAULT_ADDR=https://vault..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..io vault login -method=oidc
Complete the login via your OIDC provider. Launching browser to:

https://.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 10u IPv4 0t0 TCP localhost:8250 (LISTEN)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the `vault login -method=oidc` flow with `VAULT_ADDR` set and observe the localhost:8250 listener and browser callback. Trace the OIDC callback handling from the CLI entry point; done means the callback code is received and authentication completes instead of timing out.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
authentication, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.