0
votes

As per the JWK specification 'kid' is defined as follows.

The "kid" (key ID) parameter is used to match a specific key. This
is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the "kid" value is
unspecified. When "kid" values are used within a JWK Set, different
keys within the JWK Set SHOULD use distinct "kid" values. (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.) The "kid"
value is a case-sensitive string. Use of this member is OPTIONAL.
When used with JWS or JWE, the "kid" value is used to match a JWS or
JWE "kid" Header Parameter value.

Can we use the certificate thumbprint as the 'kid' value here since it directly identifies the key used to sign the JWT? What are the drawbacks of using the certificate thumbprint as the 'kid' instead of a random string?

1
A certificate thumbprint is undistinguishible from a random string.zerkms

1 Answers

1
votes

The fingerprint by definition would be stable and always available on the key. So using it would free you from storing the relation between the key and a random string.

I see not drawbacks in using the fingerprint.