From a679ab28db48b8f59705b628af1d1c90e4b08a02 Mon Sep 17 00:00:00 2001 From: Audric Date: Sun, 17 May 2026 02:24:37 +0200 Subject: [PATCH] docs(satellite): document per-id SECRET_= in README --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index d48d4bf..653fcd6 100644 --- a/README.md +++ b/README.md @@ -356,6 +356,36 @@ LISTEN_PORT=5303 SECRET=regional_satellite_secret ``` +`SECRET=` is the shared fallback used by every satellite. To pin a +satellite to its own secret (so that compromising the fallback cannot +impersonate it, and rotating one satellite does not require touching +the others), add per-id entries alongside: + +```ini +[SATELLITE] +LISTEN_PORT=5303 +SECRET=regional_satellite_secret +SECRET_alpha=secret_for_alpha +SECRET_bravo-east=secret_for_bravo_east +``` + +The id after `SECRET_` is matched case-sensitively against the +satellite's `SATELLITE_ID`. Allowed id characters: `[A-Za-z0-9-]+` +(alphanumeric + dash; **no underscore**). Malformed keys are logged and +ignored at startup. + +Lookup rule when a satellite connects: + +1. If `SECRET_=` is set for the satellite's id, verify against + that value. **Mismatch rejects the connection — there is no + fallback once an id is pinned.** +2. Otherwise, fall back to `SECRET=` if set. +3. Otherwise, reject. + +Keeping `SECRET=` alongside the per-id entries is backward-compatible: +existing satellites with no per-id entry continue to authenticate via +the default. + **Satellite side** — set `SATELLITE_OF` in `[GLOBAL]` instead of `LOCAL_PREFIX` and `[TRUNK_x]` sections: