cellMembrane · amoeba skin · markdown · petalTongue:false

Relay Trust Boundary — Cross-Gate Security Audit

·

petalTongue Grammar · Relay Trust Boundary — Cross-Gate Security AuditCNS/PNS = 3.880Target 1/ln(2) = 1.4427 · domain:ecology0 static HTML files · 100% Living Rust + petalTongueWords1242Headings13Siblings6

Relay Trust Boundary — Cross-Gate Security Audit

Version: 1.0.0

Date: 2026-06-03 (Wave 75)

Status: Active

Authority: cellMembrane team (ironGate)

License: AGPL-3.0-or-later

Related: K_DERM_TOPOLOGY.md, CELLMEMBRANE_ARCHITECTURE.md

Reference: gen5 COVALENT_MESH_TRUST_VALIDATION.md

---

Purpose

Document the security boundary of the cellMembrane VPS relay infrastructure.

As the relay operator, ironGate must define precisely what data transits the

VPS, what is visible to the relay, and what guarantees hold for gate-to-gate

communication.

---

Relay Architecture

The cellMembrane VPS operates three distinct relay functions:

┌─────────────────────────────────────────────────────────┐
│  cellMembrane VPS (golgiBody)                           │
│                                                         │
│  ┌──────────────────────────────────────────────────┐   │
│  │ Channel 2: Songbird TURN (:3478)                 │   │
│  │   UDP relay — encrypted media streams            │   │
│  │   Visibility: OPAQUE (DTLS-SRTP encrypted)       │   │
│  └──────────────────────────────────────────────────┘   │
│                                                         │
│  ┌──────────────────────────────────────────────────┐   │
│  │ Channel 2b: Songbird Federation (:7700)          │   │
│  │   TCP mesh — JSON-RPC over HTTP POST             │   │
│  │   Visibility: STRUCTURED (method + params)       │   │
│  └──────────────────────────────────────────────────┘   │
│                                                         │
│  ┌──────────────────────────────────────────────────┐   │
│  │ K-Derm Relay: git sync chain                     │   │
│  │   SSH — git objects (commits, trees, blobs)      │   │
│  │   Visibility: FULL (relay has repo clones)       │   │
│  └──────────────────────────────────────────────────┘   │
│                                                         │
└─────────────────────────────────────────────────────────┘

---

Trust Analysis Per Channel

Channel 2: Songbird TURN Relay (:3478 UDP)

PropertyValue
ProtocolTURN (RFC 5766) over UDP
EncryptionDTLS-SRTP (end-to-end between peers)
Relay visibilityOPAQUE — encrypted bytestream only
AuthenticationTURN credentials (/etc/songbird/relay-credentials)
What relay seesSource/dest IP:port pairs, packet sizes, timing
What relay CANNOT seePayload content (encrypted), application semantics

Assessment: The TURN relay is a pure network-layer relay. All media is

DTLS-SRTP encrypted end-to-end between gates. The VPS cannot inspect, modify,

or replay the relayed data. Even if the VPS is compromised, the attacker gains

only traffic metadata (who talks to whom, when, how much).

BTSP token visibility: TURN authentication uses a separate credential

(nucleus-relay:) unrelated to BTSP session tokens. BTSP tokens are

never transmitted through the TURN relay — they travel over the mesh

federation channel or direct UDS connections.

Channel 2b: Songbird Federation (:7700 TCP)

PropertyValue
ProtocolHTTP POST with JSON-RPC 2.0
EncryptionNone (plaintext TCP on current deployment)
Relay visibilitySTRUCTURED — full JSON-RPC method and params visible
AuthenticationPeer identity via node_id in mesh registration
What relay seesMethod names, capability calls, peer registrations
What relay CANNOT seeN/A — all federation traffic is plaintext

Assessment: The federation channel carries structured capability routing

data. On the VPS, Songbird is both a participant (with its own registered

primals) and a hub (mediating cross-gate mesh traffic). All JSON-RPC

payloads are visible to the VPS Songbird instance.

BTSP token visibility: BTSP tokens may appear in capability.call params

if a remote capability requires authentication. Currently, cross-gate

capability calls do not embed BTSP tokens in the federation payload — auth is

