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

[TT-13403] No matching KID could be found on rotated JWKS #6378

Open
hisabimbola opened this issue Jun 27, 2024 · 0 comments
Open

[TT-13403] No matching KID could be found on rotated JWKS #6378

hisabimbola opened this issue Jun 27, 2024 · 0 comments

Comments

@hisabimbola
Copy link

Branch/Environment/Version

  • Branch/Version: v5.2.5
  • Environment: On-prem

Describe the bug
We get a 403 error with 'No matching KID..." on token that are created with newly created keypair that is not in the cache. Usually after 1 minute or 2, the cache will be invalidated in tyk and this token will be validated successfully.

Reproduction steps
Steps to reproduce the behavior:

  1. Add api and continue JWT with jwksSource
  2. Run the first request and Tyk will make call to get the keys and it'll cache it
  3. Create a new jwt token with a new keypair and call the api with this token (Note must be within 4 minutes as this is the max configured in Tyk jwt cache)
  4. The request will fail with 403 status code

Actual behavior
The request will fail with 403 status code

Expected behavior
If the key is not present, Tyk should invalidate the cache and go to jwkSource to get a updated key before failing the request

Screenshots/Video
If applicable, add screenshots or video to help explain your problem.

Logs (debug mode or log file):
Log from console or from log file.

Configuration (tyk config file):
Attach tyk configuration file

Additional context
Another possibility is to expose the ability to disable the cache in the jwt middleware. This is currently hard coded as seen here

@andyo-tyk andyo-tyk changed the title No matching KID could be found on rotated JWKS [TT-13403] No matching KID could be found on rotated JWKS Oct 25, 2024
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

2 participants