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

Support multiple keys for jwt authentication #4316

Open
humaidk2 opened this issue Nov 26, 2024 · 0 comments
Open

Support multiple keys for jwt authentication #4316

humaidk2 opened this issue Nov 26, 2024 · 0 comments

Comments

@humaidk2
Copy link

humaidk2 commented Nov 26, 2024

Currently ejabberd errors out if you provide multiple keys for jwt auth.

It would be nice, to have support to verify any key based on jwt auth best practice, as this would allow key rotation,

econf:fail({bad_jwt_key_set, Path});

It should be able to read multiple keys, select the correct key and verify the token based on kid.

The new way of doing things is to accept a url and query it to find list of keys and to validate based on those keys

Sources:

https://auth0.com/docs/secure/tokens/json-web-tokens/json-web-key-sets
https://stytch.com/blog/understanding-jwks/

Edit: Added sources

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

No branches or pull requests

1 participant