MicahParks / jwkset

A JWK and JWK Set implementation. An auto-caching JWK Set HTTP client is provided. Generate, validate, and inspect JWKs. Self-host this project's website: https://jwkset.com
https://jwkset.com
Apache License 2.0
35 stars 12 forks source link

Consistent optional behavior for X.509 certificate thumbprints #12

Closed MicahParks closed 10 months ago

MicahParks commented 10 months ago

This package automatically calculates X.509 certificate thumbprints. This behavior was not accounted for in the existing JWK.Validate implementation, causing inconsistent behavior with NewJWKFromMarshal when the inputted JWKMarshal JWK Set did not contain these optional parameters.

This pull request changes the JWK.Validate behavior to ignore comparing the x5t and x5t#S256 parameters when they are not present in the original.

See https://github.com/MicahParks/jwkset/issues/11 for the relevant issue.