hive-matrix: keep tuwunel's OIDC secret on the host's /run, not in the container's root
swarm-bao-matrix-oidc still reads the secret from bao under matrix-ctl's leaf, but now writes it to /run/hive-matrix-oidc on the host (tmpfs), which the container bind-mounts read-only for tuwunel's LoadCredential. Before, it wrote it to /var/lib/nixos-containers/hive-matrix/var/lib/tuwunel-oidc/<id>.secret on persistent disk, where a superseded secret stayed after rotation and went into backups of the container root. Host tmpfiles now removes that old file. clientSecretFile must now lie under /run/hive-matrix-oidc/, the one directory the container shares; any other value fails at evaluation. Rotation is unchanged: the ten-minute timer rewrites the file when the value differs and refresh_consumer restarts tuwunel. After a reboot the secret is fetched again; until the store answers, tuwunel does not start. Part of #4998 (slice 4: tuwunel).
This commit is contained in:
parent
6f5bd1dc5d
commit
25d282427f
4 changed files with 74 additions and 24 deletions
|
|
@ -253,7 +253,7 @@ such as the root token.
|
|||
| hive leaf certs | `hive-tls.nix`, issued by the secret store's `pki` mount | `<deploy.hive-controller.tls.stateDir>/<name>.pem` |
|
||||
| the hive's own store identity | `glue-bao-tls.nix` on the store's host; placed by hand on every other host ([`ca.md`](ca.md#the-gateway-leaf-comes-from-the-secret-store)) | `deploy.hive-controller.tls.baoHiveIdentityCertFile` / `baoHiveIdentityKeyFile` |
|
||||
| the forge's copy of its OIDC secret | `swarm-bao-forge-oidc.service` reads it out of the swarm secret store under the forge publisher's leaf, wherever authelia runs | `/run/hive-forge-oidc/<id>.secret` on the host (tmpfs), bound into the forge container, handed to `forgejo-sso-source` through `LoadCredential` |
|
||||
| the homeserver's copy of its OIDC secret | `swarm-bao-matrix-oidc.service` reads it out of the swarm secret store under matrix-ctl's leaf, wherever authelia runs | `/var/lib/tuwunel-oidc/<id>.secret`, handed to tuwunel through `LoadCredential` |
|
||||
| the homeserver's copy of its OIDC secret | `swarm-bao-matrix-oidc.service` reads it out of the swarm secret store under matrix-ctl's leaf, wherever authelia runs | `/run/hive-matrix-oidc/<id>.secret` on the host (tmpfs), bound into the homeserver container, handed to tuwunel through `LoadCredential` |
|
||||
| the agent containers' queue credential | authelia, published to the store by `swarm-secret-publish` | `<deploy.hive-controller.queue.agentCredentialDir>/secret` (`0600`) and `/client_id` (`0644`) |
|
||||
|
||||
The forge and the homeserver read their copies out of the store, the way
|
||||
|
|
|
|||
Loading…
Reference in a new issue