[Openid-specs-ab] Issue #1127: Are duplicate "kid"s in jwks permitted under OpenID Connect (openid/connect)

josephheenan issues-reply at bitbucket.org
Fri Nov 22 11:47:50 UTC 2019


New issue 1127: Are duplicate "kid"s in jwks permitted under OpenID Connect
https://bitbucket.org/openid/connect/issues/1127/are-duplicate-kid-s-in-jwks-permitted

Joseph Heenan:

The method for selecting in a key from a JWKS using kid under OpenID Connect is not really documented, and different RP libraries appear to take slightly different strategies.

The certification team recently discovered that in some cases the tests were effectively rejecting OPs where the JWKS contained multiple keys that contained the same kid.

[https://tools.ietf.org/html/rfc7517#section-4.5](https://tools.ietf.org/html/rfc7517#section-4.5) says:

>  When "kid" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct "kid" values.                 

and:

> \(One example in which different keys might use the same "kid" value is if    they have different "kty" \(key type\) values but are considered to be equivalent alternatives by the application using them.\) 

‌

For interoperability purpose it would seem sane to suggest that all keys should have a unique kid, allowing the RP to very easily identify the correct key to use for verification. \(although RFC7517 suggests it is okay to have duplicate kids if the kty field is different between the keys.\)

The certification would like to know how the Connect working group view this, in particular, should the certification suite:

‌

1. Raise a warning if it finds duplicate kids in the JWKS, but allow certification
2. Raise an error if it finds duplicate in the JWKS, preventing such implementations from certifying

‌

\(For related background, the certification profiles already require that a kid is provided in the id\_token if RS256 is in use, regardless of the number of keys in the JWKS.\)

‌




More information about the Openid-specs-ab mailing list