Skip to content

Squadra v0.0.7

Choose a tag to compare

@roke22 roke22 released this 04 Nov 20:17
· 181 commits to main since this release
v0.0.7
86b895a

Machines and sessions now check who the server is, and a stolen secret is no longer enough to act as one of them. Workers opened from the dashboard also start on their coordinator's tasks instead of asking you to confirm them.

Trust between the server and its clients

  • Each server has its own key. It makes one the first time it starts (data/server-key) and prints its fingerprint at every start. Machines and sessions make the server prove that key before any secret goes out, and remember it. An impostor at the same address gets nothing. The dashboard's command for Linux and macOS carries the key's hash, so a new machine checks it from the first contact.
  • Machines and sessions have keys too. The server remembers each one the first time it is proved. After that, a secret alone does nothing: a copy of it in a proxy's log can't connect a machine or act as a session.
  • A machine's link is encrypted with keys only the machine and its server have, on top of HTTPS.
  • Messages are signed. Each session signs what it sends, and the server signs its notices to coordinators, so a go-between can't forge them.
  • Machines connect with one-use tickets, so their secret goes only in a header that proxies keep out of their logs.
  • A coordinator that joins with the join token has to be approved once in the dashboard, so that token alone can't direct your workers.

Safer updates

  • squadra-host update only installs a signed release, and not an older one than it has, unless you say otherwise. The first update from 0.0.6 or earlier can't check a signature yet. Every later one does.
  • Docker images and GitHub Actions are fixed by digest, with Dependabot proposing the updates.

Fixes

  • A worker opened from the dashboard refused its tasks, saying they didn't come from you. It now starts on them. Permission prompts still apply, and pairing and login are still yours alone.
  • A worker no longer owes a report for being asked to pair. It used to answer about a task that didn't exist, and its coordinator was told a report was missing.
  • squadra-host no longer exits silently when reached through a symbolic link, such as a linked home folder.
  • The dashboard's live view no longer corrupts accented characters and emoji split across two reads (#12).

What this doesn't protect against

  • A server that has been broken into still commands its clients: its key is on it. The release signature protects updates, and allow_input: false limits what it can type into sessions.
  • Only a machine's link is encrypted on top of HTTPS. Something relaying session traffic with a valid certificate could read those messages or drop them, but not forge signed ones.
  • A plugin installed by hand and the Windows installer trust the key they get the first time.

Updating

  1. Server: git fetch --tags && git checkout "$(git tag --sort=-v:refname | head -1)", then restart it or rebuild its Docker image.
  2. Each machine: squadra-host update, then open its sessions again.
  3. Backups: include data/server-key from now on. If you lose it, machines have to be added again.

Machines and sessions on 0.0.5 or 0.0.6 keep working with the new server until you update them. Going back isn't that simple: once a machine or session has registered its key, an older version of it can't connect, and updated clients refuse an older server.

Only in these cases is there something else to do:

  • Plain http to another computer with a plugin set up by hand: add SQUADRA_INSECURE=1 to ~/.claude/channels/squadra/.env.
  • NODE_EXTRA_CA_CERTS set: add SQUADRA_EXTRA_CA= with the same path there.
  • A session that moves to another machine: the others ignore it until you delete the key file their warning names.

Upgrade tests covered 0.0.5 and 0.0.6, and real Claude Code on Linux. macOS is covered by the automated tests only.