Give a bundle module's bound credential to the account its runtime runs as (issue 624) #302

Closed
mesh-admin wants to merge 1 commits from fix/624-a-bundles-secrets-belong-to-its-runtime into main
Contributor

Issue 624, after mesh-catalog #272 was delivered.

Diagnosis (read-only)

  • The reader account exists: gitea user mesh_shanks_lab, created 2026-10-13 12:08 UTC, active, last login never.
  • The requirement bound. shanks' declaration carries lab.bound-npm-package-registry (as: mesh_shanks_lab, at novox.internal), and lab.secret-npm-package-registry is sealed at /var/lib/lab/package-registry.secret. The lab's env-file names both files.
  • That secret file is composed with no owner, so it is root's at 0600. The lab's tools run in shanks' node runtime as jochen, so forgeCredential could not read it and returned none. The clones went out with no credential: "could not read Username".

Fix (internal/catalogue/declaration.go): a consumer's credential file is owned by the module's declared secrets-owner when it names one. Otherwise it is owned by the account that runs the module's code: the node's account for a module whose code is a bundle the runtime runs (provisionsAs). This is the consumer's side of what issue 225 did for grant secrets. A module with no bundle and no owner stays root's.

Tests (consumer_secret_owner_test.go): a bundle consumer's credential belongs to the runtime's account, and fails on main; a declared owner still wins; a container consumer's credential has no owner. go test ./internal/catalogue and vet pass, niced.

Issue 624 also needs mesh-catalog's lab_check fix (fresh check directories).

Issue 624, after mesh-catalog #272 was delivered. **Diagnosis (read-only)** - The reader account exists: gitea user `mesh_shanks_lab`, created 2026-10-13 12:08 UTC, active, last login never. - The requirement bound. shanks' declaration carries `lab.bound-npm-package-registry` (`as: mesh_shanks_lab`, at novox.internal), and `lab.secret-npm-package-registry` is sealed at /var/lib/lab/package-registry.secret. The lab's env-file names both files. - That secret file is composed with **no owner**, so it is root's at 0600. The lab's tools run in shanks' node runtime as `jochen`, so `forgeCredential` could not read it and returned none. The clones went out with no credential: "could not read Username". **Fix** (internal/catalogue/declaration.go): a consumer's credential file is owned by the module's declared `secrets-owner` when it names one. Otherwise it is owned by the account that runs the module's code: the node's account for a module whose code is a bundle the runtime runs (`provisionsAs`). This is the consumer's side of what issue 225 did for grant secrets. A module with no bundle and no owner stays root's. **Tests** (`consumer_secret_owner_test.go`): a bundle consumer's credential belongs to the runtime's account, and fails on main; a declared owner still wins; a container consumer's credential has no owner. `go test ./internal/catalogue` and vet pass, niced. Issue 624 also needs mesh-catalog's lab_check fix (fresh check directories).
mesh-admin added 1 commit 2026-10-13 12:40:23 +00:00
Give a bundle module's bound credential to the account its runtime runs as (hq issue 624)
mesh/merge-gate out of date: judged against trunk f3875a6b6019, the trunk is now 0a1dc5f93fcb; judged again on a recheck or when it is merged
mesh/repo-check out of date: judged against trunk f3875a6b6019, the trunk is now 0a1dc5f93fcb; judged again on a recheck or when it is merged
mesh/delivery stopped: the pull request closed unmerged
41216e4d4c
A consumer's credential file was composed with the owner the module declared, root when it declared
none. A module whose code is a bundle the node's runtime runs reads it as the operator's account, and
a root-owned 0600 file is one it cannot read: the lab cloned the forge with no credential. The grant
side was fixed the same way for issue 225; this is the consumer's side. A declared owner still wins.
Author
Contributor

Delivery novox/mesh-controller@41216e4d4c0a — stopped since 2026-10-13T13:07:29Z

Delivery plan — builds build-agent, mesh-controller → ace, g14, novox, shanks; no bus step

  • tier 0: mesh-controller
  • tier 1: build-agent
  • ace: receives build-agent
  • g14: receives build-agent
  • novox: receives mesh-controller, build-agent
  • shanks: receives build-agent
  • build-agent keeps data (ADR 0233): what it holds is backed up before it moves
  • grants step: if this changes what the bus's user list says (a new tool, subject or user), novox is sent that list alone, every build there kept, before build-agent is judged on its first machine

Transitions

  • 2026-10-13 12:40 (new) → proposed (announced): novox/mesh-controller#302's head announced
  • 2026-10-13 13:07 proposed → stopped (closed): the pull request closed unmerged

The commit's note under refs/notes/mesh-plan keeps every transition: git log --notes=mesh-plan.

