edge-control: admin-approved allowlist for project names #1092

Closed
opened 2026-04-20 18:46:23 +00:00 by dev-bot · 0 comments
Collaborator

Mirrored from johba/disinto#833

---## Problem

tools/edge-control/register.sh:51 accepts any name matching ^[a-zA-Z0-9_-]+$ on a first-come-first-served basis. There is no mechanism for the edge admin to reserve a name for a specific project/key before the race starts. Anyone with disinto-register SSH access can claim any syntactically valid name — including names the operator intends to use for their own services later.

This is the only approach that actually prevents squatting between trusted-but-not-fully-trusted callers. Per-operation ownership checks (see sibling issue) protect live registrations; they do not prevent the race.

Proposal

Two-step claim flow:

  1. Admin writes /var/lib/disinto/allowlist.json:

    {"version":1,"allowed":{"myproject":{"pubkey_fingerprint":"SHA256:..."}}}
    

    File is root:root 0644 — only root writes; disinto-register reads.

  2. do_register refuses if:

    • project is not a key in .allowed, OR
    • the caller's pubkey fingerprint does not match .allowed[project].pubkey_fingerprint (when set — empty means "any pubkey may claim").
  3. register.sh never mutates allowlist.json. Approval is out-of-band (ops repo PR, or ssh + root edit).

Acceptance

  • register for an un-allowlisted name returns {"error":"name not approved"} and makes no registry changes.
  • register for an allowlisted name with a bound fingerprint refuses any other pubkey.
  • register for an allowlisted name with no fingerprint bind works as today (and stamps the claiming pubkey, per existing first-write-wins).
  • Workflow documented in tools/edge-control/ README.
_Mirrored from [johba/disinto#833](https://codeberg.org/johba/disinto/issues/833)_ ---## Problem `tools/edge-control/register.sh:51` accepts any name matching `^[a-zA-Z0-9_-]+$` on a first-come-first-served basis. There is no mechanism for the edge admin to reserve a name for a specific project/key before the race starts. Anyone with `disinto-register` SSH access can claim any syntactically valid name — including names the operator intends to use for their own services later. This is the only approach that *actually* prevents squatting between trusted-but-not-fully-trusted callers. Per-operation ownership checks (see sibling issue) protect live registrations; they do not prevent the race. ## Proposal Two-step claim flow: 1. Admin writes `/var/lib/disinto/allowlist.json`: ```json {"version":1,"allowed":{"myproject":{"pubkey_fingerprint":"SHA256:..."}}} ``` File is `root:root 0644` — only root writes; `disinto-register` reads. 2. `do_register` refuses if: - `project` is not a key in `.allowed`, OR - the caller's pubkey fingerprint does not match `.allowed[project].pubkey_fingerprint` (when set — empty means "any pubkey may claim"). 3. `register.sh` never mutates `allowlist.json`. Approval is out-of-band (ops repo PR, or ssh + root edit). ## Acceptance - `register` for an un-allowlisted name returns `{"error":"name not approved"}` and makes no registry changes. - `register` for an allowlisted name with a bound fingerprint refuses any other pubkey. - `register` for an allowlisted name with no fingerprint bind works as today (and stamps the claiming pubkey, per existing first-write-wins). - Workflow documented in `tools/edge-control/` README.
dev-bot added the
backlog
label 2026-04-20 18:46:23 +00:00
dev-qwen self-assigned this 2026-04-20 18:47:26 +00:00
dev-qwen added
in-progress
and removed
backlog
labels 2026-04-20 18:47:27 +00:00
dev-qwen removed their assignment 2026-04-20 19:33:46 +00:00
dev-qwen removed the
in-progress
label 2026-04-20 19:33:47 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: disinto-admin/disinto#1092
No description provided.