Run Your Own Reviewer Identity

A reviewer identity works without the signer. A person who holds their own review key and controls their own DID keeps their reviews and their reputation whatever happens to any Open Reviews service. The reviewer server resolves two DID methods for this, did:web and did:plc.

Choose a method#

A did:web suits a person with a domain served over HTTPS. The identity is one file on the domain, so it needs no tool and no directory, and the domain doubles as a readable name. The identity belongs to whoever controls the domain and its hosting. A lapsed domain or a hacked web server hands it to someone else, and no recovery reverses that.

A did:plc suits a person without a domain, or one who wants a recovery key. The identity is a signed operation log in the public PLC directory, kept with a command line tool. Its rotation keys sign every change, and a rotation key listed higher can reverse a change by a lower one within 72 hours, as the did:plc method defines. A person who keeps a recovery key offline therefore survives the theft of their everyday key.

Make a review key#

The review key is the P-256 key that signs the person’s reviews, and every method lists it in the DID document. The mangrove-reviews package generates one and gives its public half in the forms a document takes, as the identity guide shows. The person keeps the private key, for example as keypairToJwk exports it, wherever they keep other secrets.

Host a did:web#

Serve the document of the identity guide at https://<domain>/.well-known/did.json, with the review key’s multikey as publicKeyMultibase. Then claim the identity with the key:

await claimIdentity(keypair, 'did:web:example.com')

Create a did:plc#

A did:plc starts with a genesis operation, signed by one of the rotation keys it lists, and changes through later operations that a rotation key signs. Any tool that follows the did:plc method builds and signs them, for example:

  • goat, a command line tool from Bluesky
  • @did-plc/lib, the JavaScript library of the did:plc project
  • the plc module of the Rust crate mangrove-reviews

A reviewer identity needs these choices, whatever the tool:

  • The rotation keys stay with the person. A second rotation key, kept offline and listed ahead of the first, is the recovery key.
  • The review key’s did:key goes into verificationMethods. The reviewer server accepts a key under any name, such as mangrove, and an identity that also serves Bluesky keeps its atproto entry beside it.
  • The signed operation goes to the PLC directory with POST https://plc.directory/<did>. The reviewer server resolves every did:plc from the directory first, so every Open Reviews client sees the identity from then on.

Then claim the identity with the review key:

await claimIdentity(keypair, 'did:plc:z72i7hdynmk6r22z27h6tvur')

Change keys#

A new review key joins the document through an update that a rotation key signs, and then claims the identity like the first one. A key removed from the document stops signing for the identity when the reviewer server resolves the document again. The server does so once a day, and at once on GET https://api.mangrove.reviews/identity/<did>?fresh=true. Reviews the removed key signed while the document listed it stay under the identity.

Take a signer identity with you#

A person who logged in through the signer can move their identity to keys of their own:

  1. Set a recovery key on the identity page of the Mangrove app. The app creates one and offers it as a PEM or JWK file, or takes the did:key of a key the person holds. The signer lists the recovery key ahead of its own rotation key.
  2. Publish the identity to the PLC directory on the same page. did:plc tools submit to the directory, while an unpublished identity lives in the Mangrove registry alone.
  3. Sign an update with the recovery key that lists the person’s own rotation keys and review key in place of the signer’s, and submit it to the directory.

The reviews the signer’s key signed stay under the identity, and the person’s own review key signs from then on.