gitea runs as its own account, so the vault gives it its own secret

gitea asks the vault for module/gitea/* from inside the machine's tool runner,
whose calls are named <machine>.node-tools, and the vault refuses that account:
every gitea tool and the seat git's merge-pull failed. Its manifest now declares
runs-as gitea, the user resource gitea (in the group docker, which the seat
git's note verb needs for docker exec into the forge's container),
secrets-owner gitea and the own secret broker, so the node-engine composes a
runtime of its own for it on the account <machine>.gitea.

Builds: design 47 H2 H-A-543, H-A-545 (1)
This commit is contained in:
2026-11-25 17:02:17 +01:00
parent 17e1bfb6d3
commit 1d9e8d6824
2 changed files with 20 additions and 0 deletions
+5
View File
@@ -28,6 +28,11 @@ test("a note line is appended once, as the forge's user, in its own repository",
{ added: true, lines: 2 });
const append = calls.find((c) => c.includes("append"))!;
assert.deepEqual(append.slice(0, 7), ["docker", "exec", "-u", "git", "gitea", "git", "--git-dir"]);
// The note is run by docker, so the account the module runs as is in the group docker (H-A-543, H-A-545).
const { readFileSync } = await import("node:fs");
const manifest = JSON.parse(readFileSync(new URL("../module.json", import.meta.url), "utf8"));
const account = manifest.resources.find((r: { type: string; name: string }) => r.type === "user" && r.name === manifest["runs-as"]);
assert.ok(account?.groups?.includes("docker"), `the account ${manifest["runs-as"]} the module runs as is not in the group docker`);
assert.equal(append[7], "/data/git/repositories/novox/mesh-catalog.git");
assert.ok(append.includes("--ref=mesh-plan"));
assert.throws(() => noteArgs("gitea", "novox", "x; rm -rf /", sha, "mesh-plan"), /not a repository/);