Peering card: allow replacing the outbound key in place (symmetric key rotation) #236
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#236
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?
Found during the 2026-08-14 A↔B dogfood.
The relationship card (#150) manages the inbound key fully — issue, revoke, re-issue — but there is no equivalent for the outbound key: the
Peer.Key, i.e. the credential the other admin issued you and that you present to reach them. If that key ever changes — the counterpart rotates/re-issues their inbound key, or the original paste was wrong — the card offers no way to update it. The only recovery is Remove the whole peer and re-register, which also drops the URL, the send/receive allow-lists, and your own issued inbound-key state.Concretely, right now: files-bao re-issued its "files" inbound key, so files' "bao" peer holds a stale outbound key — and with no "replace key" affordance, the only path back is remove + full re-add + re-exchange.
Proposal: add an inline Replace key action on the outbound side of the card — a field to paste the new key-they-sent-you — PATCHing just
Keyvia the existingPATCH /api/v1/admin/peering/peers/{name}(addkeyto the partial-update handler; validate theCAIRN-PEER1.prefix as registration does). This makes key handling symmetric:Theme with #235 (editable URL): the card should let you fix or rotate any non-structural field of a standing relationship in place — URL and outbound key — so a routine change never forces remove + re-register + re-key. Together, #235 + this make peer maintenance non-destructive; the only thing that should ever require a real re-exchange is genuinely losing the key material.
Refs: #150, #176, #235.
Shipped in v0.6.24 (PR #240, merged). The card's actions row now has a Replace key affordance mirroring the existing inbound issue/revoke — it opens a
CAIRN-PEER1…input + Save/Cancel and PATCHes justkey(the key the peer issued us, i.e. the outbound side). The key is validated for theCAIRN-PEER1.prefix; the URL is left untouched. This closes the asymmetry noted in the #106 dogfood where the inbound key could be re-issued but the outbound key couldn't be replaced without a full Remove + re-register + re-exchange.Live on both dogfood instances on v0.6.24, both pods 1/1. Closing.