<!-- mesh-delivery:view --> **Delivery** `novox/mesh-controller@41216e4d4c0a` — **stopped** since 2026-10-13T13:07:29Z **Delivery plan** — builds build-agent, mesh-controller → ace, g14, novox, shanks; no bus step - tier 0: mesh-controller - tier 1: build-agent - ace: receives build-agent - g14: receives build-agent - novox: receives mesh-controller, build-agent - shanks: receives build-agent - build-agent keeps data (ADR 0233): what it holds is backed up before it moves - grants step: if this changes what the bus's user list says (a new tool, subject or user), novox is sent that list alone, every build there kept, before build-agent is judged on its first machine **Transitions** - 2026-10-13 12:40 (new) → proposed (announced): novox/mesh-controller#302's head announced - 2026-10-13 13:07 proposed → stopped (closed): the pull request closed unmerged The commit's note under `refs/notes/mesh-plan` keeps every transition: `git log --notes=mesh-plan`.
Author
Contributor

Merge check at 41216e4d
Judged: head 41216e4d4c0a merged into trunk f3875a6b6019; read beside it: mesh-catalog 0d723484a84a, mesh-controller-main f3875a6b6019, mesh-host 7a41e120635b, mesh-tools 954e1a53eef9

  • mesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: build-agent, mesh-controller)
  • mesh/repo-check: PASS — its merge-check.sh passed

Delivery plan — builds build-agent, mesh-controller → ace, g14, novox, shanks; no bus step

  • tier 0: mesh-controller
  • tier 1: build-agent
  • ace: receives build-agent
  • g14: receives build-agent
  • novox: receives mesh-controller, build-agent
  • shanks: receives build-agent
  • build-agent keeps data (ADR 0233): what it holds is backed up before it moves
  • grants step: if this changes what the bus's user list says (a new tool, subject or user), novox is sent that list alone, every build there kept, before build-agent is judged on its first machine

Run by the build seat on ace as build-1791895232507119072 (builds --log build-1791895232507119072).

--- the gate: build-agent, mesh-controller
mesh-controller: ok, 58 tool(s); WARNING: merge-window ask(s) for a setting and do(es) not say whether it is trusted, so it counts as trusted: set at the terminal alone; say "trusted" false where nothing trusts it (novox/hq issue 339); WARNING: controller stay(s) up and say(s) not how it is ready — judged by liveness alone, refused from 2026-11-18 (ADR 0240 rule 8)
long-running resources without health: 1
files asking for a setting without saying whether it is trusted: 1
1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here
judging 1 module(s) changed against 4 machine(s), as the snapshot of 2026-10-13T12:13:29Z says they run
composing every machine as the mesh is
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
composing every machine with the change
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose)
judged by controller development build against the facts of 2026-10-13T12:13:29Z

modules the change moves:
  - mesh-controller (changed)

machines:
  - a machine (f35): composes
  - holds mesh-dns-resolver (idt): composes
  - holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes
  - a machine (yvbpsm): composes

a merge would rebuild 2 module(s) in 2 tier(s): build-agent, mesh-controller

notes:
  - internal/catalogue/consumer_secret_owner_test.go read by no module's build, and rebuild nothing (issue 280)