handled at the destination gate's BearDog instance. **BTSP tokens are opaque

to the federation relay** because they are resolved locally at the target gate.

Mitigation for future: When Songbird adds TLS for federation (planned),

the VPS will still be a participant. True end-to-end opacity requires

BearDog-signed envelopes (capability call payloads encrypted to the target

gate's public key). This is a gen5 design target.

K-Derm Git Relay (SSH)

PropertyValue
ProtocolSSH + git protocol
EncryptionSSH transport (encrypted in transit)
Relay visibilityFULL — relay has complete repo clones
AuthenticationSSH ed25519 keys (metallic bond)
What relay seesAll source code, all commit history, all branches
What relay CANNOT seeEncrypted credential blobs (.age files)

Assessment: The K-Derm relay chain has full visibility of repository

content. This is by design — the relay is the sovereign git hosting layer

(Forgejo). The trust model is:

1. golgiBody-inner (cis-Golgi) is the primary — full authority

2. peptidoglycan (structural) is a clone — has all data

3. golgiBody-ext (trans-Golgi) is the exit — pushes to GitHub

All three nodes hold complete repository clones. Credentials are protected

by age encryption — .age files are present but cannot be decrypted without

the operator's private key.

BTSP token visibility: Forgejo API tokens are stored on the VPS

(FORGEJO_TOKEN env var, ~/.config/forgejo/token). These are **VPS-scoped

Forgejo tokens** (not BTSP tokens). BTSP tokens are never stored in git or

transmitted through the relay chain.

---

BTSP Token Opacity Summary

ChannelBTSP Token Visible?Reason
TURN (:3478)NOMedia-only relay, DTLS encrypted
Federation (:7700)NOAuth resolved at target gate, not embedded in RPC
K-Derm git relayNOTokens not stored in repos, .age encrypted
BearDog TLS (:8443)LOCAL ONLYToken issued and consumed on same VPS

Conclusion: BTSP tokens are opaque to the relay in all cross-gate paths.

---

Attack Surface Assessment

If VPS is compromised

AttackImpactMitigation
Read git reposSource code exposedRepos are open-source (GitHub mirror exists)
Forge commitsUnsigned commits possibleProvenance trio (sweetGrass/loamSpine) detects via provenance.toml
Traffic analysisWho-talks-to-whom metadataSongbird peer rotation (future)
Intercept federationRead capability routingBearDog envelope encryption (gen5 target)
Steal TURN credentialsUnauthorized relay useCredential rotation, per-session TURN tokens (Songbird roadmap)
Steal Forgejo tokenRepo admin on VPS ForgejoToken scoped to VPS instance only, not upstream

What the relay CANNOT do

1. Decrypt BTSP sessions — no access to family seeds or BearDog private keys

2. Forge BearDog signatures — Ed25519 keys held only on gates

3. Modify encrypted content — .age blobs cannot be altered without detection

4. Impersonate a gate — mesh peer identity is cryptographically bound

5. Access local UDS sockets on gates — only accessible on localhost

---

Design Principles (for gen5 paper)

1. Relay sees routing, not content — The relay knows *where* to send data

but not *what* the data means (TURN) or *who authorized it* (BTSP is local).

2. Trust is additive, not transitive — A gate trusts its local BearDog for

auth. The relay is trusted for availability (routing) but not for

confidentiality or integrity.

3. Sovereign hosting is a tradeoff — The K-Derm git relay has full content

visibility because it IS the sovereign alternative to GitHub. The defense is

that the operator owns both the relay and the content.

4. Future hardening — Federation TLS + BearDog envelope encryption would

achieve full content opacity even on the federation channel. This is not

critical today because all gates are covalent (same operator).

---

Recommendations

1. No action needed for covalent mesh — All current gates share the same

operator. Full trust is appropriate.

2. Before ionic mesh (friend gates) — Implement:

  • Federation TLS (Songbird)
  • Capability call envelope encryption (BearDog → target gate pubkey)
  • Per-session TURN credentials (Songbird)

3. Before weak mesh (public gates) — Implement:

  • Zero-knowledge relay (BingoCube)
  • Hardware attestation (SoloKey)
  • Onion routing for federation (multi-hop)