docs-editing: coolwsd admin-console secret carried with no producer + no defined env-var contract (split from #1247) #1250

Open
opened 2026-09-06 03:48:38 +00:00 by matou-build-agent · 0 comments

Symptom

Split off from #1247 (per-port clan-vars secret generators). #1247 converted every routable portAttachers port that carried a secret PATH as a Go string with no producer (archive, data-collections, whakapapa, newsletters, video) to declare its own clan.core.vars.generators.<slug>-secrets. docs-editing was deliberately NOT converted — this ticket covers it.

Why it was deferred, not done

Two facts set docs-editing apart from the five ports #1247 fixed:

  1. It does not exhibit the #1247 eval-exclusion. docs-editing renders the coolwsd admin secret as systemd.services.coolwsd.serviceConfig.EnvironmentFile = %q (internal/clan/docsediting.go:178) from DocsEditingConfig.AdminSecretFile, which the attach path never fills — so it renders EnvironmentFile = "". But serviceConfig.EnvironmentFile is a systemd freeform string, NOT types.path: an empty string evaluates fine (it is a runtime no-op, not the eval preflight red archive hit). It is also not in portAttachers (it routes through its own coupled placement path), so #1247's central pin TestPortSecretsNeverRendersAnEmptyOrLiteralEnvFile does not cover it.

  2. Its consumer contract is undefined (needs-design). The five ports #1247 fixed each had a known env-var / secret-file the daemon reads (GRIST_SESSION_SECRET, GRAMPSWEB_SECRET_KEY, LISTMONK_*, PT_INITIAL_ROOT_PASSWORD, PeerTube signing secret). docs-editing has NONE: the render sets an EnvironmentFile but names no env var, no test pins one, and the nixpkgs collabora-online module handles no admin/username/password/env option at all (verified: /nix/store/…/nixos/modules/services/web-apps/collabora-online.nix exposes no such setting). So wiring a generator requires DECIDING what env var(s) coolwsd reads for its admin console — a design decision, not the mechanical carried-string→generator conversion.

What to do

Decide the coolwsd admin-console credential contract (which env var(s) coolwsd actually consumes from the unit environment — confirm against a clan-lab drive, the way the archive reconciler's stdout shape is drive-confirmed), then declare a docs-editing-secrets clan-vars generator (internal/clan/docsediting.go) minting the admin password into an env file, reference config.clan.core.vars.generators.docs-editing-secrets.files.env.path as a Nix expression (drop the %q), and delete AdminSecretFile from DocsEditingConfig / DocsEditingLiveSet. Follow the #1247 precedent (renderArchiveSecrets / renderPortSecretsEnvFile). Red-first render test + fold docs-editing into the render pin.

Filed while working #1247.

## Symptom Split off from #1247 (per-port clan-vars secret generators). #1247 converted every routable `portAttachers` port that carried a secret PATH as a Go string with no producer (archive, data-collections, whakapapa, newsletters, video) to declare its own `clan.core.vars.generators.<slug>-secrets`. **docs-editing was deliberately NOT converted** — this ticket covers it. ## Why it was deferred, not done Two facts set docs-editing apart from the five ports #1247 fixed: 1. **It does not exhibit the #1247 eval-exclusion.** docs-editing renders the coolwsd admin secret as `systemd.services.coolwsd.serviceConfig.EnvironmentFile = %q` (`internal/clan/docsediting.go:178`) from `DocsEditingConfig.AdminSecretFile`, which the attach path never fills — so it renders `EnvironmentFile = ""`. But `serviceConfig.EnvironmentFile` is a systemd freeform string, NOT `types.path`: an empty string evaluates fine (it is a runtime no-op, not the eval preflight red archive hit). It is also not in `portAttachers` (it routes through its own coupled placement path), so #1247's central pin `TestPortSecretsNeverRendersAnEmptyOrLiteralEnvFile` does not cover it. 2. **Its consumer contract is undefined (needs-design).** The five ports #1247 fixed each had a known env-var / secret-file the daemon reads (`GRIST_SESSION_SECRET`, `GRAMPSWEB_SECRET_KEY`, `LISTMONK_*`, `PT_INITIAL_ROOT_PASSWORD`, PeerTube signing secret). docs-editing has NONE: the render sets an `EnvironmentFile` but names no env var, no test pins one, and the nixpkgs `collabora-online` module handles no admin/username/password/env option at all (verified: `/nix/store/…/nixos/modules/services/web-apps/collabora-online.nix` exposes no such setting). So wiring a generator requires DECIDING what env var(s) coolwsd reads for its admin console — a design decision, not the mechanical carried-string→generator conversion. ## What to do Decide the coolwsd admin-console credential contract (which env var(s) coolwsd actually consumes from the unit environment — confirm against a clan-lab drive, the way the archive reconciler's stdout shape is drive-confirmed), then declare a `docs-editing-secrets` clan-vars generator (`internal/clan/docsediting.go`) minting the admin password into an env file, reference `config.clan.core.vars.generators.docs-editing-secrets.files.env.path` as a Nix expression (drop the `%q`), and delete `AdminSecretFile` from `DocsEditingConfig` / `DocsEditingLiveSet`. Follow the #1247 precedent (`renderArchiveSecrets` / `renderPortSecretsEnvFile`). Red-first render test + fold docs-editing into the render pin. Filed while working #1247.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#1250
No description provided.