--- its merge-check.sh (go toolchain)
ok  	github.com/novox/mesh-controller/cmd/mesh-builder	1.041s
ok  	github.com/novox/mesh-controller/cmd/mesh-controller	158.274s
ok  	github.com/novox/mesh-controller/examples/objectstore-provisioner	1.027s
ok  	github.com/novox/mesh-controller/examples/postgres-provisioner	1.036s
ok  	github.com/novox/mesh-controller/examples/redis-provisioner	1.027s
ok  	github.com/novox/mesh-controller/examples/route-proxy	1.138s
ok  	github.com/novox/mesh-controller/internal/artifacts	1.063s
?   	github.com/novox/mesh-controller/internal/beside	[no test files]
ok  	github.com/novox/mesh-controller/internal/broker	3.976s
ok  	github.com/novox/mesh-controller/internal/builder	38.565s
ok  	github.com/novox/mesh-controller/internal/catalogue	7.661s
ok  	github.com/novox/mesh-controller/internal/conditions	2.542s
ok  	github.com/novox/mesh-controller/internal/envfile	1.030s
ok  	github.com/novox/mesh-controller/internal/facts	1.036s
ok  	github.com/novox/mesh-controller/internal/identity	4.336s
ok  	github.com/novox/mesh-controller/internal/inventory	34.998s
ok  	github.com/novox/mesh-controller/internal/lease	17.678s
ok  	github.com/novox/mesh-controller/internal/licences	3.720s
ok  	github.com/novox/mesh-controller/internal/licences/adapters	1.030s
ok  	github.com/novox/mesh-controller/internal/link	60.476s
ok  	github.com/novox/mesh-controller/internal/lint	2.286s
ok  	github.com/novox/mesh-controller/internal/outward	1.081s
ok  	github.com/novox/mesh-controller/internal/overlay	1.071s
ok  	github.com/novox/mesh-controller/internal/secrets	1.412s
ok  	github.com/novox/mesh-controller/internal/store	3.332s
ok  	github.com/novox/mesh-controller/internal/testbus	1.208s
ok  	github.com/novox/mesh-controller/internal/token	1.017s
store tests, each run against the store:
  ./cmd/mesh-controller --- PASS: TestAStopWithoutAMergeWalksTheOthersAgain (0.20s)
  ./cmd/mesh-controller --- PASS: TestAStopWithoutAMergeEndsTheMergesThatContainIt (0.21s)
  ./cmd/mesh-controller --- PASS: TestAStopWalksTheOthersAgainInTheOpenBatch (0.20s)
  ./cmd/mesh-controller --- PASS: TestAStopNamesWhatStaysOnTheMachinesAndWhatStillCarriesIt (0.19s)
  ./cmd/mesh-controller --- PASS: TestAStopWithoutAMergeLeavesItOutOfABatch (0.18s)
  ./cmd/mesh-controller --- PASS: TestSavingPlansAndMovingMergesIsOneAct (0.15s)
  ./cmd/mesh-controller --- PASS: TestAPlanFollowedFromTheStoreAnswersWhenItMoves (1.96s)
  ./cmd/mesh-controller --- PASS: TestNodeShowAndStatusReadTheLastSendFromTheStore (0.22s)
  ./cmd/mesh-controller --- PASS: TestTheConditionsVerbReadsTheLooksTheBucketNoLongerHolds (0.13s)
  ./cmd/mesh-controller --- PASS: TestAWalkLetGoAndStoppedByVerbsIsSaidStartedAndEnded (0.23s)
  ./cmd/mesh-controller --- PASS: TestAWalkStoppedOrClosedByAPersonIsSaidEndedStopped (0.23s)
  ./cmd/mesh-controller --- PASS: TestAWalkRetriedByAPersonIsSaidStartedAgain (0.20s)
  ./cmd/mesh-controller --- PASS: TestABacklogReleasedByAPersonIsSaidStarted (0.20s)
  ./cmd/mesh-controller --- PASS: TestAWalkEndedByCancelOrClearIsSaidEnded (0.25s)
  ./cmd/mesh-controller --- PASS: TestAWalkRestartedByARebuildIsSaidStarted (0.20s)
  ./cmd/mesh-controller --- PASS: TestAWalkStoppedByHandAndRetriedEndsFailedWhenItFailsAgain (0.24s)
  ./cmd/mesh-controller --- PASS: TestReplay237 (0.19s)
  ./cmd/mesh-controller --- PASS: TestAnUnassignThatLeavesItsNodeUnresolvedSaysSoOnceInItsAnswer (0.18s)
  ./cmd/mesh-controller --- PASS: TestAnUnassignThatLeavesItsNodeResolvedSaysNothingOfIt (0.18s)
  ./cmd/mesh-controller --- PASS: TestAnAssignThatLeavesItsNodeUnresolvedSaysOnlyThePlansRefusal (0.18s)
  ./cmd/mesh-controller --- PASS: TestADirectoryOwnersKeyIsRefusedThroughAVerb (0.22s)
  ./cmd/mesh-controller --- PASS: TestTheSendMakesNoValueForAnOutsideSecretNobodyGave (0.25s)
  ./cmd/mesh-controller --- PASS: TestAQuestionComposesWithoutAnOutsideSecretNobodyGave (0.25s)
  ./cmd/mesh-controller --- PASS: TestReplay201 (0.15s)
  ./cmd/mesh-controller --- PASS: TestARollbackWhoseSendWasRefusedIsCompletedByTheNextSend (0.14s)
  ./cmd/mesh-controller --- PASS: TestAGateJudgesTheOtherMovesBesideAKeptCore (0.14s)
  ./cmd/mesh-controller --- PASS: TestReplay401 (0.26s)
  ./cmd/mesh-controller --- PASS: TestReplay201ThePlansSend (0.23s)
  ./cmd/mesh-controller --- PASS: TestPlanAndNodeListAnOptionalRequirementLeftUnbound (0.27s)
  ./cmd/mesh-controller --- PASS: TestReplay340 (0.23s)
  ./cmd/mesh-controller --- PASS: TestOnlyATrustedFilesNamedKeyIsRefusedThroughAVerb (0.18s)
  ./cmd/mesh-controller --- PASS: TestReplay349 (0.18s)
  ./cmd/mesh-controller --- PASS: TestReplay348AFaultFromBeforeTheSendFailsNoGate (0.17s)
  ./cmd/mesh-controller --- PASS: TestReplay239AModuleNameIsNotTakenOverByAnotherRepository (0.14s)
  ./cmd/mesh-controller --- PASS: TestAWalkThatMovedNothingSaysWhichModulesMatchedWhatRuns (0.18s)
  ./cmd/mesh-controller --- PASS: TestReplay614ANewSDKPlansTheToolchainAndThenItsBundles (0.07s)
  ./cmd/mesh-controller --- PASS: TestOneAcceptForAProviderIsPlacedForEveryConsumer (0.42s)
  ./cmd/mesh-controller --- PASS: TestReplay164 (0.27s)
  ./internal/inventory --- PASS: TestTheLastSendSaysWhatTheMachineAnswered (0.07s)
  ./internal/inventory --- PASS: TestAReportIsTheLastSendsAnswerOnlyWhenItIsAboutThatSend (0.08s)
  ./internal/inventory --- PASS: TestAnIssuedValueIsSealedToEveryHolderOnceAndNotAgain (0.10s)
  ./internal/inventory --- PASS: TestAnIssuedValueIsSealedAgainAfterAKeyChangeOrAnAcceptance (0.08s)
  ./internal/inventory --- PASS: TestAConditionsLooksAreKeptBesideTheBucket (0.06s)
  ./internal/inventory --- PASS: TestAPlanIdHoldingAQuoteIsReadAsAPlainId (0.07s)
  ./internal/inventory --- PASS: TestAWalksStartIsKeptAndARefusedSaveLeavesItUnsaid (0.07s)
  ./internal/inventory --- PASS: TestAWalksRestIsReadFromEachMachinesOwnSend (0.07s)
  ./internal/inventory --- PASS: TestAStoredBuildWithASilentMergeableFileIsStillReadAndComposed (0.07s)
  ./internal/inventory --- PASS: TestACredentialIssuedOutsideIsNeverMade (0.08s)
  ./internal/inventory --- PASS: TestOneAcceptForAProviderIsSealedToEveryConsumer (0.08s)
  ./internal/inventory --- PASS: TestASharedOwnSecretIssuedOutsideIsNeverMade (0.07s)

