Security
This page covers the security mechanisms the developer preview implements today.
Transport Authentication and Encryption
Myrmic Nodes can authenticate each other and protect the traffic between them with mutual TLS. It is configured on the Zenoh transport link, where enable_mtls turns on certificate verification in both directions and verify_name_on_connect requires the name a Node is reached by to appear in the Subject Alternative Name of the certificate it presents, with endpoints declared under the tls/ scheme. Each Node presents its own certificate chain for both listening and connecting. A Node accepting a connection validates the client's chain against the configured root alone. A Node dialling one validates the server's chain against the configured root and the public Web PKI root list, which the transport seeds the trust store with before adding your root, so the set of anchors accepted in the dialling direction is wider than the one you configured - see Addresses that change below for what that costs when the name check is off. The Zenoh session runs inside that link, so traffic between two directly connected Nodes is encrypted and integrity-protected, and because Zenoh relays hop by hop a forwarding Node terminates the link and handles what it passes on in the clear.
Mutual TLS is off in the default configuration and is turned on per deployment. Issuing the certificates is the deployment's responsibility, because the preview ships no CA service, and swarm/tutorials/mTLS/ brings up a complete multi-node environment with a locally created CA hierarchy that stands in for one.
Addresses that change
A Node that changes its IP address rejoins the swarm on its own, without a restart - provided its listen endpoint is not bound to an address the host has just given up. Which listen shapes those are is a property of the transport and holds with or without mutual TLS. Mutual TLS then adds a second condition, because the name a dialler verifies is the host part of the endpoint it dialled, and there is no separate setting that overrides it.
This describes the runtime release that carries the host interface poll. Release 0.6.1 does not have it: a Node there does not notice an address change at all and needs a restart whatever its listen endpoint looks like.
Listen on an unspecified address. tls/0.0.0.0:7447 or tls/[::]:7447 is the shape that survives a move. The socket is bound to no particular host address, so it keeps accepting once the host's addresses change, and the Node recomputes the addresses it announces from the interfaces it holds at that moment. Put the Node's DNS name in the Subject Alternative Name of its certificate, and the same name in the connect endpoints of the peers that have to reach it: when the link drops those peers redial by name, resolution follows the Node to its new address, and the name check passes. This is the supported shape for any deployment whose Nodes can change address, and it needs name resolution that follows the Node - whatever answers for that name has to return the new address, or diallers keep going to the old one.
A listen endpoint that carries a name or an address does not survive. tls/node-7.example.internal:7447 and tls/192.0.2.10:7447 are the same case in the transport: the endpoint is resolved once, at start, and the socket is bound to the concrete address that came back. Once the host gives that address up the socket is still open and accepts nothing, and the Node goes on announcing a locator that no longer reaches it. Nothing rebinds the listener; only a restart does. Declaring the name on the listen endpoint therefore buys nothing - the name belongs in the certificate and in the diallers' connect endpoints, not in the listen endpoint. swarm/tutorials/mTLS/ uses named listen endpoints throughout, which is fine for its containers because their addresses do not move, and is not a shape to copy for Nodes whose addresses do.
Certificates issued for IP addresses keep the restart requirement, even behind a surviving listener. This is a supported shape rather than an oversight, but it gains nothing from a Node surviving an address change. A Node listening on an unspecified address announces itself as IP literals, so after a move it announces addresses its certificate has no iPAddress entry for, and a peer dialling one of them fails the handshake. Nothing about the certificate changed - what the peer expects did. Clearing that means issuing a certificate for the new address and restarting the Node with it. The failure surfaces in the dialler's log, under the target zenoh::net::runtime::orchestrator, as Unable to connect to ...! carrying rustls' NotValidForNameContext - printed as certificate not valid for name "..."; certificate is only valid for .... Grep for certificate not valid for name, and note that it needs a filter that lets that target through at warn; see Operating a swarm.
The same mechanism is the one caveat on the supported shape. What a Node announces are IP literals whatever its certificate says, so a peer that learned the Node only by gossip or scouting dials a literal and fails the name check against a DNS-only certificate. That is why the peers that must reach a mobile Node carry its name in their own connect endpoints: those redials are by name and are unaffected. Adding iPAddress entries to the certificate makes the gossiped locators diallable too, but only until the next move, which puts you back in the restart-requiring shape above.
The outbound direction is unaffected either way. A Node accepting a connection validates the client's chain, its validity and its clientAuth extended key usage, and never compares a name to the peer's address, so a moved Node can still dial out and be authenticated.
verify_name_on_connect: false switches the name check off and makes every shape survive a move as far as the certificate is concerned. It is an escape hatch, never a supported shape for a deployment whose addresses change. With the check off, a dialler accepts any unexpired certificate that chains to an anchor in its trust store, and that store holds the whole public Web PKI alongside your configured root: any certificate issued by any publicly trusted CA - not only by your root - can impersonate any Node to any dialler, and no extended key usage is checked either. The name check is the only thing tying a certificate to the peer you meant to reach, and a Node on the discovery plane can already steer a dial to an address of its choosing. This is how the transport has always behaved; the address-change work did not introduce it and does not change it.
Network trust in the default configuration
With mutual TLS off, which is the default, the network segment is the trust boundary. Any runtime that can reach the others on the segment joins the same swarm, with no explicit join step and no authentication, and messages between Nodes carry no cryptographic proof of the sender. Treat the segment as trusted: keep runtimes on a network you control, and use a dedicated segment to keep separate groups of machines from merging into one swarm. Turning on mutual TLS narrows that boundary to the holders of a certificate issued under your root.
Cell Isolation
Every Cell runs as a WebAssembly module inside a runtime that mediates its access to the Node. On OS-based Nodes that runtime is Wasmtime, and on supported MCUs it is WAMR, compiled ahead of time and executed in place from flash. In both cases the module reaches the host only through the host-call families its runner links into it, which include Cell commands and events, timers, the data layer, and the Signal Layer taps and outlets. Neither target links WASI, so a Cell has no ambient access to the filesystem, to sockets, to processes, or to the host clock, and it addresses its own linear memory alone. On OS-based Nodes the runtime meters guest instruction execution with Wasmtime fuel, so the computation a Cell performs is bounded by the fuel its runner grants it.
Coming
The security work still ahead, including an authenticated fabric with a full key lifecycle so that Nodes and Cells carry cryptographic proof of where they come from, is the Secure Swarm stage of the Roadmap.