Skip to content

Security posture

The relay is the only piece of repowire that can sit between you and your agents. Knowing what it sees matters.

What the relay sees

The relay terminates the dashboard's HTTPS, then tunnels HTTP requests over the daemon's outbound WebSocket. Tunnel payloads are not encrypted end-to-end — the relay process can read every request body and response body that flows through it, including:

  • Agent messages (ask, notify_peer, broadcast text).
  • Mesh events (chat turns, tool calls).
  • Attachments (uploaded via POST /attachments).
  • Peer state (names, paths, descriptions).

For the hosted relay at repowire.io, this means the operators could see your traffic. They commit to not doing so, but the trust is operational, not cryptographic.

What the relay doesn't see

  • Local-only traffic. A daemon running without relay.enabled: true never connects to the relay. Mesh traffic stays on 127.0.0.1:8377.
  • Other users' traffic. API keys scope by user id; daemons in different scopes cannot reach each other.
  • MCP traffic. Tool calls travel agent → stdio identity shim → daemon /mcp, locally. The relay client rejects /mcp tunnel requests before forwarding them.

Authentication

  • The daemon authenticates to the relay with relay.api_key. The key is auto-generated and stored in ~/.repowire/config.yaml.
  • The dashboard authenticates to the relay with a cookie set after submitting the same API key at /auth. Possession of the key grants dashboard access; treat it like a password.
  • Native clients such as the iOS app send the same key in X-API-Key and the rw_token cookie (current relays also accept Authorization: Bearer). Current relays strip all three before tunneling, so the daemon never receives the key; relays older than this change strip only the cookie. The app keeps it in the iOS Keychain, readable only on that device after first unlock.
  • Local-daemon daemon.auth_token is independent and gates the local WebSocket / HTTP API. repowire setup generates one because the MCP identity shim forwards to bearer-authenticated /mcp. Set or rotate it manually if other processes on the machine should not have free access.
  • The daemon-served localhost dashboard can use same-origin HTTP routes without exposing that token to browser JavaScript. Cross-origin, remote, WebSocket, and MCP callers remain bearer-gated.

Push notifications

By default, push notifications are content-free. They carry the sender's name, the kind of item, and ids the app uses to fetch it; the message text stays in the tunnel. With human.surfaces.ios.preview: true, a notification also carries up to 240 characters of the text. That text passes through Apple Push Notification service and shows on the lock screen, which is wider exposure than the tunnel alone.

Pushes go only to devices registered on your daemon (/push/devices), and only for items stored in the human inbox. The hosted relay sends a daemon's push only to tokens bound to the same relay key. A token binds only after the device echoes a nonce the relay sent it in a background push, so one tenant cannot claim, or take over, another tenant's phone by knowing its token. Anyone holding your relay key can register their own phone and receive your inbox's notifications. That is the same trust the key already grants for reading the inbox (GET /inbox) through the relay.

Trust boundaries

Boundary What protects it
Browser or app ↔ relay TLS (you trust the relay's certificate)
Relay → device (push) APNs token auth; you trust the relay and Apple with notification text
Relay ↔ daemon TLS-over-WSS (you trust the relay's network and process)
Daemon ↔ agent (MCP) Per-agent stdio identity proof, then localhost-only HTTP with bearer auth
Daemon ↔ agent (hooks) Local HTTP on 127.0.0.1; gated by daemon.auth_token if set
Daemon ↔ daemon (same key) The relay names the sending machine; the /remote API is reachable only in-process from the relay client, never over HTTP

Cross-machine trust: a machine id is the label a daemon connects with (its hostname), not a separately verified identity. Anyone holding the relay key can connect as any machine id. All daemons on one key trust each other's account of their own peers (id, name and circle) as much as you trust the key. The relay binds each cross-machine request to the connection that sent it and accepts its answer only from the connection it went to.

Hardening recommendations

  • Set daemon.auth_token if you share the machine with other users.
  • Rotate relay.api_key on suspected compromise. See relay key rotation.
  • Prefer the self-hosted relay for sensitive workloads. The trust model is the same; the operator is you. See Relay access.
  • CORS: the daemon restricts CORS to localhost origins and repowire.io when the relay is enabled. Don't widen this unless you've thought about what's behind the new origin.

What we don't do (yet)

  • End-to-end encryption of tunnel payloads.
  • Per-tool ACLs (any peer with a name can be addressed by any other peer with the same circle and key).
  • Audit logging on the relay beyond connection-level events.

These are not present in the MVP. If your threat model requires them, the right call is to keep relay.enabled: false and run repowire purely local.

Remote MCP authorization

The relay's separate MCP endpoint uses OAuth code + S256 PKCE, scoped grants, rotating refresh tokens, and immediate grant revocation for subsequent requests. The full relay secret defines the owner namespace; it is entered on the relay login/consent page and never included in the plugin package or sent to an MCP client. Protect the persistent OAuth database. The daemon's localhost-only administrative MCP endpoint remains blocked by the relay tunnel. Remote messaging can cause agents to modify their projects, so write tools are marked potentially destructive and require agents:write.