Replies: 3 comments 2 replies
-
@mike-jm are you referring to multiple keys with the same kid but all of them of unique types? If they are of the same type then they should have unique kid. According to the section of the RFC you posted:
|
Beta Was this translation helpful? Give feedback.
-
@mike-jm sorry, I was busy with life and didn't check back into this repository for a few days. Yes, as long as you provide me with testcases and what not I can definitely take a look and try to see how I can solve your issue. |
Beta Was this translation helpful? Give feedback.
-
@lestrrat OK, I will start working on a PR. Do I need to create an issue first, or do you accept PRs without an issue? |
Beta Was this translation helpful? Give feedback.
-
Hello everyone!
In our setting a JWKS can contain multiple keys with the same kid. The standard does not completely rule out this case: https://datatracker.ietf.org/doc/html/rfc7517#section-4.5
In such a case jws.keySetProvider selects only one key and verification of the signature can fail. However, the verification would succeed if jws.keySetProvider selected all the keys matching the kid.
Would you accept a pull request with tests for jws.keySetProvider that changes the behavior to select all keys matching the kid?
IMHO jws.keySetProvider would be the place to put such behavior. But maybe there is a better place.
Regards,
Michael
Beta Was this translation helpful? Give feedback.
All reactions