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

Canonicalize JSON before inserting into trillian #445

Merged
merged 1 commit into from
Oct 6, 2021

Conversation

bobcallaway
Copy link
Member

Each of the supported types has a Canonicalize() method that generates a JSON representation of the entry. If the golang library were to make a change to the order of keys when marshaling an object, it would cause a duplicate entry in the log for a semantically equivalent object.

This change simply transforms the JSON into RFC8785-compliant canonicalized JSON protecting against any changes in golang's JSON libraries going forward.

Signed-off-by: Bob Callaway bob.callaway@gmail.com

Summary

Ticket Link

Fixes

Release Note


Each of the supported types has a Canonicalize() method that generates a
JSON representation of the entry. If the golang library were to make a
change to the order of keys when marshalling an object, it would cause
a duplicate entry in the log for a semantically equivalent object.

This change simply transforms the JSON into RFC8785-compliant
canonicalized JSON protecting against any changes in JSON libraries
going forward.

Signed-off-by: Bob Callaway <bob.callaway@gmail.com>
@dlorenc dlorenc merged commit 070f83e into sigstore:main Oct 6, 2021
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

Successfully merging this pull request may close these issues.

2 participants