Trust between servers#
Servers of a cluster pass each other everything: users with their password hashes, settings, keys. A DMZ is told what to do by a server. So each of them must be sure who is at the other end of a link. This page explains how CrushMFT 27 makes sure, and what you see of it.
A key per node#
Every server and every DMZ makes a key pair of its own at its first start, on its own machine. The private half never leaves that machine: it is not replicated, not sent to a DMZ, not in an export of the settings.
| Word | Is |
|---|---|
| node identity | a random node id, the key pair, and a certificate that carries the id |
| pin | the fingerprint (SHA-256) of a node's public key: 64 hex characters |
| fingerprint | what people compare: the first 16 characters of the pin in groups of four, 3F9A-01C2-77B0-E4D5 |
| member list | every node of the cluster with its id, role, name, pin, addresses and state. Every server holds the same list. |
The identity is kept in the folder cluster among the server's settings, readable by the account the server runs as and nobody else.
The rule#
A link between two nodes is an encrypted connection (TLS 1.3) on which both sides show their certificate. Each side accepts the other only if the other's pin is in its member list, for a node that is active.
Nothing else counts:
- not the address the connection comes from,
- not a host name,
- not a shared password,
- not the dates in the certificate. A node's certificate does not run out.
That is what "pinned" means on the Cluster page: the link is tied to the nodes' own keys.
How a node gets into the list#
Only one way: an administrator carries a one-time code from one machine to the other.
- To add a server, a member makes the code and the new server enters it: Joining a server.
- To add a DMZ, the DMZ shows the code and a server enters it: Pairing a DMZ.
The code carries part of the pin of the node that made it, and a secret. During their first connection, each side proves to the other that it knows the code, without sending it. After that, each has the other's pin, and the code is spent.
So an attacker who sits on the network between the two machines can neither read the join nor pose as one of them: they do not have the code, and the code never crosses the wire.
A code works once and for a limited time: 30 minutes for a server, 60 for a DMZ.
Verified, and unverified#
There is a second, weaker way in, for servers that were tied together before, the old way: take over the current link. The key that the other side shows now is pinned, without a code. It is as safe as the old link was at that moment, and no safer.
A node that came in so is marked Unverified, on its tile and in Members, until an administrator has compared fingerprints:
- On the Cluster page, Compare fingerprints shows the fingerprint this server pinned for the other node.
- Read the other node's fingerprint on the other node itself: in its Server Admin under Cluster, This server's port and addresses, or on a DMZ in what it prints when it starts and in its log.
- They match: the mark goes. They do not match:
Do not trust …. Remove it, then look at the network path between the two machines: something in between may pose as ….
Reading both fingerprints on the same screen proves nothing. The point is the second way to the other machine: its own console, its own admin page reached directly.
The cluster port#
Servers talk to each other on one port: the cluster port. Unless you set it, it is the replication port (7800 by custom). It carries replication, the cluster's own link for membership and status, and joins.
More, This server's port and addresses holds three things that belong to this server alone and are not passed to the others:
| Field | Is | Empty means |
|---|---|---|
| Cluster port | the port this server listens on for the other servers. "The cluster port must be open between the servers." | the replication port |
| Bind address | the address of this machine the port opens on | all addresses |
| This server's addresses | how the other servers reach this one, as host:port, several with commas |
the host name |
The dialog also shows the server's node id and what is in use now: "In use: 7800, listening".
The same fields are in Preferences, Replication.
Open the cluster port between the servers and to nobody else. A stranger who reaches it gets nowhere without a member's key, but there is no reason to let them try.
What this protects against#
| Protects against | |
|---|---|
| somebody on the network path reading or changing what servers send each other | everything is encrypted, and both ends are proven |
| somebody posing as a server, as a DMZ, or as the server of a DMZ | they do not have the key |
| somebody who learnt the old shared secret | the secret is not used on a pinned link |
| a node that was removed | its pin is out of the list |
| Does not protect against | |
|---|---|
| a member that is itself broken into | a server of the cluster can pass any user or setting to the others. A cluster is as safe as its weakest server. |
| a copied disk | whoever has a node's folder has its key. A machine that was cloned is noticed: two processes reporting as the same node raise an alert. |
| an administrator who enrols the wrong machine | the fingerprint is shown before and after, to be compared |
| the moment between removing a node and the last server learning of it | Members shows how far a removal has travelled |
Nothing is weakened quietly#
Once a link is pinned, a peer without a valid key is refused, with a line in the log and an alert. Going back to the old way is an administrator's action, in the open: Allow the old way again.
Alerts#
| Alert | Fires when |
|---|---|
| Cluster Peer Refused | a connection from another machine was refused |
| Cluster Enrolment Failed | codes were made void after wrong tries |
| Cluster Identity Cloned | two processes report as the same server |
| Cluster Identity Unreadable | a server's own key cannot be used |
See Alerts overview.
Things to know#
- One identity, three uses. The same key ties a server to the other servers, to its DMZs, and proves it on ServerBeat.
- The certificate that users see is another one. The node's key is only for links between nodes. Web and FTPS users get the certificate you set up for the listeners: SSL certificates.
- Backups. A backup of a server's settings folder holds its key. Guard it like the key it is. Restoring it onto the same machine is fine; starting it on a second machine while the first runs is a cloned identity.
- CrushFTP 11 has none of this. A CrushMFT 27 server keeps talking to a version 11 peer the old way for replication; ServerBeat and DMZ links need both sides on 27.