Peering trust store + admin surface: keys, peer registry, revocation #101
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Cordy/Cairn#101
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The two lists from the diagram, per instance: (1) keys we generated for named peers ("Generierte Peering Keys: INS-OMEGA: OMEGA-123456…"), (2) registered peers we can send to ("Eingetragene Instanzen: Omega: ALPHA-9876512, Omega-URL"). Key exchange between admins stays out of band by design (email/vault/pastebin — "den Schlüsselaustausch sollen die selber lösen").
Store: JSON file on the data volume (same pattern as holds/settings/app-passwords — no DB). Issued keys are stored hashed only, shown once at generation like app-password secrets. Registered peers store name, URL, and the received key (this one must be plaintext-at-rest — we present it/derive from it when sending; document that in the threat model).
Admin API (admin-gated like /api/v1/admin/*):
POST /api/v1/admin/peering/keys{peer}→ generates, returns secret ONCEGET /api/v1/admin/peering/keys→ list (peer name, hash prefix, created, last-used)DELETE /api/v1/admin/peering/keys/{peer}→ revoke (instant: inbound from that peer dies)POST /api/v1/admin/peering/peers{name, url, key}/GET/DELETE /{name}→ outbound registryAdmin UI: Settings → Peering panel with both lists, copy-once key display, revoke buttons. i18n en/de/fr/it. Audit events:
peering-key-create,peering-key-revoke,peer-register,peer-remove.Open questions:
CAIRN-PEER1.<base32(32 random bytes)>— versioned prefix like license keys, no instance name baked in (names are local aliases per the ADR). OK, or keep Manuel's<NAME>-<digits>mnemonic style?last-usedtracking on issued keys: worth the write-per-transfer, or log-only?Done — PR #119 (store + admin API) and PR #120 (Settings panel).
Shipped as specified, with the open questions from this issue resolved:
CAIRN-PEER1.<base32(32 bytes)>— versioned prefix, no instance name baked in (peer names are local aliases).httprefused unless the host is private/loopback, mirroring the Basic-auth-is-LAN-only stance.last-usedtracking: not built — log-only for now, revisit if the beta wants it.Built test-first: nine registry tests written and watched fail before implementation.
Next: #102.