Adopting bare-metal nodes over mDNS without trusting the network
Abstract finds new machines over mDNS, which anyone on the LAN can spoof. How the controller decides which announcements to believe.
- Published
- Reading
- 9 min
- Tags
- abstract, mdns, nixos, bootstrapping
Abstract has one setup step that people like: plug the controller into your network and it finds your machines. That step runs over mDNS, and mDNS has no authentication. Any device on the segment can announce anything.
This post covers how a node goes from “something announced itself” to “the controller will deploy to it”, and which parts of that we trust.
What a fresh node announces
A node boots our installer image, generates an Ed25519 host key, and advertises a service:
$ avahi-browse -rt _abstract-node._tcp
+ eth0 IPv4 node-4c1e _abstract-node._tcp local
= eth0 IPv4 node-4c1e _abstract-node._tcp local
hostname = [node-4c1e.local]
address = [10.20.0.41]
port = [7443]
txt = ["v=1" "fp=SHA256:Qm4x9w...J2c" "cpu=16" "mem=64G" "disk=2x1.9T"]
The fp field is the fingerprint of the host key. Everything in the TXT record is a claim. The controller uses it to fill in the adoption screen and for nothing else.
Things we assume an attacker can do
- Announce a fake node with any name, address, or fingerprint.
- Answer for a real node’s hostname first.
- Replay an old announcement after the real node has been adopted.
We do not try to stop a fake node from appearing in the list. We try to make sure it cannot be adopted by mistake, and that adopting a real node pins its key.
Adoption
The controller opens TLS to the announced address and port. The node presents a self-signed certificate for its host key. The controller checks that the key matches fp, then shows a pairing code derived from both keys:
pair = base32(SHA256(controller_pub || node_pub))[0:8]
= 7KQ2-MD4X
The node prints the same code on its console and on the front panel display. An operator compares the two and clicks Adopt. If someone spoofed the announcement, the codes differ, because the spoofer cannot produce the real node’s key.
After adoption the controller stores the node’s public key. Every later connection checks it, so a replayed announcement or a hijacked hostname gets a TLS failure and a warning in the log:
2026-10-21T14:02:11Z WARN adopt node-4c1e: key mismatch
pinned SHA256:Qm4x9w...J2c
seen SHA256:b81Lzp...0aa
addr 10.20.0.77:7443
What we gave up
The operator has to look at the machine. For a rack of eight that takes a couple of minutes, and we think that is fine for hardware you own. We tried a fully automatic mode that trusted the first key seen. It worked well until we tested it on a network with a second installer running, and it adopted the wrong box.
What is still open
The installer image itself is unsigned on first boot, since there is no key to check it against yet. We are looking at shipping the controller’s public key on the USB stick so the image can verify the controller before announcing. That moves trust to the stick, which we hand to you in person anyway.