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:
@@ -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/);
|
||||
|
||||
Reference in New Issue
Block a user