Skip to content

Remove the management namespace from the spec #182

Closed

Description

@balloobbot

Background

We evaluated the spec for legal compliance on the manufacturer side. Manufacturers will not accept the amount of control the current spec gives servers over clients: the management/* namespace lets a paired server remotely read and modify a client's stored pairing records and pairing configuration.

Decision

Simplify the spec by removing the entire management/* namespace.

  • Clients store pairing records with a minimum capacity of 5; more is allowed.
  • When a pairing completes at capacity, the client evicts an existing record so pairing never fails for lack of storage. Which record is evicted is implementation-defined (for example, least recently used), except a record backing a currently-open connection is never evicted.
  • An evicted server recovers through the existing Sentinel fallback: on its next connection it learns its credential is gone and can offer its operator re-pairing.

Consequences

  • All management/* messages and management/result are removed, along with storage accounting, record_mode, and the used flag.
  • Shared-PSK records are removed; every pairing record is bound to a server_id (the stored-pubkey model is the only model).
  • Remote rotation of pairing secrets, remote enable/disable of pairing methods, the runtime unpaired_access toggle, and remote pairing-window opening become local, manufacturer-defined actions.
  • The 'management' activity disappears from server/activate, the connection priority ranking, and the client/goodbye reasons.
  • server/unpair is unchanged, minus its shared-record carve-out.

Follow-up (separate work)

Remove management support from the implementations (aiosendspin, sendspin-cpp) and the conformance suite once the spec change lands.

Activity

  1. self-assigned this
    on Aug 28, 2026
  2. arturpragacz commented on Aug 31, 2026

    @arturpragacz
    Contributor

    The two changes here are completely separate: removing management, and changing the record model. The record-model changes are presented as consequences, but nothing about removing the namespace forces them. That discussion is already tracked in #146 and should have been argued and decided there.

    The compliance motivation does not touch the record model either: a shared-PSK record gives the server no control whatsoever over the client. The only part of the fallback that rides on the management namespace is its remote configuration surface (record_mode in get/set-pairing-config); the behavior itself is client-local with a pre-provisioned default record, so it survives the namespace removal unchanged.

    In fact removing management makes the shared-PSK fallback even more desirable, strengthening the argument here:

    • Third-party record cleanup disappears. After this change, freeing a slot requires either server/unpair from the old server itself (impossible when that server is decommissioned, which is the typical reason a record is dead) or a manufacturer-defined local action. So a full client must either fail the pairing (now a genuine dead end) or evict on a guess. That is exactly why this proposal has to reach for eviction, with the problems listed below. The shared fallback avoids the choice entirely.
    • Servers also lose list-records and storage accounting, so an operator cannot even see which client is full or what it stores. When nobody can inspect or manage client storage remotely, the client has to handle overflow invisibly and on its own. The shared fallback is exactly that mechanism.
    • The cost side of the ledger nearly disappears. Most of what Drop shared-PSK records (and Storage accounting) to simplify the record model #146 counted against shared-PSK records lives in management.md (the two record kinds, the Record mode section, cost_shared), which this change deletes anyway. What little remains is vanishingly cheap to keep for what the fallback buys.

    As for the proposed replacement:

    A client MUST be able to store at least 5 pairing records; more is allowed. When a pairing completes at capacity, the client MUST evict an existing record so that the new record persists - a pairing never fails for lack of record storage. Which record is evicted is implementation-defined (for example, the least recently used), except that the client MUST NOT evict the record backing a currently-open connection.

    This has multiple downsides:

    • It silently breaks pairings the user still wants. Eviction is mandatory even when every record is in active use, so a live pairing can die invisibly: the evicted server finds out on its next connection, goes idle under the Sentinel fallback, and needs a full operator-driven re-pair. "A pairing never fails" is bought by making an existing pairing fail later, at a time and place nobody expects. That is worse UX than an upfront error.
    • No policy picks the victim well when all records are live. FIFO evicts the longest-standing pairing, which is about the worst possible choice. Least recently used is a bad proxy for disposable (a second-home server, a laptop server, a client that was simply powered off for a while), and tracking it faithfully means persisting an update on every connection, constant storage churn on exactly the flash-constrained devices this is supposed to serve.
    • The result is unpredictable for the user. Which record gets evicted is implementation-defined, and the capacity itself is client-chosen, so when displacement kicks in and what it breaks differs per device and vendor. The user can never form an expectation of what pairing one more server will do.
    • Capacity becomes a hard cap on the number of servers. A home with more servers than a client has slots enters a displacement carousel: every new pairing (and every re-pair of a previously evicted server) evicts another record, and every lap costs operator work. The shared fallback exists precisely so a fixed-capacity client serves any number of servers.

    We should rather keep the shared-PSK fallback and combine it with eviction of genuinely dormant records, something like:

    • On pairing at capacity: if some record's server has not connected for a long time (say 2 weeks), evict it and store the new record normally. (A coarse last-seen timestamp, persisted once a day or so, is enough; no per-connection write churn.)
    • Otherwise, admit the new server under the shared record, as today.
    • When a server connects under the shared record and a dormant record exists: evict the dormant record and promote the server to its own individual record (a small new message hands over a fresh long-term PSK in-session).

    Eviction then only ever touches records that are demonstrably unused, and a dormant server that does come back recovers through the same Sentinel fallback this proposal relies on. The result is a completely seamless user experience: pairing always succeeds, nothing in active use is ever displaced, and no operator ever has to think about client record storage. Only benefits, no downsides, as far as I can tell.

  3. balloob commented on Aug 31, 2026

    @balloob
    Contributor

    I disagree. No one expects more than 5 devices to work. Nor will someone have 5 live connections when a 6th comes in. Those are edge cases that do not warrant the complexity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions