Security and trust for paired devices
What Puddles encrypts, what a paired device can and cannot do at each grant, how to unpair and revoke, and the known limits of the device link.
On this page
Puddles connects devices that are all yours, over networks that are not. This page explains, from your side, what the link protects, what each permission you grant actually allows, and how to take a device's access away. The assumptions behind it: the network is hostile (anyone may connect to the port, read and alter traffic), while your devices and your user account on each are not.
What is encrypted
- Every connection is encrypted and mutually authenticated. Both ends prove they hold the key the other one stored at pairing. An attacker in the middle can't read or change anything without it being detected.
- Names and keys are hidden too. Both devices' keys, every device name and every request and answer are encrypted. A passive eavesdropper sees only that this is a
flow-remoteconnection (and whether it is a pairing), message sizes and timing. - Recorded traffic stays closed. Each connection uses fresh session keys, so a device key stolen later does not decrypt recorded sessions. It could reveal which device connected in recorded traffic.
- Over Tailcat it is encrypted twice: WireGuard between the two tunnel ends, and the device link inside it. A relay sees ciphertext, sizes, timing, the two tunnel keys and IP addresses, never the content. A relay's operator can drop or delay traffic, but can't read it.
What pairing protects against
- The invite is a one-time secret. A pairing token or invite link works once, within 5 minutes, and only while the inviting device is waiting. It is never written to disk or passed as a command argument. It does appear on screen and, after Copy link, on the clipboard (marked transient, so clipboard history doesn't keep it, and removed when the invite ends).
- The code is what you check. The joining device chooses its own name, so a name proves nothing. Approve only when your other device shows the same six-digit code. If someone used your token first, your own device's attempt is refused and the prompt shows a code your device isn't showing.
- A person approves. Approve, Deny and Join are clicks on the Puddle page (or
yat theflow-remote pairprompt). No agent or script on Flow's command bus can pair your device. - Nothing is stored on a refusal. A wrong, expired or reused token, or an answer other than yes within 60 seconds, leaves both devices unchanged.
What a paired device can do
What a device may do here is set on this device, per device, and checked on this device for every request.
| Grant | What that device can do here |
|---|---|
| Paired (list only, the default) | See your terminal sessions' names and states, read-only. Write nothing here except its own last-seen time |
Can open my sessions (open, sessions.attach) | Watch any shareable session and type into it, which means running anything as your user. It also reads your synced state: session names and titles, folders, branches, pull requests, labels, the Trash, Schedules, notifications |
Can create sessions (create, sessions.create) | Have Flow here start new sessions, in a folder it names. Together with open, a fresh shell on demand |
| Both open and create | Also read and write any file your user can (a Finder mount of a remote folder uses this), list a repo's branches and worktrees, run the app's palette actions (not quitting, pairing, members or installs), and read and write the pull requests your GitHub user can, as that user |
open is full shell access on this Mac. Both switches are off for a new pairing, are never turned on by pairing, and are kept if you pair the same device again. Grant them only to devices that are yours.
Some things a device can never do, whatever it was granted:
- change rows that belong to this device in your synced data; it can only send requests that this device decides on;
- pass on another device's private rows: each device serves only its own;
- type into a session before its screen has been replayed, so its terminal's answers can't become input.
You can see who is watching what in This device › Viewing now on the Puddle page.
Exposure on the network
Anyone who can reach the daemon's port can only attempt a handshake. Without a paired key they can't learn the device's name, id or key, can't pair without a token, and never become a connected device. The daemon limits them: at most 8 unauthenticated connections at a time, 5 seconds to finish, and an address with 5 failures in a minute is shut out for the rest of that minute. The cost is a possible delay for your own devices (a denial of service), not a disclosure.
Where the daemon listens is your choice (puddle.bind):
- Automatic and Tailscale listen on your tailnet address only, or on this Mac only.
- Local network listens on every interface: anyone on the network can reach the port.
- Tailcat reaches across networks through public relays. Its
tc…address works like a password for reaching the port (not for pairing): Flow shows it astailcat (tc…)everywhere and never logs it. To change it, delete~/.flow/remote/tailcat.jsonand pair again.
Revoke and unpair
| To | In the app | From the CLI |
|---|---|---|
| Stop a device watching and typing | turn off Can open my sessions on its Members row | flow-remote deny <device> open |
| Stop a device creating sessions | turn off Can create sessions | flow-remote deny <device> create |
| Forget a device | Remove on its Members row, then confirm | flow-remote revoke <device> |
What happens:
- Withdrawal is live. Through the running daemon, a deny of
openor a removal ends that device's live views at once: no more input reaches the shell, and its connection is closed within half a second. A change made while the daemon was down (or written by another process) takes effect at that device's next request, at most 10 seconds later for a live stream. - Synced data goes too. A removed device's mirrored rows are deleted here, and a sync stream re-reads permissions at least every 10 seconds, so nothing is served under a withdrawn grant for longer than that. A request it queued before the change is checked again and refused.
- Removal is one-sided. The other device still lists yours until you remove it there too, but can do nothing with the entry. Afterwards it is no more than a stranger that knows your device's address.
- What it already read stays read. Revoking stops what comes next; it can't take back what was shown. Tool registry rows merged before the revoke stay merged.
Local files and what is out of scope
The device link's state is in ~/.flow/remote, mode 0700; identity.json (the private key) and devices.json are 0600 and Flow refuses them if anyone else can read the key or write the list. The sync store sink.db is 0600, because it holds every paired device's mirrored rows.
Not defended against:
- A compromised local user account. Anything running as you can read your device key and pose as this device, edit
devices.jsonto authorize a key, or drive the daemon's local socket. This is the same model as Flow's command bus and session sockets. - Root, or physical access to an unlocked Mac.
- Traffic analysis, or hiding that
flow-remoteis in use.
Known limits
- Approval is typing
yor clicking Approve, not typing the code. Comparing the codes is up to you. - There is no watch-only grant. A device that may open a session may type into it.
- File access has no sandbox and no audit trail. A device with both grants reaches every file you can, and these reads and writes are not logged.
- Palette actions and pull request writes run as you. They aren't logged beyond the remote-action notification.
- A daemon you started by hand keeps serving after you turn Puddles off, including one on Tailcat. Stop it yourself.
- One address can fill the unauthenticated slots. A dozen addresses on your network could keep your own devices from connecting while they keep it up.
- Secrets are not wiped from memory, though they are kept out of logs, argv and debug output.
- Pairing can end half-done. If the approving device's last message is lost, it stores the joiner and the joiner doesn't store it. Pair again, or remove the device on the approving side.
Sources
Written from these files in the Flow app repo
docs/flow-remote.mdsrc/bin/flow-remote.rssrc/puddle.rssrc/puddle_ui.rsdocs/sink.mdschemas/README.md