#176 Peer relationship management: edit allow-lists in place + per-peer disable (v0.6.20) #231
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/176-peer-mgmt"
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?
Greenlit backend for the #150 relationship card.
Registry
Peer.Disabled bool(json:"disabled,omitempty"— absent = enabled, so existingpeers.jsonstays enabled across the upgrade).UpdatePeer(name, apply func(*Peer))— in-place mutation of the four allow-lists / the Disabled flag, key + URL untouched.IsDisabled(peer);CanSend/CanReceivereturn false for a disabled peer.Wire enforcement (fail-closed, both planes)
Authenticaterefuses a disabled peer with a valid key exactly like an unknown one;PrepareTransfer/CompleteTransferrefuse immediately (no waiting for the session TTL).API
PATCH /api/v1/admin/peering/peers/{name}(admin-gated): partial update — a present list replaces, an absent one is unchanged;enabledtoggles.listPeersnow emitsenabled.Tests: registry (replace + disable + re-enable + unknown→404), service (disabled peer denied at auth + mid-session), api (PATCH replace/disable/list/404).
Backend only; the relationship-card UI (#150) consumes this next.