-
Notifications
You must be signed in to change notification settings - Fork 15
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
Go back once to JWKS resource if kid is unknown #801
Comments
This is a source of DoS. An attacker could send random |
In the |
The lookup of unknown keys would allow to cache a JWKS response forever (which ends with the next restart). We could change the default TTL for JWKS to forever (or a much longer value than one hour) or even remove the possibility to define the TTL completely. But in case an unknown KID is received in a token, the refresh must be synchronous and we have to hold the request until ready. A short TTL would allow to retrieve new keys in the background without interrupting traffic - but obviously it depends on the implementation of the signer if keys are ever published well before use. |
|
From https://openid.net/specs/openid-connect-core-1_0.html#RotateSigKeys:
IdPs may add a public key to JWKS and use the corresponding private key right away to sign JWT.
Couper will currently not recognize this change (until it syncs JWKS) and throw an error, because it can't find a key for the new
kid
in its cached JWKS.So instead of throwing an error, Couper should first sync JWKS, then try again to find the key.
This may also apply to the jwt access control.
The text was updated successfully, but these errors were encountered: