- CSS 52%
- JavaScript 48%
- Shell <1%
- Docker <1%
averr.ing #
Verifier groups for the Atmosphere: who verifies, by what policy, and how to ask or appeal. Runs at https://averr.ing.
A group is an account that verifies, as mu and
Eurosky understand it: it writes app.bsky.graph.verification records, and it
is on the list of trusted verifiers. The root group is the account that
owns that list. It decides which accounts are groups and who their admins are,
and its admins may override in any group.
How it works #
- Everything shown is a record on the AT Protocol; anybody can read it all without signing in. The server keeps an index (SQLite) that can be rebuilt from the repos at any time.
- What a person says is a record in their own repo, written with the access they grant when signing in (OAuth, four collections and nothing else).
- What a group does is a record in the group's repo, written by the server with the group's app password, and only when the rules allow (server/groups.js).
- A record written to a repo without the site counts as much as one made on
it: it goes through the same checks. Tell the server about it with
POST /xrpc/ing.averr.notifyOfUpdate {"uri": "at://…"}; it also listens to Jetstream and re-reads the groups' repos every ten minutes.
| Record | Where | What |
|---|---|---|
ing.averr.request |
anybody | asks a group for verification |
ing.averr.appeal |
anybody | appeals a group's verification of an account |
ing.averr.proposal |
participant | proposes that the group verify an account |
ing.averr.validation |
another participant | accepts or rejects a proposal |
app.bsky.graph.verification |
group | the verification |
ing.averr.group.verification |
group | where it came from (same record key) |
ing.averr.group.decision |
group | a request or proposal declined, an appeal upheld or dismissed |
ing.averr.group.revocation |
group | a verification taken back |
ing.averr.group.member |
group | a participant (key: their DID) |
ing.averr.group.settings |
group | immediate or checked, criteria, requests, appeals |
ing.averr.group.policy |
group | the policy, as rich text |
ing.averr.root.verifier |
root | a group and its admins (key: the group's DID) |
app.bsky.graph.listitem |
root | the group on the list mu reads |
Schemas are in lexicons/.
Immediate groups verify as soon as a participant proposes. Checked groups wait for another participant to accept. Either way a proposal has to state every criterion the admins have set. The root group works the same way, for making verifiers: accepting writes the verifier record and adds the account to the list.
The vault #
A group cannot verify until one of its admins gives the server an app password for the group's account (Admin tab). It is handled as follows (server/vault.js, server/accounts.js):
- It is tried against the account's server before it is kept. Only an app password is taken: the account's own password, or an app password with access to direct messages, is refused and the session it opened is closed.
- It is sealed with AES-256-GCM under a key derived from
AVERR_VAULT_KEY, bound to the group it is for. That key is in the server's.envand nowhere else: not in this repo, not in the data directory, not in the backups (which cover the data directory only, so hold ciphertext without the key). - It can be set and removed, never read back: no page or endpoint returns it. Sessions made with it stay in memory.
- Five attempts an hour per group. Removing a verifier removes its password.
- Sign-in sessions and the site's OAuth key are sealed the same way.
Losing the key loses nothing that is on the protocol: admins set the app passwords again and people sign in again.
Running it #
Node 24 or later.
npm install
npm run dev # a throwaway network with a root and two groups, on :3248
npm test
In npm run dev, sign in as alice.test (root admin), bob.test (admin of
the Gazette), carol.test, dave.test or erin.test; there are no passwords.
Configuration is in the environment; see server/main.js.
Deploying #
./deploy.sh builds the scripts and deploys with sm to Supramundane. Once,
on the server, before the first deploy:
umask 077; echo "AVERR_VAULT_KEY=$(openssl rand -base64 32)" > /srv/supramundane/services/averr/.env
The first admins of the root group come from AVERR_ROOT_ADMINS until one of
them has set the root account's app password, at which point the list is
written to the root's repo and read from there.
The logo and the images are drawn by npm run identity (-- --png for the
bitmaps, which needs a local Chrome). The Tangled mark in the footer is
Tangled's own, CC BY 4.0.