docs(swarm): the queue auth-callout nkeys, and why two of its keys are values
secrets.md is the page that answers "who mints this and where does it go" per topology, and the callout nkeys had no row. Adds one, plus the `nk` invocations an operator needs on every topology that is not all-local. The note exists because the change provokes a question the page would otherwise answer wrongly: this page opens with "a secret is a path, never a value", and the queue takes two public keys as values. A reader who meets those after reading that line concludes the page is stale.
This commit is contained in:
parent
4365520ada
commit
22a191519f
1 changed files with 36 additions and 0 deletions
|
|
@ -44,12 +44,48 @@ Every row below is read against one of these.
|
|||
| OIDC client secret, digest half | the same mint | `oidc-clients/<id>.digest` | authelia's own half; merged at runtime via `settingsFiles` |
|
||||
| authelia subject store | `swarmctl` | `users.json` (canonical) → `users.yml` (rendered) | `swarmctl`, on the host that runs authelia |
|
||||
| wireguard private key | **the operator** — `wg genkey` | whatever `swarm.wireguard.privateKeyFile` names | always operator-provided; nothing generates this for you |
|
||||
| queue auth-callout nkeys (user seed + account seed) | `swarm-nats-callout-keys` first-boot unit, when `nats.autoGenerateCallout` is set | `/var/lib/swarm-nats-callout/{callout-user,issuer}.seed`, `0600` | operator mints both with `nk` and names them in `nats.calloutUserSeedFile` / `nats.calloutIssuerSeedFile` |
|
||||
|
||||
The three keys authelia mints for itself are generated in-container precisely
|
||||
because nothing outside that container ever reads them. **That is the test worth
|
||||
applying to any secret added here** — and the client secret's plaintext half is
|
||||
the one row that fails it, which is the entire reason a delivery step exists.
|
||||
|
||||
### The queue's public keys are values, not paths
|
||||
|
||||
`nats.calloutUserPublicKey` and `nats.calloutIssuerPublicKey` take a value
|
||||
rather than a file path, and that is not an exception to the rule at the top of
|
||||
this page. A public nkey is published to every client that connects; being
|
||||
widely known is its job. The matching **seeds** are the secrets, are named only
|
||||
as paths, and reach the callout responder and nothing else.
|
||||
|
||||
`nats.autoGenerateCallout` mints both keypairs on the host before the queue
|
||||
starts. It is on by default only under `enableAllLocalDefaults` — the one
|
||||
topology where the queue, its responder and the operator are the same person. On
|
||||
every other topology, mint them yourself:
|
||||
|
||||
```
|
||||
nk -gen user > callout-user.seed # the responder's own identity
|
||||
nk -gen account > issuer.seed # signs the user JWTs it hands out
|
||||
nk -inkey callout-user.seed -pubout # → calloutUserPublicKey
|
||||
nk -inkey issuer.seed -pubout # → calloutIssuerPublicKey
|
||||
```
|
||||
|
||||
Keep both seeds at `0600` and name them in `calloutUserSeedFile` /
|
||||
`calloutIssuerSeedFile`. Possession of the **issuer** seed is the authority to
|
||||
admit anyone to the queue, so it belongs wherever the responder runs and nowhere
|
||||
else.
|
||||
|
||||
A hive that sets neither the public keys nor `autoGenerateCallout` fails at
|
||||
eval, naming the option it wants. That is deliberate: a queue that started
|
||||
without them would accept `CONNECT {"user":"auth"}` from anyone sharing the
|
||||
host's network namespace, and nothing would look wrong until somebody connected.
|
||||
|
||||
One consequence of the generated path worth knowing before you debug it: with
|
||||
`autoGenerateCallout` set, the queue's config is assembled at boot rather than at
|
||||
build time, so a malformed one surfaces when the container starts instead of
|
||||
when the system builds. The server names the offending file and refuses to run.
|
||||
|
||||
## Hive-level — one of each per hive
|
||||
|
||||
| secret | generated by | lives at |
|
||||
|
|
|
|||
Loading…
Reference in a new issue