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 is burned if context already loaded #618

Open
qrkourier opened this issue Mar 20, 2023 · 4 comments
Open

jwt is burned if context already loaded #618

qrkourier opened this issue Mar 20, 2023 · 4 comments
Assignees

Comments

@qrkourier
Copy link
Member

The app doesn't allow loading an identity with the same name, but it will start enrollment and consume the JWT before it errors. It would be better if it checked for the colliding name first or just allowed two identities with the same name.

@dovholuknf
Copy link
Member

Please provide steps to reproduce

@qrkourier
Copy link
Member Author

  1. In console, create identity "testid" and download "testid.jwt"
  2. In app, add identity "testid.jwt"
  3. In console, delete identity "testid"
  4. In console, create identity "testid" and download "testid.jwt"
  5. In app, add identity "testid.jwt"
  6. In app, observe error "context already loaded"
  7. In app, forget identity "testid"
  8. In app, add identity "testid.jwt"
  9. In app, observe error "enrollment failed" (because JWT was already burned)
  10. In console, re-create identity "testid" and download "testid.jwt"
  11. In app, add identitity "testid" SUCCESS

@JeremyTellier
Copy link

This is a service thing, should be in the tunnel repo.

@qrkourier qrkourier transferred this issue from openziti/desktop-edge-ui Mar 22, 2023
@qrkourier
Copy link
Member Author

qrkourier commented Dec 21, 2023

@scareything I reproduced this with 0.22.19. ZET enrolls the new identity successfully before refusing to load the identity with a colliding context name. I think it should check for a collision before enrolling to avoid burning the token.

❯ ziti-edge-tunnel add --jwt "$(< /tmp/jwt)" --identity miniziti-client
received response <{"Success":false,"Error":"context already loaded","Code":500}
>

zet.log

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

4 participants