Skip to content

Commit 3af9210

Browse files
author
Yury Kirsanov
committed
clusterer_controller: document node_id allocation and trust-model limits
Add two paragraphs to the Security Architecture section: - Node identity and node_id allocation: ids are master-allocated, stable across restart (same IP reuses the id), and never collide during the failure-detection window since a failed-but-not-timed-out node keeps its slot. States the deployment requirement that each node present a stable, unique source IP (peers are keyed by IP; nodes sharing an address via NAT would share a slot/node_id). - Trust model: the cluster is a single shared-secret trust domain, so a party holding the password can legitimately win the election and take master. Rogue outsiders cannot (AEAD + per-source sequence check drop forged/replayed election packets). The residual risk is a malicious insider; per-node identity with revocation is noted as future work. Regenerated README from the docbook source.
1 parent ac74129 commit 3af9210

2 files changed

Lines changed: 74 additions & 0 deletions

File tree

modules/clusterer_controller/README

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,43 @@ on-key")
450450
line, a refused join, or a self-correction rather than a
451451
hard-to-diagnose HA failure.
452452

453+
Node identity and node_id allocation: node_id values are
454+
allocated exclusively by the current master, serialised under
455+
the peer-table lock, and a joining node never picks its own id.
456+
The master hands out the lowest unused id by scanning the live
457+
peer table, so a node that has failed but is not yet timed out
458+
still occupies its slot and its id is never handed to a
459+
different joiner — new nodes always receive a distinct id even
460+
during the failure-detection window. A node that restarts and
461+
rejoins from the same address reuses its previous id (and has
462+
its replay counter reset), so ids stay stable across restarts.
463+
Because peers are keyed by source IP address, every node in a
464+
cluster must present a stable, unique source IP: two distinct
465+
nodes that appear behind the same address (for example through
466+
NAT) would share a single peer slot and node_id. Deploy the
467+
cluster on a network where each member has its own routable
468+
address on the BIN/multicast interface.
469+
470+
Trust model — shared secret, not per-node identity: the cluster
471+
is a single shared-secret trust domain. Authentication proves
472+
only that a peer holds the cluster password; it does not bind a
473+
cryptographic identity to an individual node, and there is no
474+
per-node authorisation or revocation. Consequently any party in
475+
possession of the password is a fully trusted member and can
476+
legitimately win the highest-IP master election and assume the
477+
master role — there is no distinction between "may be a member"
478+
and "may be master". An attacker without the password cannot
479+
affect the election at all: forged or replayed MASTER_ALIVE and
480+
beacon packets fail AEAD authentication (or the strict
481+
per-source sequence check) and are dropped before any election
482+
logic runs. The residual exposure is therefore a malicious or
483+
compromised insider that already holds the shared key. Protect
484+
the password accordingly, and rotate it if a node is
485+
decommissioned or suspected compromised. Removing this
486+
limitation — per-node keypairs with enrolment and revocation,
487+
so a single node can be distrusted without re-keying the whole
488+
cluster — is planned future work.
489+
453490
1.5. Dependencies
454491

455492
1.5.1. OpenSIPS Modules

modules/clusterer_controller/doc/clusterer_controller_admin.xml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,43 @@
446446
refused join, or a self-correction rather than a hard-to-diagnose HA
447447
failure.
448448
</para>
449+
<para>
450+
<emphasis role="bold">Node identity and node_id allocation:</emphasis>
451+
<varname>node_id</varname> values are allocated exclusively by the current
452+
master, serialised under the peer-table lock, and a joining node never
453+
picks its own id. The master hands out the lowest unused id by scanning
454+
the live peer table, so a node that has failed but is not yet timed out
455+
still occupies its slot and its id is never handed to a different joiner —
456+
new nodes always receive a distinct id even during the failure-detection
457+
window. A node that restarts and rejoins from the same address reuses its
458+
previous id (and has its replay counter reset), so ids stay stable across
459+
restarts. Because peers are keyed by source IP address, every node in a
460+
cluster must present a stable, unique source IP: two distinct nodes that
461+
appear behind the same address (for example through NAT) would share a
462+
single peer slot and <varname>node_id</varname>. Deploy the cluster on a
463+
network where each member has its own routable address on the
464+
BIN/multicast interface.
465+
</para>
466+
<para>
467+
<emphasis role="bold">Trust model — shared secret, not per-node
468+
identity:</emphasis> the cluster is a single shared-secret trust domain.
469+
Authentication proves only that a peer holds the cluster password; it does
470+
not bind a cryptographic identity to an individual node, and there is no
471+
per-node authorisation or revocation. Consequently any party in possession
472+
of the password is a fully trusted member and can legitimately win the
473+
highest-IP master election and assume the master role — there is no
474+
distinction between "may be a member" and "may be master". An attacker
475+
<emphasis>without</emphasis> the password cannot affect the election at
476+
all: forged or replayed <emphasis>MASTER_ALIVE</emphasis> and beacon
477+
packets fail AEAD authentication (or the strict per-source sequence check)
478+
and are dropped before any election logic runs. The residual exposure is
479+
therefore a malicious or compromised <emphasis>insider</emphasis> that
480+
already holds the shared key. Protect the password accordingly, and rotate
481+
it if a node is decommissioned or suspected compromised. Removing this
482+
limitation — per-node keypairs with enrolment and revocation, so a single
483+
node can be distrusted without re-keying the whole cluster — is planned
484+
future work.
485+
</para>
449486
</section>
450487

451488
<section id="dependencies" xreflabel="Dependencies">

0 commit comments

Comments
 (0)