Skip to content

docs(fleet): pin one transport design so the Python, Go and Kotlin lanes build the same thing - #888

Merged
GeiserX merged 8 commits into
GeiserX:mainfrom
Amigadelasmigas:docs/fleet-transport-spec-v2
Nov 28, 2026
Merged

GeiserX merged 8 commits into
GeiserX:mainfrom
Amigadelasmigas:docs/fleet-transport-spec-v2

Conversation

@Amigadelasmigas

Copy link
Copy Markdown
Collaborator

Summary

Steps 2 and 3 of the fleet security plan need one design that the Python, Go and Kotlin code all follow. Without it, three lanes would each pick their own key format, certificate layout and pairing flow, and the boxes would not talk to each other.

This PR adds that design as docs/fleet-transport.md, listed under Development, Design notes. It changes no code.

What the spec fixes:

  • Identities:
    • Each box and the UI get an Ed25519 key at first run.
    • The endpoint id is the public key as 64 lowercase hex characters, which is iroh's own text form. The fingerprint is that id, with no hash.
    • The spec gives the file, format and mode for each stack.
  • Certificates:
    • A self-signed Ed25519 identity certificate is the pin.
    • A P-256 leaf, signed by the identity, signs the TLS handshake, because Android's TLS stack cannot sign the handshake with Ed25519.
    • The spec gives both profiles field by field.
  • The channel:
    • Mutual TLS 1.3, checked by pin in six steps, with the Go check as code.
    • The spec says how Python's ssl, Go's crypto/tls and OkHttp each run that check.
    • The bearer stays as a second check. Servers issue no session tickets.
    • Boxes get their own UI port, 8443, so browsers never meet the self-signed certificate.
  • Pairing:
    • The paste block gains CASHPILOT_UI_KEY. The spec gives the first-contact sequence and its refusals.
    • It says what the user sees when every box is paired again once, and how to recover a lost box key or a lost UI key.
  • iroh:
    • The same key is the endpoint id, and the ALPN is cashpilot/fleet/1.
    • iroh covers the UI with Docker workers, with Desktop and with phones. It uses n0's relays by default, and CASHPILOT_IROH_RELAY points it at the user's own relay. CASHPILOT_IROH is off by default.
    • An endpoint recycles itself after 5 failed dials in a row, and the spec gives the reason for 5.
    • Desktop uses a Rust sidecar with a small socket protocol.

Evidence in the spec

  • The official iroh 1.2.0 Python wheel installs on python:3.15-slim-trixie for amd64 and arm64.
    • Two containers echoed hello over the ALPN with a full ticket, with relay only, and with the id only.
    • On Alpine, pip finds no version, because PyPI has no musl wheel and no sdist.
    • So the spec moves the UI and worker images to Debian and uses iroh in-process.
  • Pinned mutual TLS with these exact certificates was tested Python to Python, Go server to Python clients, and Python server to Go clients.
    • Each case covered a pinned peer, enrolment with no client certificate, an unpinned peer, and a box removed while the server ran.

Type of Change

  • Documentation

Checklist

  • No credentials or secrets committed
  • CashPilot-Desktop needs nothing in this PR. The spec is what its step 2 and 3 work will implement.

…nes build the same thing

Adds docs/fleet-transport.md: the Ed25519 identities and where each stack
stores them, the certificate profiles, mutual TLS checked by pin with the
bearer kept as a second check, pairing and pairing again, and iroh on the
same key with its ALPN, relay settings and recovery rule. It records the
tests behind it: the iroh 1.2.0 wheel on Debian slim for amd64 and arm64,
and pinned TLS between Python and Go.
…lost enrolment reply and a stalled iroh request
…oh, and give the Desktop sidecar two sockets
…quests, and give each box its own recycle allowance
@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 43 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 844f3ed and e0bdef1.

Files selected for processing: 2

  • docs/fleet-transport.md
  • zensical.toml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@GeiserX
GeiserX merged commit 3e37f19 into GeiserX:main Nov 28, 2026
6 of 11 checks passed
@Amigadelasmigas
Amigadelasmigas deleted the docs/fleet-transport-spec-v2 branch November 28, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants