diff --git a/docs/DEPLOYMENT_ITALY.md b/docs/DEPLOYMENT_ITALY.md index a59f7c7..f4419cb 100644 --- a/docs/DEPLOYMENT_ITALY.md +++ b/docs/DEPLOYMENT_ITALY.md @@ -308,6 +308,22 @@ LISTEN_PORT=5303 SECRET=lazio_satellite_secret ``` +To give each provincial satellite its own credential (so a leak in one +province doesn't impersonate another), use per-id entries — the id +after `SECRET_` is matched against the satellite's `SATELLITE_ID` +(charset `[A-Za-z0-9-]+`, no underscore): + +```ini +[SATELLITE] +LISTEN_PORT=5303 +SECRET=lazio_satellite_secret # fallback (optional) +SECRET_sat-roma=secret_for_roma +SECRET_sat-viterbo=secret_for_viterbo +``` + +Per-id wins with no fallback on HMAC mismatch. Keeping `SECRET=` is +backward-compatible: any satellite without a per-id entry uses it. + **Satellite** (e.g. Roma province): ```ini [GLOBAL] diff --git a/docs/DEPLOYMENT_ITALY_IT.md b/docs/DEPLOYMENT_ITALY_IT.md index 3a982b3..4122b08 100644 --- a/docs/DEPLOYMENT_ITALY_IT.md +++ b/docs/DEPLOYMENT_ITALY_IT.md @@ -314,6 +314,23 @@ LISTEN_PORT=5303 SECRET=lazio_satellite_secret ``` +Per dare a ogni satellite provinciale il proprio segreto (così che una +fuga in una provincia non possa impersonarne un'altra), usare voci +per-id — l'id dopo `SECRET_` è confrontato con il `SATELLITE_ID` del +satellite (caratteri ammessi `[A-Za-z0-9-]+`, niente underscore): + +```ini +[SATELLITE] +LISTEN_PORT=5303 +SECRET=lazio_satellite_secret # fallback (opzionale) +SECRET_sat-roma=secret_for_roma +SECRET_sat-viterbo=secret_for_viterbo +``` + +Il per-id vince e in caso di mismatch HMAC non c'è ricaduta sul +fallback. Mantenere `SECRET=` è retrocompatibile: ogni satellite senza +voce per-id lo usa. + **Satellite** (es. provincia di Roma): ```ini [GLOBAL] diff --git a/docs/DESIGN_SATELLITE_AND_CLUSTER.md b/docs/DESIGN_SATELLITE_AND_CLUSTER.md index 415fda8..4813ab0 100644 --- a/docs/DESIGN_SATELLITE_AND_CLUSTER.md +++ b/docs/DESIGN_SATELLITE_AND_CLUSTER.md @@ -58,6 +58,14 @@ LISTEN_PORT=5303 SECRET=regional_satellite_secret ``` +> The single shared `SECRET=` shown here is the original design. A +> later change added optional `SECRET_=` entries in the same +> section so each satellite can be pinned to its own credential +> (matched against the satellite's `SATELLITE_ID`); the shared +> `SECRET=` is preserved as a fallback for backward compatibility. +> See [README §Satellite reflectors](../README.md#satellite-reflectors) +> for the operator-facing config form. + On the **satellite**: ```ini diff --git a/docs/TOPOLOGY_EXAMPLES.md b/docs/TOPOLOGY_EXAMPLES.md index 8c12cd7..05165b9 100644 --- a/docs/TOPOLOGY_EXAMPLES.md +++ b/docs/TOPOLOGY_EXAMPLES.md @@ -194,21 +194,22 @@ section. SE only knows the prefixes it has trunks for: `222` (IT) and `262` Pull the Zones off the international mesh entirely. Only IT 222 is a trunk peer; the Zones become satellites of IT 222. -> **Trust model — small-deployment / single-operator pattern.** -> Satellites were originally introduced as a development/check reflector — a -> small NAT'd instance hanging off a parent for testing. The use case has -> grown beyond that, but the authentication model has not yet caught up: the -> parent's `[SATELLITE] SECRET` is **a single shared string** used to -> validate every inbound satellite (`Reflector.cpp:2675-2701`). If the -> secret leaks, an attacker can connect as any `sat_id` and present any -> `SATELLITE_FILTER` of their choosing — there's no per-satellite scoping -> on the parent side. This makes §3 most appropriate for small deployments -> under one trusted operator. For multi-operator national meshes, prefer -> §2 (national trunk mesh) where each `[TRUNK_x]` has its own `SECRET`, -> or §4 (hybrid) for a single NAT'd downstream site. **Future work**: -> per-satellite secrets keyed by `sat_id`, mirroring how trunks already -> work — until then, treat the shared secret as a design constraint of -> this pattern. +> **Trust model.** Satellites were originally introduced as a small, +> single-operator pattern: a NAT'd instance hanging off a parent, +> authenticated by one shared `[SATELLITE] SECRET=`. Since the +> per-satellite-secrets feature, the parent can also pin each satellite +> to its own value via `SECRET_=` entries in the same section +> (id charset `[A-Za-z0-9-]+`, matched against the satellite's +> `SATELLITE_ID`). Per-id wins — an HMAC mismatch on a pinned id rejects +> the connection with no fallback. Keeping `SECRET=` alongside the +> per-id entries is backward-compatible. Use the per-id form when more +> than one operator administers satellites under the same parent — e.g. +> per-Zone satellites in §3 each get `SECRET_=` so a leaked Zone-1 +> secret cannot impersonate Zone-2. For a single-operator deployment, +> the shared `SECRET=` is still fine; for multi-operator national meshes +> consider also §2 (national trunk mesh) where each `[TRUNK_x]` has its +> own `SECRET`. See [README §Satellite reflectors](../README.md#satellite-reflectors) +> for the config form. ``` INTERNATIONAL MESH (trunk full mesh, port :5302) @@ -274,7 +275,7 @@ together: Lombardia) lets a sub-group bring up their own reflector with their own user accounts and passwords, *without* sharing Z2's `[USERS]` / `[PASSWORDS]` database. Z2 admin holds Z2's user DB and the - `[SATELLITE] SECRET` that MI presents to attach; MI admin holds MI's + `[SATELLITE] SECRET=` (or its own `SECRET_=` entry on Z2) that MI presents to attach; MI admin holds MI's own `[USERS]` / `[PASSWORDS]` — only MI's V2 clients authenticate against it. Audio federates over the satellite link while authentication state stays separated on each side. diff --git a/docs/WW_DEPLOYMENT.md b/docs/WW_DEPLOYMENT.md index e796b51..8200d3a 100644 --- a/docs/WW_DEPLOYMENT.md +++ b/docs/WW_DEPLOYMENT.md @@ -380,6 +380,22 @@ LISTEN_PORT=5303 SECRET=de_satellite_secret ``` +To give each regional satellite its own credential (so a leak in one +region doesn't impersonate another), use per-id entries — the id after +`SECRET_` is matched against the satellite's `SATELLITE_ID` (charset +`[A-Za-z0-9-]+`, no underscore): + +```ini +[SATELLITE] +LISTEN_PORT=5303 +SECRET=de_satellite_secret # fallback (optional) +SECRET_sat-bayern=secret_for_bayern +SECRET_sat-nrw=secret_for_nrw +``` + +Per-id wins with no fallback on HMAC mismatch. Keeping `SECRET=` is +backward-compatible: any satellite without a per-id entry uses it. + **Satellite** (e.g. Bavaria): ```ini [GLOBAL]