Skip to content
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

JWK Serialization for RFC7638 Thumbprints #1247

Open
alexrudy opened this issue Feb 20, 2023 · 2 comments
Open

JWK Serialization for RFC7638 Thumbprints #1247

alexrudy opened this issue Feb 20, 2023 · 2 comments

Comments

@alexrudy
Copy link

The JwkEcKey struct supports serialization to JSON, but does so in a manner where the fields are always specified to match the human-readable output (i.e. with kty first). Unfortunately, this makes the serialization incompatible with RFC7638, JSON Web Key Thumbprints, which requires that fields are serialized in lexicographic order.

It would be great to have either (a) the default serialization output lexicographic order, so that it can be used as the input to a JWK thumbprint, or (b) a wrapper struct for serializing a JWK in lexicographic order to create a JWK thumbprint.

I guess, ideally, this would end up in the JOSE crate, but I'm opening the issue here b/c this is where I discovered the issue, and it looks like the JOSE crate isn't yet implemented.

@tarcieri
Copy link
Member

We can order the keys alphabetically, that's fine. Would you care to open a PR?

@alexrudy
Copy link
Author

Will do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@tarcieri @alexrudy and others