nix: split statusPublish and the otel secret into deploy.*
Slices 8 and 9 of the swarm/deploy split, and the last two. statusPublish had three coordinates under one namespace. Two of them are this machine's — where the queue listens *as seen from here*, and where its client secret sits on this disk — so they move to `deploy.hive-controller.statusPublish.*`, the namespace of the daemon that is their only reader. `tokenEndpoint` is the swarm's one address, so it stays. That leaves `swarm.statusPublish` holding a single option: a legitimate split, not a botched move. The all-or-nothing assertion now spans both namespaces. It is repointed in both its condition and its message, and the message spells all three paths in full so an operator is never told to set two options under a path that only has one. `environment.nix`'s guard and the value beside it likewise read different namespaces on purpose. The collector's secret moves the same way, for the same reason, to `deploy.swarm-otel.*` — `enable` already lives there. That also retires one of the eight cross-namespace assignments tracked in #4048: the delivery unit set a `swarm.*` value under a `deploy.*` gate, and now sets a `deploy.*` value under one. module-eval gets a fixture per slice. `otelRemoteAuthelia` already set the collector secret through its pre-rename path, so it becomes slice 9's old-path case as it stands — left spelled that way deliberately, with a comment, so it is not read later as a missed site. That fixture also turned out to be describing an impossible hive: it said authelia lives elsewhere without saying where, so the authenticator interpolated a null `swarm.authelia.url` into its `token_url`. Nothing to do with the rename, and invisible to the existing case over the same fixture, which reads `? auth` and `elem` — both stop at names and never force the extension's value. Given the address a remote-IdP deployment has. Verified: 49 -> 51 properties, all holding.
This commit is contained in:
parent
2e1c15dc98
commit
01ce968fb6
8 changed files with 154 additions and 48 deletions
|
|
@ -301,8 +301,8 @@ it said. Hives publish upward through the swarm queue; the controller
|
|||
never reaches down to collect, so a hive that can't reach the swarm
|
||||
still knows its own state — you just can't see it from here.
|
||||
|
||||
A hive publishes only once it has been given the three
|
||||
`swarm.statusPublish` coordinates below. A hive that has not reads
|
||||
A hive publishes only once it holds all three status-publish coordinates
|
||||
below. A hive without them reads
|
||||
`never_reported` — it's not broken, it just has nothing to say upward.
|
||||
|
||||
| freshness | what to do about it |
|
||||
|
|
@ -322,17 +322,18 @@ between reports. Hives publish once a minute, so the default tolerates
|
|||
one missed report and flags two. It takes effect on the next request;
|
||||
nothing has to re-publish.
|
||||
|
||||
### Making a hive report (`swarm.statusPublish`)
|
||||
### Making a hive report
|
||||
|
||||
Three options, on the **hive**, set together or not at all — a
|
||||
half-configured hive is an eval error rather than one that quietly never
|
||||
reports:
|
||||
reports. They sit in two namespaces, because two of them are facts about
|
||||
_this machine_ and one is the swarm's single address:
|
||||
|
||||
| option | what to set it to |
|
||||
| ------------------ | ------------------------------------------------------ |
|
||||
| `natsUrl` | where the swarm queue listens, as this hive reaches it |
|
||||
| `tokenEndpoint` | the swarm IdP's `/api/oidc/token` |
|
||||
| `clientSecretFile` | path to this hive's client secret, plaintext |
|
||||
| option | what to set it to |
|
||||
| ------------------------------------------------------- | ------------------------------------------------------ |
|
||||
| `deploy.hive-controller.statusPublish.natsUrl` | where the swarm queue listens, as this hive reaches it |
|
||||
| `swarm.statusPublish.tokenEndpoint` | the swarm IdP's `/api/oidc/token` |
|
||||
| `deploy.hive-controller.statusPublish.clientSecretFile` | path to this hive's client secret, plaintext |
|
||||
|
||||
On a host that runs the queue and the IdP itself, all three default to
|
||||
the local ones and there is nothing to set. Any other hive needs them
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ neither is a renaming of the other.
|
|||
| authelia OIDC issuer key (RSA) | same unit | `/var/lib/authelia-swarm/oidc-issuer.key` | same — relying parties verify against the **public** half at `/jwks.json` |
|
||||
| OIDC client secret, plaintext half | `authelia crypto hash generate --random` | `/var/lib/authelia-swarm/oidc-clients/<id>.secret` | operator provides the file and names it in whichever option reads it — `sso.clientSecretFile` for a service, `otel.clientSecretFile` for the hive's telemetry collector |
|
||||
| OIDC client secret, digest half | the same mint | `oidc-clients/<id>.digest` | authelia's own half; merged at runtime via `settingsFiles` |
|
||||
| the swarm collector's copy of its OIDC secret | `swarm-otel-oidc-secret.service` copies it from authelia's tree, **when authelia runs on this host** | `/var/lib/swarm-otel-oidc/<id>.secret` inside the `swarm-otel` container | operator provides the file and names it in `swarm.otel.clientSecretFile` — the collector need not share a host with authelia |
|
||||
| the swarm collector's copy of its OIDC secret | `swarm-otel-oidc-secret.service` copies it from authelia's tree, **when authelia runs on this host** | `/var/lib/swarm-otel-oidc/<id>.secret` inside the `swarm-otel` container | operator provides the file and names it in `deploy.swarm-otel.clientSecretFile` — the collector need not share a host with authelia |
|
||||
| authelia subject store | `swarmctl` and `swarm-authelia-bridge` | `users.yml` — one file, read and written by both | `swarmctl`, on the host that runs authelia |
|
||||
| wireguard private key | **the operator** — `wg genkey` | whatever `deploy.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 `deploy.nats.autoGenerateCallout` is set | `/var/lib/swarm-nats-callout/{callout-user,issuer}.seed`, `0600` | operator mints both with `nk` and names them in `deploy.nats.calloutUserSeedFile` / `deploy.nats.calloutIssuerSeedFile` |
|
||||
|
|
@ -84,7 +84,7 @@ published is being scraped; otherwise no secret is needed and none is placed.
|
|||
Whether it authenticates follows the _credential_, never another service's
|
||||
placement: a swarm collector may run on a host that holds neither store and no
|
||||
authelia, and then the secret is an ordinary operator-provided file named in
|
||||
`services.hyperhive.swarm.otel.clientSecretFile` — the same shape as the hive
|
||||
`services.hyperhive.deploy.swarm-otel.clientSecretFile` — the same shape as the hive
|
||||
collector's row above. The copy unit is the convenience for the co-located case,
|
||||
not the definition of the case.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue