Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

Give a job a credential for the bot it acts as

6e1fca5115b709d31eeb51864b187d79aa104e5f · Keenan Nemetz · 7d ago · parent 446542e6

Give a job a credential for the bot it acts as

A workflow can name a bot account with `bot:`. When the job is leased the
instance generates a key for that run, stores the public half with the run,
repository and expiry, and sends the private half on the lease channel. The
runner writes it into the job's run directory with a known_hosts entry for the
instance, so a step's `git push` or `vole issue comment` authenticates as the
account and nothing has to be wired per job.

The account's role is the permission, in full. The credential replaces exactly one
requirement — that writing to the issues branch needs `maintain` — and adds no rule
of its own. What a job may write there is what its account may do, asked the same
way the browser asks: discuss, file an issue, manage an item it wrote, open a
change from a branch it may push, triage and approve when the role allows it. Those
are the ACL's own capabilities (`CanDiscuss`, `CanOpenRequest`, `CanTriage`,
`CanApprove`), so a maintainer's job may do everything a maintainer's key may do,
including labels, states, and other people's items.

A session is scoped only when the fingerprint it authenticated with is a live
credential row; an expired one reads as absent, so the push falls back to the
account's own role and is refused where a contribute account cannot write.

Two things end the key: the run finishing, which drops the row, and the expiry,
which is what stops a credential whose runner was killed and never reported. The
key is also masked in the log like a secret, since a step that cats it should not
leave it in the attempt.

Closes #165.

docs/accounts-and-access.md +14−4

@@ -51,10 +51,20 @@ CI immediately, it receives the secrets its workflows declare, and its approval
51 51 counts when it is not the author. Granting a role is the trust decision, and the
52 52 audit log and every approval name the bot.
53 53
54 A bot acts by holding a key, like a person. A short-lived credential that the
55 instance issues for one run and revokes when it ends is not available yet, so a
56 workflow that acts as a bot today holds the account's key in a repository secret,
57 with the exposure that implies: any job that declares the secret can read it.
54 A workflow can act as a bot without holding a long-lived key. A job that names the
55 account with `bot:` is given a credential when it is leased: a key generated for that
56 run, written into the job, and gone when the run ends. The key may do what the
57 account may do: discuss, file an issue, manage an item it wrote, open a change from a
58 branch it may push, triage and approve when the role allows it, and push the branches
59 the role allows. It cannot reach an admin surface, read repository secrets, or lease
60 work, because those are not repository writes.
61
62 The credential is not the account's key, and it does not widen the role: a
63 `contribute` bot's job still opens changes in its own namespace, and a job cannot
64 approve unless its account can. See
65 [Workflow reference § bot](reference/workflow-reference.md#bot). A bot may also hold an
66 ordinary key, provisioned the way a person's is, for an automation that is not a
67 workflow run.
58 68
59 69 Retiring a bot revokes it immediately: its key stops resolving, and a queued job it
60 70 was a runner for is no longer owed. Its name stays attached to its history, like