Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Engine reference — generated from the canonical engineering source. Do not edit this page by hand.

TLS Posture — Per-Plane Reference

This page states the TLS/transport posture of each ZERG plane as implemented in the tree. It is a map, not a promise that every plane is TLS: several planes are plaintext by design or by documented residual, and one plane (Sol↔Luna) uses CURVE rather than TLS. The Sol↔Luna mTLS decision is plan/mtls-decision.md.

PlaneTransport protectionPeer authenticationStatus
Sol HTTP API (Cowboy)Optional TLS (tls_enabled)Server cert only; client certs not requestedTLS available; plaintext refused in prod non-loopback unless acked/tunnel
Sol → Mango (auth/identity)One-way TLS client (mango_tls)verify_peer + optional mango_ca_fileTLS available; plaintext non-loopback refused in prod
Mango listenerNo TLS listener in MangoTerminated by the wild edge proxyEdge termination (wild-owned); mTLS client-cert leg not implemented
Sol → PostgreSQL (memory pool)Optional TLS (memory_pg_ssl)verify_peer + required CAOpt-in; default off (single-host bridge)
Erlang distributionTLS template (ssl_dist.conf.example)verify_peer + fail_if_no_peer_cert when activeDesign + template landed; wild activated on the live cluster 2026-09-22; epmd stays plaintext by design
Sol ↔ Luna (ZMQ)CURVE (X25519 + XSalsa20-Poly1305) default on non-loopbackServer key pinned by workers; worker authenticated by enrollment HMAC + per-frame MACCURVE + HMAC; mTLS declined (see decision)
Luna → providers / webTLS with peer verification pinned; per-hop address pinsServer cert (VERIFY_PEER=1); no verification-less pathEnforced in the Luna transport
Sol → providers / OAuth / license / health probesTLS with verify_peer + CA resolutionServer certEnforced; per-module CA resolution
Sol → event archive (Mango)HTTP(S) with verify_peer; loopback exceptionServer cert; CA pinned when mango_ca_file is setEnforced

Sol HTTP API

Configuration (server/config/sys.config, docs/configuration-reference.md):

tls_enabled = true binds a TLS listener; tls_cert_file / tls_key_file are required and readable, otherwise the boot refuses outside dev (or falls back CRITICAL-logged in dev, or with tls_plaintext_ack=true). tls_ca_file adds cacertfile to the listener options when the file exists (server/src/sol_http.erl). That is a CA bundle for the listener, not a client-certificate requirement: the listener does not set verify_peer or fail_if_no_peer_cert, so mTLS is not enabled by setting tls_ca_file. A non-loopback plaintext HTTP bind in deployment_mode=prod refuses boot unless the operator sets http_transport_plaintext_ack=true or declares a terminator/tunnel via http_transport_tunnel (http-terminator, wireguard, mtls-sidecar). The ack is CRITICAL-logged; the tunnel declaration is not a substitute for inspecting the actual upstream.

Sol → Mango

mango_tls=true gives Sol a one-way verified TLS client: {verify, verify_peer} plus mango_ca_file when set (server/src/sol_mango_client.erl). In prod, a non-loopback Mango URL without TLS refuses boot. Mango itself has no TLS listener; the wild topology terminates TLS in front of it. Client certificates are not validated by Mango today (the known-security-gaps Mango row tracks the remaining client-certificate leg as wild-owned).

Sol → PostgreSQL

memory_pg_ssl=true requires memory_pg_ca_file and connects with verify_peer (server/src/sol_pg_pool.erl). An ssl-without-CA connect is a typed refusal, never blind encryption. The default is off, matching the single-host bridge posture; remote-PG TLS is an operator opt-in. URL query parameters (?sslmode=...) are not parsed by the pool — use the dedicated keys.

Erlang distribution

The TLS dist design and the corrected single-term option file are in server/config/ssl_dist.conf.example; activation is -proto_dist inet_tls + -ssl_dist_optfile in the rendered vm.args (wild-owned host leg; see docs/production-flip-checklist.md). Both legs use verify_peer + fail_if_no_peer_cert. The distribution cookie remains the admission credential — TLS adds confidentiality and node identity, not authorization. epmd stays plaintext by design (it cannot speak TLS); the residual is name enumeration + registration DoS on the LAN.

Sol ↔ Luna (ZMQ)

This plane is not TLS; it is CURVE + application-layer HMAC:

CURVE is default-on whenever the bind is non-loopback (zmq_curve_enabled=auto). The server keypair is generated/persisted at curve_server.cert (0600); workers pin the public key. Under the Option A′ migration, client keys are ephemeral and zmq_curve_clientkeys=any: CURVE is confidentiality + server authentication, not worker authorization. Worker registration is authenticated by a per-worker enrollment HMAC over nonce + identity + worker_id + child_depth + monotonic ctr. Every worker-plane frame carries a trailing HMAC bound to the session key, routing identity and monotonic tx; the durable replay fence closes replay across node restarts. A non-loopback plaintext bind in prod refuses boot unless explicitly acked or declared as a tunnel.

The mTLS alternative (client certificates for this plane) was evaluated and Declined; see plan/mtls-decision.md for the threat-model delta, key distribution, and revisit triggers.

Outbound provider and web transports

Luna’s transport pins CURLOPT_SSL_VERIFYPEER=1 and has no verification-less fetch path; a caller asking for verify_peer=false is refused (or proceeds with verification under the explicit LUNA_ALLOW_INSECURE_TLS=1 ack, which can only ever weaken to the same verified behavior). Web/MCP fetches resolve and pin addresses per hop (CURLOPT_RESOLVE), and pinned requests set CURLOPT_NOPROXY="*" so a proxy environment cannot void the pin; provider fetches are configured destinations and are not address-pinned the same way. Sol’s provider, OAuth, license and health-probe clients use verify_peer with CA resolution (server/src/sol_cacerts.erl and the per-module call sites).

Known gaps (not closed by this page)

HTTP listener client-certificate (mTLS) enforcement is not implemented. Mango client-certificate validation is not implemented (wild edge-proxy leg). Erlang distribution epmd remains plaintext. PostgreSQL TLS is opt-in and the pool does not parse sslmode URLs. The Sol↔Luna plane uses CURVE, not TLS; mTLS is declined, not “planned”.

See docs/known-security-gaps.md for the tracked rows and owners.