ruby / ruby/json

Add support for JSON Canonicalization (RFC8785)

Open
#1,038 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
782
Forks
383
Avg merge
1d 18h
Merged PRs (30d)
10

Description

There is an existing Gem implementation for RFC8785 (JSON Canonicalization): json-canonicalization) but unfortunately its maintainer passed away.

We wonder if this could be supported directly by the json gem.

This RFC is important when you want to use cryptographic signatures with JSON documents, as the signature depends on the keys' order and format. In our case, we need this to sign ActivityPub JSON objects in Mastodon.

The above implementation's code is quite simple and it has good test coverage, so it could be used as a starting point?

This could also solve #976 in a standard way.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with RFC8785 and the linked json-canonicalization implementation, including its existing tests, to understand the required canonical JSON behavior. Review the json gem's current public API and test structure before deciding how support fits there; done means RFC8785-compatible canonicalization with coverage for the relevant cases and a usable gem API.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.