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

JWT login not working in UI #15223

Closed
lucadepaoli opened this issue Apr 29, 2022 · 1 comment · Fixed by #16466
Closed

JWT login not working in UI #15223

lucadepaoli opened this issue Apr 29, 2022 · 1 comment · Fixed by #16466
Labels
auth/jwt-oidc bug Used to indicate a potential bug ui

Comments

@lucadepaoli
Copy link

Describe the bug
JWT login is not working in the web UI, login from CLI/API works correctly.
Trying to login via the web UI using a JWT token fails with the error "Authentication failed: permission denied", but the /auth/jwt/login endpoint is never called.

To Reproduce
Steps to reproduce the behavior:

  1. Run vault auth enable jwt
  2. Run vault write auth/jwt/config oidc_discovery_url="https://login.example.com/" default_role="guest"
  3. Open the web UI and try to login with a JWT token

Expected behavior
Login works correctly (given the guest roles exists), "Authentication failed: role "guest" could not be found" error otherwise.

Environment:

Vault server configuration file(s):

storage "raft" {
  path    = "/some/storage/path"
  node_id = "node1"
}

listener "tcp" {
  address     = "127.0.0.1:8200"
  tls_disable = "true"
}

api_addr = "http://127.0.0.1:8200"
cluster_addr = "https://127.0.0.1:8201"
ui = true
disable_mlock = true

Additional context
This bug is present in version 1.8.10, 1.9.5, 1.10.0 and 1.10.1. I haven't found other Vault version affected.
I think this bug might be related to PR #14545: in ui/app/components/auth-form.js, at line 248, changing back to let backend = this.selectedAuthBackend || {}; the login works correctly, but I don't know if there are any other impacts.

@austingebauer austingebauer added ui bug Used to indicate a potential bug auth/jwt-oidc labels Apr 29, 2022
@austingebauer
Copy link
Member

@lucadepaoli - Thanks for opening this issue. I'm not certain if it will work, but there was a UI workaround for the related OIDC login issue. I'd suggest to give that workaround a try with JWT auth until we can get this fixed.

cc: @zofskeez

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth/jwt-oidc bug Used to indicate a potential bug ui
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants