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 JWKS files #128

Open
mikerobe opened this issue May 1, 2024 · 1 comment
Open

Support JWKS files #128

mikerobe opened this issue May 1, 2024 · 1 comment

Comments

@mikerobe
Copy link

mikerobe commented May 1, 2024

To handle key rotation, from what I understand it's common to have a JSON Web Key Set (JWKS) file (related standard) that contains a collection of JSON Web Keys (represented as JSON dictionaries). Each of these keys in an array in the file has a key identifier (kid). The JWKS contains the public information for all of these keys.

When a token comes in to be validated, the process doing the validation extracts the kid from the token, finds the appropriate public key from the JWKS to use to perform the validation and then runs it, most likely storing a map in memory from kid to key.

JWKS files are supported by the commercial ngx_http_auth_jwt_module via the auth_jwt_key_file command, which points to the file continuing the keys.

From what I can tell, the TeslaGov/ngx-http-auth-jwt-module can use a file but it refers to a single PEM key.

Is there any support for JWKS files or any plan to support it? I'm not sure how difficult that would be. It seems to be the standard format and allows for supporting multiple keys for validation (which enables key rotation without invalidating all the existing tokens).

@DimitriosLisenko
Copy link

Also would love to see some support for JWKs.

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

2 participants