Out of date when it landed: out of date: judged against trunk f3875a6b60, the trunk is now 0a1dc5f93fcb; judged again on a recheck or when it is merged

**Merge check** at `41216e4d` Judged: head `41216e4d4c0a` merged into trunk `f3875a6b6019`; read beside it: mesh-catalog `0d723484a84a`, mesh-controller-main `f3875a6b6019`, mesh-host `7a41e120635b`, mesh-tools `954e1a53eef9` - `mesh/merge-gate`: **PASS** — every machine composes with the change as it did without (4 of 4 compose) (modules: build-agent, mesh-controller) - `mesh/repo-check`: **PASS** — its merge-check.sh passed **Delivery plan** — builds build-agent, mesh-controller → ace, g14, novox, shanks; no bus step - tier 0: mesh-controller - tier 1: build-agent - ace: receives build-agent - g14: receives build-agent - novox: receives mesh-controller, build-agent - shanks: receives build-agent - build-agent keeps data (ADR 0233): what it holds is backed up before it moves - grants step: if this changes what the bus's user list says (a new tool, subject or user), novox is sent that list alone, every build there kept, before build-agent is judged on its first machine Run by the build seat on ace as `build-1791895232507119072` (`builds --log build-1791895232507119072`). ``` --- the gate: build-agent, mesh-controller mesh-controller: ok, 58 tool(s); WARNING: merge-window ask(s) for a setting and do(es) not say whether it is trusted, so it counts as trusted: set at the terminal alone; say "trusted" false where nothing trusts it (novox/hq issue 339); WARNING: controller stay(s) up and say(s) not how it is ready — judged by liveness alone, refused from 2026-11-18 (ADR 0240 rule 8) long-running resources without health: 1 files asking for a setting without saying whether it is trusted: 1 1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here judging 1 module(s) changed against 4 machine(s), as the snapshot of 2026-10-13T12:13:29Z says they run composing every machine as the mesh is the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued composing every machine with the change the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose) judged by controller development build against the facts of 2026-10-13T12:13:29Z modules the change moves: - mesh-controller (changed) machines: - a machine (f35): composes - holds mesh-dns-resolver (idt): composes - holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes - a machine (yvbpsm): composes a merge would rebuild 2 module(s) in 2 tier(s): build-agent, mesh-controller notes: - internal/catalogue/consumer_secret_owner_test.go read by no module's build, and rebuild nothing (issue 280) --- its merge-check.sh (go toolchain) ok github.com/novox/mesh-controller/cmd/mesh-builder 1.041s ok github.com/novox/mesh-controller/cmd/mesh-controller 158.274s ok github.com/novox/mesh-controller/examples/objectstore-provisioner 1.027s ok github.com/novox/mesh-controller/examples/postgres-provisioner 1.036s ok github.com/novox/mesh-controller/examples/redis-provisioner 1.027s ok github.com/novox/mesh-controller/examples/route-proxy 1.138s ok github.com/novox/mesh-controller/internal/artifacts 1.063s ? github.com/novox/mesh-controller/internal/beside [no test files] ok github.com/novox/mesh-controller/internal/broker 3.976s ok github.com/novox/mesh-controller/internal/builder 38.565s ok github.com/novox/mesh-controller/internal/catalogue 7.661s ok github.com/novox/mesh-controller/internal/conditions 2.542s ok github.com/novox/mesh-controller/internal/envfile 1.030s ok github.com/novox/mesh-controller/internal/facts 1.036s ok github.com/novox/mesh-controller/internal/identity 4.336s ok github.com/novox/mesh-controller/internal/inventory 34.998s ok github.com/novox/mesh-controller/internal/lease 17.678s ok github.com/novox/mesh-controller/internal/licences 3.720s ok github.com/novox/mesh-controller/internal/licences/adapters 1.030s ok github.com/novox/mesh-controller/internal/link 60.476s ok github.com/novox/mesh-controller/internal/lint 2.286s ok github.com/novox/mesh-controller/internal/outward 1.081s ok github.com/novox/mesh-controller/internal/overlay 1.071s ok github.com/novox/mesh-controller/internal/secrets 1.412s ok github.com/novox/mesh-controller/internal/store 3.332s ok github.com/novox/mesh-controller/internal/testbus 1.208s ok github.com/novox/mesh-controller/internal/token 1.017s store tests, each run against the store: ./cmd/mesh-controller --- PASS: TestAStopWithoutAMergeWalksTheOthersAgain (0.20s) ./cmd/mesh-controller --- PASS: TestAStopWithoutAMergeEndsTheMergesThatContainIt (0.21s) ./cmd/mesh-controller --- PASS: TestAStopWalksTheOthersAgainInTheOpenBatch (0.20s) ./cmd/mesh-controller --- PASS: TestAStopNamesWhatStaysOnTheMachinesAndWhatStillCarriesIt (0.19s) ./cmd/mesh-controller --- PASS: TestAStopWithoutAMergeLeavesItOutOfABatch (0.18s) ./cmd/mesh-controller --- PASS: TestSavingPlansAndMovingMergesIsOneAct (0.15s) ./cmd/mesh-controller --- PASS: TestAPlanFollowedFromTheStoreAnswersWhenItMoves (1.96s) ./cmd/mesh-controller --- PASS: TestNodeShowAndStatusReadTheLastSendFromTheStore (0.22s) ./cmd/mesh-controller --- PASS: TestTheConditionsVerbReadsTheLooksTheBucketNoLongerHolds (0.13s) ./cmd/mesh-controller --- PASS: TestAWalkLetGoAndStoppedByVerbsIsSaidStartedAndEnded (0.23s) ./cmd/mesh-controller --- PASS: TestAWalkStoppedOrClosedByAPersonIsSaidEndedStopped (0.23s) ./cmd/mesh-controller --- PASS: TestAWalkRetriedByAPersonIsSaidStartedAgain (0.20s) ./cmd/mesh-controller --- PASS: TestABacklogReleasedByAPersonIsSaidStarted (0.20s) ./cmd/mesh-controller --- PASS: TestAWalkEndedByCancelOrClearIsSaidEnded (0.25s) ./cmd/mesh-controller --- PASS: TestAWalkRestartedByARebuildIsSaidStarted (0.20s) ./cmd/mesh-controller --- PASS: TestAWalkStoppedByHandAndRetriedEndsFailedWhenItFailsAgain (0.24s) ./cmd/mesh-controller --- PASS: TestReplay237 (0.19s) ./cmd/mesh-controller --- PASS: TestAnUnassignThatLeavesItsNodeUnresolvedSaysSoOnceInItsAnswer (0.18s) ./cmd/mesh-controller --- PASS: TestAnUnassignThatLeavesItsNodeResolvedSaysNothingOfIt (0.18s) ./cmd/mesh-controller --- PASS: TestAnAssignThatLeavesItsNodeUnresolvedSaysOnlyThePlansRefusal (0.18s) ./cmd/mesh-controller --- PASS: TestADirectoryOwnersKeyIsRefusedThroughAVerb (0.22s) ./cmd/mesh-controller --- PASS: TestTheSendMakesNoValueForAnOutsideSecretNobodyGave (0.25s) ./cmd/mesh-controller --- PASS: TestAQuestionComposesWithoutAnOutsideSecretNobodyGave (0.25s) ./cmd/mesh-controller --- PASS: TestReplay201 (0.15s) ./cmd/mesh-controller --- PASS: TestARollbackWhoseSendWasRefusedIsCompletedByTheNextSend (0.14s) ./cmd/mesh-controller --- PASS: TestAGateJudgesTheOtherMovesBesideAKeptCore (0.14s) ./cmd/mesh-controller --- PASS: TestReplay401 (0.26s) ./cmd/mesh-controller --- PASS: TestReplay201ThePlansSend (0.23s) ./cmd/mesh-controller --- PASS: TestPlanAndNodeListAnOptionalRequirementLeftUnbound (0.27s) ./cmd/mesh-controller --- PASS: TestReplay340 (0.23s) ./cmd/mesh-controller --- PASS: TestOnlyATrustedFilesNamedKeyIsRefusedThroughAVerb (0.18s) ./cmd/mesh-controller --- PASS: TestReplay349 (0.18s) ./cmd/mesh-controller --- PASS: TestReplay348AFaultFromBeforeTheSendFailsNoGate (0.17s) ./cmd/mesh-controller --- PASS: TestReplay239AModuleNameIsNotTakenOverByAnotherRepository (0.14s) ./cmd/mesh-controller --- PASS: TestAWalkThatMovedNothingSaysWhichModulesMatchedWhatRuns (0.18s) ./cmd/mesh-controller --- PASS: TestReplay614ANewSDKPlansTheToolchainAndThenItsBundles (0.07s) ./cmd/mesh-controller --- PASS: TestOneAcceptForAProviderIsPlacedForEveryConsumer (0.42s) ./cmd/mesh-controller --- PASS: TestReplay164 (0.27s) ./internal/inventory --- PASS: TestTheLastSendSaysWhatTheMachineAnswered (0.07s) ./internal/inventory --- PASS: TestAReportIsTheLastSendsAnswerOnlyWhenItIsAboutThatSend (0.08s) ./internal/inventory --- PASS: TestAnIssuedValueIsSealedToEveryHolderOnceAndNotAgain (0.10s) ./internal/inventory --- PASS: TestAnIssuedValueIsSealedAgainAfterAKeyChangeOrAnAcceptance (0.08s) ./internal/inventory --- PASS: TestAConditionsLooksAreKeptBesideTheBucket (0.06s) ./internal/inventory --- PASS: TestAPlanIdHoldingAQuoteIsReadAsAPlainId (0.07s) ./internal/inventory --- PASS: TestAWalksStartIsKeptAndARefusedSaveLeavesItUnsaid (0.07s) ./internal/inventory --- PASS: TestAWalksRestIsReadFromEachMachinesOwnSend (0.07s) ./internal/inventory --- PASS: TestAStoredBuildWithASilentMergeableFileIsStillReadAndComposed (0.07s) ./internal/inventory --- PASS: TestACredentialIssuedOutsideIsNeverMade (0.08s) ./internal/inventory --- PASS: TestOneAcceptForAProviderIsSealedToEveryConsumer (0.08s) ./internal/inventory --- PASS: TestASharedOwnSecretIssuedOutsideIsNeverMade (0.07s) ``` **Out of date when it landed**: out of date: judged against trunk f3875a6b6019, the trunk is now 0a1dc5f93fcb; judged again on a recheck or when it is merged
mesh-admin left a comment
Author
Contributor

Verdict: request changes at 41216e4d4c

Statuses at this head (read 2026-10-13 14:45): mesh/merge-gate pending, "out of date: judged against trunk f3875a6b60, the trunk is now 0a1dc5f93fcb; judged again on a recheck or when it is merged"; mesh/repo-check pending with the same words; mesh/delivery pending, "checking". Neither required check has a verdict at this head.

Blocking 1: the change is broader than the fault, and the mesh already has the precise mechanism. ADR 0192's givenTo (internal/catalogue/runtime.go) already gives the runtime's account exactly the files a bundle's words name, and nothing else; TestABundleIsGivenItsWordsResolvedForThisMachine asserts that "a file no word names was given an owner" is a fault. Six modules already use it for a consumer or vault secret: gitea, icecast, mailu, redis, umami and claude-licence-manager name the one secret their tools read in their bundle's env. The lab names only MESH_LAB_WORK and MESH_LAB_ENV_FILE, and passes the secret's path inside lab.env, so givenTo never sees it. I checked this on main (584aa2d) with a throwaway test: a lab manifest whose bundle env names /var/lib/lab/package-registry.secret, composed with the runtime and Account "jochen", gives lab.secret-npm-package-registry the owner "jochen" (the runtime is also restarted when that file changes). So issue 624's consumer side is a one-line catalogue fix in modules/lab (a bundle word such as MESH_LAB_FORGE_SECRET: ${dir:state}/package-registry.secret, and the tools reading it from the word), not a controller rule.

Blocking 2: what this rule changes on the live mesh. I read the assignments with mesh-controller.node and the manifests at mesh-catalog 0d72348. I could not compose the branch against the live store, so this list is reasoned from the catalogue; mesh-controller.plan with diff says "nothing would change" on ace, g14, novox and shanks, because the running controller is main. Every bundle module's consumer and vault credential that no word names moves from root 0600 to the node's operator account at 0600:

  • novox (account jochen): gitea database and internal-token; keycloak database; mailu database, secret-key and admin; mesh-catalog database; mesh-knowledge database; nextcloud database and S3 store; umami database and app secret; claude-licence-manager database.
  • ace (account ace): baserow database; grafana oidc-client and influxdb-api; home-assistant mqtt-topic, sonarr-api, radarr-api and lidarr-api; icecast source and relay; letta database; nodered mqtt-topic.
  • shanks: the lab's package-registry secret (the intended change). g14: none.
    That is about 28 credential files for one the lab needs. None of those modules' tools read them, by the manifests: they reach their databases through files the node-engine composes with ${secret:…}.

Blocking 3: a revert does not roll this back. In mesh-host, ownedBy(path, "") returns true (internal/apply/user.go), and applyFile only chowns when a resource names an owner. After a revert, the resources say no owner again, and the files stay the operator's until each is rewritten, for example at a rotation. Putting them back to root would need a hand chown, which the mesh's rules forbid. For a security-relevant change across two nodes, that is not a rollback. With the catalogue fix, a revert has the same weakness, but for one file.

Security reading (not blocking on its own). The account does not become wider in effective terms: the sudo module gives ${machine:account} NOPASSWD: ALL on every node, so the operator account could already read these files through sudo. On novox the agents run as nox (ADR 0266), and nox cannot read a jochen-owned 0600 file, so §3.9's check is not tripped. But it is a real widening in plain file modes. Every module's tools in the one node runtime, and on ace, g14 and shanks every agent session (they run as the operator account), could read every bundle module's database password with no sudo and no sudo log. ADR 0259 §8 moved trusted modules to accounts of their own for exactly this kind of reason, and ADR 0310 makes node-reads read as an account that holds no secret.

mesh-reads and other runs-as modules are unaffected. mesh-reads has no consumer secrets. RunsAsProblems requires secrets-owner to equal runs-as, and the PR keeps a declared owner first, so a runs-as module keeps its own account.

Containers. baserow mounts its raw database.secret. Root inside the container still reads a file owned by uid 1000, through Docker's default CAP_DAC_OVERRIDE. I expect the owner change to count as an update in the node-engine (contentSame = false after a chown), so the restart-on composed for issue 203 would restart baserow on ace once. That is my reading of the code, not something I tested.

Tests. go vet and go test -race ./internal/catalogue pass, and go test ./... passes (niced). TestABundlesBoundCredentialBelongsToTheAccountItsRuntimeRunsAs fails on main as claimed: "the lab's credential belongs to ". Note that the test's lab manifest has no Loads and no words, so it does not model the lab as built.

What I suggest: close this PR, and give the lab a bundle word naming its secret in mesh-catalog (it fits issue 624's mesh-catalog PR). If a mesh-wide rule is still wanted, it is a decision record first, because it changes who can read every module's credentials.

Verdict: request changes at 41216e4d4c0a733c8233f590599cf43206c397d1 Statuses at this head (read 2026-10-13 14:45): mesh/merge-gate pending, "out of date: judged against trunk f3875a6b6019, the trunk is now 0a1dc5f93fcb; judged again on a recheck or when it is merged"; mesh/repo-check pending with the same words; mesh/delivery pending, "checking". Neither required check has a verdict at this head. **Blocking 1: the change is broader than the fault, and the mesh already has the precise mechanism.** ADR 0192's `givenTo` (internal/catalogue/runtime.go) already gives the runtime's account exactly the files a bundle's words name, and nothing else; `TestABundleIsGivenItsWordsResolvedForThisMachine` asserts that "a file no word names was given an owner" is a fault. Six modules already use it for a consumer or vault secret: gitea, icecast, mailu, redis, umami and claude-licence-manager name the one secret their tools read in their bundle's `env`. The lab names only `MESH_LAB_WORK` and `MESH_LAB_ENV_FILE`, and passes the secret's path inside lab.env, so `givenTo` never sees it. I checked this on main (584aa2d) with a throwaway test: a lab manifest whose bundle `env` names `/var/lib/lab/package-registry.secret`, composed with the runtime and Account "jochen", gives `lab.secret-npm-package-registry` the owner "jochen" (the runtime is also restarted when that file changes). So issue 624's consumer side is a one-line catalogue fix in modules/lab (a bundle word such as `MESH_LAB_FORGE_SECRET: ${dir:state}/package-registry.secret`, and the tools reading it from the word), not a controller rule. **Blocking 2: what this rule changes on the live mesh.** I read the assignments with mesh-controller.node and the manifests at mesh-catalog 0d72348. I could not compose the branch against the live store, so this list is reasoned from the catalogue; `mesh-controller.plan` with diff says "nothing would change" on ace, g14, novox and shanks, because the running controller is main. Every bundle module's consumer and vault credential that no word names moves from root 0600 to the node's operator account at 0600: - novox (account jochen): gitea database and internal-token; keycloak database; mailu database, secret-key and admin; mesh-catalog database; mesh-knowledge database; nextcloud database and S3 store; umami database and app secret; claude-licence-manager database. - ace (account ace): baserow database; grafana oidc-client and influxdb-api; home-assistant mqtt-topic, sonarr-api, radarr-api and lidarr-api; icecast source and relay; letta database; nodered mqtt-topic. - shanks: the lab's package-registry secret (the intended change). g14: none. That is about 28 credential files for one the lab needs. None of those modules' tools read them, by the manifests: they reach their databases through files the node-engine composes with `${secret:…}`. **Blocking 3: a revert does not roll this back.** In mesh-host, `ownedBy(path, "")` returns true (internal/apply/user.go), and applyFile only chowns when a resource names an owner. After a revert, the resources say no owner again, and the files stay the operator's until each is rewritten, for example at a rotation. Putting them back to root would need a hand chown, which the mesh's rules forbid. For a security-relevant change across two nodes, that is not a rollback. With the catalogue fix, a revert has the same weakness, but for one file. **Security reading (not blocking on its own).** The account does not become wider in effective terms: the sudo module gives `${machine:account}` `NOPASSWD: ALL` on every node, so the operator account could already read these files through sudo. On novox the agents run as nox (ADR 0266), and nox cannot read a jochen-owned 0600 file, so §3.9's check is not tripped. But it is a real widening in plain file modes. Every module's tools in the one node runtime, and on ace, g14 and shanks every agent session (they run as the operator account), could read every bundle module's database password with no sudo and no sudo log. ADR 0259 §8 moved trusted modules to accounts of their own for exactly this kind of reason, and ADR 0310 makes node-reads read as an account that holds no secret. **mesh-reads and other runs-as modules are unaffected.** mesh-reads has no consumer secrets. `RunsAsProblems` requires `secrets-owner` to equal `runs-as`, and the PR keeps a declared owner first, so a runs-as module keeps its own account. **Containers.** baserow mounts its raw database.secret. Root inside the container still reads a file owned by uid 1000, through Docker's default CAP_DAC_OVERRIDE. I expect the owner change to count as an update in the node-engine (`contentSame = false` after a chown), so the restart-on composed for issue 203 would restart baserow on ace once. That is my reading of the code, not something I tested. **Tests.** `go vet` and `go test -race ./internal/catalogue` pass, and `go test ./...` passes (niced). `TestABundlesBoundCredentialBelongsToTheAccountItsRuntimeRunsAs` fails on main as claimed: "the lab's credential belongs to <nil>". Note that the test's lab manifest has no `Loads` and no words, so it does not model the lab as built. What I suggest: close this PR, and give the lab a bundle word naming its secret in mesh-catalog (it fits issue 624's mesh-catalog PR). If a mesh-wide rule is still wanted, it is a decision record first, because it changes who can read every module's credentials.
Author
Contributor

Closed, per review 198. The change was too broad: it would have handed about 28 unrelated consumer credential files (database passwords on novox and ace) from root to the operator account, and a revert would not take them back.

The controller already has the narrow route (ADR 0192): the runtime's account is given exactly the files a module's tools bundle names in its env. gitea, icecast, mailu, redis and umami get their tool secrets that way. Issue 624's lab credential now goes that way too: mesh-catalog #274 names ${dir:state}/package-registry.secret (and its binding) in the lab's tools bundle env.

Closed, per review 198. The change was too broad: it would have handed about 28 unrelated consumer credential files (database passwords on novox and ace) from root to the operator account, and a revert would not take them back. The controller already has the narrow route (ADR 0192): the runtime's account is given exactly the files a module's tools bundle names in its env. gitea, icecast, mailu, redis and umami get their tool secrets that way. Issue 624's lab credential now goes that way too: mesh-catalog #274 names `${dir:state}/package-registry.secret` (and its binding) in the lab's tools bundle env.
mesh-admin closed this pull request 2026-10-13 12:51:25 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-controller#302