Files
ServerKit/backend/tests
Juan DenisandClaude Opus 5 fd64ec09ba feat(connect): open commands sealed to this server's own key
A second keypair, X25519, published in the signed hello with an Ed25519
signature over it so ServerKit Cloud can tell it is really ours — and so a
relay cannot substitute one of its own, because it does not have this
panel's identity key.

Command arguments then arrive encrypted to that key. The relay carries a
blob. That is what makes it safe for Cloud to send an object-storage
credential through it, which until now crossed the relay in the clear.

A payload this panel cannot open is a refused command with a sentence
saying what to do, never a handler running on arguments we guessed at.

- backend/app/services/connect_keys.py — the key (a raw 32-byte file, not
  PEM: it is a key with no certificate story around it), the signed hello
  fields, and open_sealed.
- backend/app/services/connect_client.py — publishes it on WebSocket and
  on the long-poll fallback, so limited mode is not quietly less private.
- backend/app/services/connect_commands.py — unseal before the handler.
- backend/tests/test_connect_sealing.py — 13 tests, including the control plane's
  half of the scheme written independently from the specification, so the two
  implementations cannot drift apart silently.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018q56AfqpgKjio4n9KYubvZ
2026-09-02 17:00:00 -04:00
..