-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
How can I check validity of the JWT token? #417
Comments
The existing If offloading signature verification would be helpful, we can add a built-in to do this but it would be on the deployment to ensure that the key doesn't get leaked, gets rotated, etc. |
@tsandall also if there would be access to environment variables in OPA policy description then this could be place for storing secret key. Because without verification JWT functionality is quite useless as anyone can now check for everything they want. |
Adding support to access environment vars sounds like a good start. I'll create two feature issues to track this:
@hauleth Do you know which signature scheme would be most useful to support first? |
@tsandall I think that HS* family is most popular one, however there are ready to use libraries that allow verification (list on https://jwt.io) and this seems promising https://github.com/dgrijalva/jwt-go But remember to https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/ |
@hauleth thanks for reaching out. I've created two separate issues to track the improvements required. If you think this should be re-opened for some reason, go ahed and do so or just comment. Thanks! |
From documentation I see that
io.jwt.decode
accepts only 1 argument however JWT documentation also requires "secret key" required for validation. Is there any way to check if given JWT is valid one or OPA will happily accept everything as valid?The text was updated successfully, but these errors were encountered: