vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Rewrite documentation around reader tasks
d1f44d838966c0a4762073f12375ec7562582fdf · Keenan Nemetz · 21h ago · parent 9103f6a8
docs/accounts-and-access.md +214−32
| @@ -1,39 +1,48 @@ | |||
| 1 | 1 | # Accounts and access | |
| 2 | 2 | ||
| 3 | An account owns SSH keys, passkeys, sessions, and roles. SSH keys authenticate | ||
| 4 | Git writes and remote administration; passkeys authenticate browser sessions. | ||
| 5 | Both identify the same account, so permissions and audit records do not depend | ||
| 6 | on which credential you used. | ||
| 3 | Vole uses one account identity across transports: SSH keys authenticate Git, | ||
| 4 | remote administration, and runners; passkeys authenticate browser sessions. | ||
| 5 | Create the account first, then grant instance-wide or repository-specific | ||
| 6 | access. | ||
| 7 | 7 | ||
| 8 | 8 | ## Create an account | |
| 9 | 9 | ||
| 10 | Instance admins create accounts on the host or through remote administration. | ||
| 10 | An instance admin can create accounts on the host or | ||
| 11 | [through remote administration](#remote-administration). Choose the credential | ||
| 12 | the person needs first; they can add the other credential later. | ||
| 13 | |||
| 11 | 14 | For Git access, register an SSH public key: | |
| 12 | 15 | ||
| 13 | 16 | ```sh | |
| 14 | vole admin account create alice --key alice.pub --role contributor | ||
| 17 | vole admin account create alice --key alice.pub | ||
| 15 | 18 | ``` | |
| 16 | 19 | ||
| 17 | For a browser-first account, omit `--key`: | ||
| 20 | For browser-first access, omit `--key`: | ||
| 18 | 21 | ||
| 19 | 22 | ```sh | |
| 20 | 23 | vole admin account create alice | |
| 21 | 24 | ``` | |
| 22 | 25 | ||
| 23 | 26 | Vole prints a one-time enrollment link when `public_url` is configured, or an | |
| 24 | enrollment token otherwise. Issue a replacement link for an existing account: | ||
| 27 | enrollment token otherwise. Send it through a private channel so Alice can | ||
| 28 | register her first passkey. | ||
| 29 | |||
| 30 | To issue a replacement link later: | ||
| 25 | 31 | ||
| 26 | 32 | ```sh | |
| 27 | 33 | vole admin account invite alice | |
| 28 | 34 | ``` | |
| 29 | 35 | ||
| 30 | 36 | A new link invalidates the previous one, and each link expires after one use. | |
| 31 | Send it through a private channel; whoever uses it can register the account's | ||
| 32 | first passkey. | ||
| 33 | 37 | ||
| 34 | Account names are permanent and never reused. They appear in contributor branch | ||
| 35 | names, access rules, approvals, locks, and metadata authorship. Choose the name | ||
| 36 | carefully; there is no rename command. | ||
| 38 | Creating an account does not grant access to a private repository. Continue with | ||
| 39 | [Grant repository access](#grant-repository-access), or add `--role <role>` to | ||
| 40 | the creation command for an instance-wide role that applies to public | ||
| 41 | repositories. | ||
| 42 | |||
| 43 | !!! warning "Account names are permanent" | ||
| 44 | Names appear in contributor branches, access rules, approvals, locks, and | ||
| 45 | metadata authorship. Choose carefully; there is no rename command. | ||
| 37 | 46 | ||
| 38 | 47 | ## Browser sign-in | |
| 39 | 48 | ||
| @@ -59,7 +68,7 @@ browser sign-in. | |||
| 59 | 68 | ||
| 60 | 69 | If every passkey is lost, an instance admin issues a fresh enrollment link. | |
| 61 | 70 | There is no password reset. See | |
| 62 | [Browser credential security](reference/accounts-and-access.md#browser-credential-security) | ||
| 71 | [Browser credential security](#browser-credential-security) | ||
| 63 | 72 | for token, rate-limit, and cloned-passkey protections. | |
| 64 | 73 | ||
| 65 | 74 | ## Roles | |
| @@ -103,9 +112,7 @@ vole admin acl set-role demo carol none | |||
| 103 | 112 | ``` | |
| 104 | 113 | ||
| 105 | 114 | `none` removes the explicit repository entry. It does not lower an instance-wide | |
| 106 | role. The accepted role names are `none`, `reader`, `contributor`, `runner`, | ||
| 107 | `maintainer`, and `admin`. The older spellings `read`, `contribute`, and | ||
| 108 | `maintain` are still accepted, as are `contrib` and the historical `write`. | ||
| 115 | role. Use the role names shown in the table above. | ||
| 109 | 116 | ||
| 110 | 117 | `runner` sits between `contributor` and `maintainer`. It is the CI identity: it | |
| 111 | 118 | may lease and run jobs, report checks that count, and publish the repository's | |
| @@ -143,10 +150,11 @@ Contributors can also write permitted issue and change-request records on the | |||
| 143 | 150 | `vole` branch. Pre-receive validates those files against the same authorship and | |
| 144 | 151 | capability rules as the browser. | |
| 145 | 152 | ||
| 146 | CI for a contributor branch waits until a maintainer chooses **Allow CI** for | ||
| 147 | the exact commit. That decision executes the proposed workflow and image builds | ||
| 148 | and delivers any declared repository secrets. Review all of them before allowing | ||
| 149 | a run. Every new tip needs a new decision. | ||
| 153 | !!! warning "Contributor CI runs the proposed code" | ||
| 154 | CI waits until a maintainer chooses **Allow CI** for the exact commit. That | ||
| 155 | decision executes the proposed workflow and image builds and delivers any | ||
| 156 | declared repository secrets. Review all of them before allowing a run. Every | ||
| 157 | new tip needs a new decision. | ||
| 150 | 158 | ||
| 151 | 159 | ## Remote administration | |
| 152 | 160 | ||
| @@ -174,13 +182,17 @@ In the browser, instance admins use **Admin** for status, accounts, runners, | |||
| 174 | 182 | configuration, and the audit log. The account directory's **Manage** action | |
| 175 | 183 | opens role, credential, session, enrollment, and retirement controls. | |
| 176 | 184 | ||
| 177 | Check the account and effective repository role for your current key: | ||
| 185 | From a repository clone, check the account and effective role for your current | ||
| 186 | key: | ||
| 178 | 187 | ||
| 179 | 188 | ```sh | |
| 180 | 189 | vole whoami | |
| 181 | 190 | vole whoami --role | |
| 182 | 191 | ``` | |
| 183 | 192 | ||
| 193 | Use `--remote <name-or-ssh-url>` outside a clone or when `origin` is not the | ||
| 194 | instance you want to inspect. | ||
| 195 | |||
| 184 | 196 | ## Bot accounts | |
| 185 | 197 | ||
| 186 | 198 | Create a bot when automation needs an attributable identity: | |
| @@ -199,8 +211,8 @@ and publishes their declared outputs without gaining shared-branch write, and a | |||
| 199 | 211 | A workflow with `acts-as: coding-agent` receives a credential created for that | |
| 200 | 212 | run instead of using the bot's long-lived key. A runner process uses its bot's | |
| 201 | 213 | ordinary key to lease work; jobs cannot use a per-run credential to lease more | |
| 202 | work. See [`acts-as`](reference/workflow-reference.md#acts-as) and | ||
| 203 | [The runner's account](runner.md#the-runners-account). | ||
| 214 | work. See [`acts-as`](workflows.md#acts-as) and | ||
| 215 | [The runner's account](runner.md#register-and-authorize-the-runner). | ||
| 204 | 216 | ||
| 205 | 217 | ## Manage credentials and sessions | |
| 206 | 218 | ||
| @@ -223,11 +235,8 @@ account's name and history. Revoke all sessions after restoring an old account | |||
| 223 | 235 | database. | |
| 224 | 236 | ||
| 225 | 237 | Account data lives in `data/instance.db`, with the access rules and release | |
| 226 | channels. Back it up consistently: | ||
| 227 | |||
| 228 | ```sh | ||
| 229 | vole admin db backup backup | ||
| 230 | ``` | ||
| 238 | channels. [Back up and restore](backup-and-restore.md) copies it consistently and | ||
| 239 | includes the secrets key. | ||
| 231 | 240 | ||
| 232 | 241 | ## Profiles and the user directory | |
| 233 | 242 | ||
| @@ -237,13 +246,186 @@ remain available because issues and reviews still refer to their names. | |||
| 237 | 246 | ||
| 238 | 247 | Writing `@name` in an issue, comment, change request, or release note links to | |
| 239 | 248 | that profile. Unknown names and mentions inside code samples remain plain text. | |
| 240 | See [Profiles and privacy](reference/accounts-and-access.md#profiles-and-privacy). | ||
| 249 | See [Profiles and privacy](#profiles-and-privacy). | ||
| 250 | |||
| 251 | ## Access-control details | ||
| 252 | |||
| 253 | This section defines credential storage, browser-session protections, profile | ||
| 254 | privacy, and concurrent access-rule behavior. | ||
| 255 | |||
| 256 | ### Identity and credential storage | ||
| 257 | |||
| 258 | An account's permanent name is its identity. Access rules, contributor refs, | ||
| 259 | approval paths, file locks, CI records, and metadata authors all use that name. | ||
| 260 | There is no separate mutable display identifier. Retiring an account keeps its | ||
| 261 | row and reserves the name so historical references cannot resolve to a new | ||
| 262 | person. | ||
| 263 | |||
| 264 | `data/instance.db` stores accounts, instance roles, SSH keys, passkeys, enrollment | ||
| 265 | links, browser sessions, repository access rules, file locks, and release | ||
| 266 | channels. SSH and passkey credentials store public keys. | ||
| 267 | Session and enrollment tokens are stored only as hashes. | ||
| 268 | |||
| 269 | Vole reloads the roster every few seconds, so key changes and retirement take | ||
| 270 | effect without restarting the server. Git commit author fields are text supplied | ||
| 271 | by the committer; they do not prove an account and are not used for access | ||
| 272 | control. | ||
| 273 | |||
| 274 | ### Browser credential security | ||
| 275 | |||
| 276 | New passkeys are discoverable credentials and require user verification. The | ||
| 277 | username field supports WebAuthn conditional UI through | ||
| 278 | `autocomplete="username webauthn"`; the username-first form remains available | ||
| 279 | for unsupported browsers and older credentials. | ||
| 280 | |||
| 281 | Enrollment links are single-use and expire. Issuing another link invalidates the | ||
| 282 | previous one. The token travels in the URL fragment: | ||
| 283 | |||
| 284 | ```text | ||
| 285 | https://forge.example.com/-/invite#<token> | ||
| 286 | ``` | ||
| 287 | |||
| 288 | Browsers do not send fragments to the server, proxy access logs, or referrers. | ||
| 289 | Older `/-/invite/<token>` links redirect into this form, and Vole redacts the old | ||
| 290 | path in its logs. | ||
| 291 | |||
| 292 | Session cookies are HttpOnly and Secure, and the database stores only token | ||
| 293 | hashes. Retiring an account deletes its sessions. Removing a passkey deletes | ||
| 294 | sessions created by that passkey, including the session used for removal. | ||
| 295 | Renaming a passkey changes only its display label. Removing a final credential | ||
| 296 | is refused; an SSH key counts as a remaining Git credential even though it does | ||
| 297 | not provide browser sign-in. | ||
| 298 | |||
| 299 | Sign-in, registration, enrollment, and passkey creation are rate-limited by | ||
| 300 | client address, with an additional account-name budget for sign-in. Ceremonies | ||
| 301 | expire after five minutes and their in-flight store is bounded. Excess requests | ||
| 302 | receive `429` and `Retry-After`. Behind a trusted proxy, configure | ||
| 303 | `git_http_client_ip_header` so limits use visitor addresses rather than the | ||
| 304 | proxy's address. | ||
| 305 | |||
| 306 | Unknown, retired, and passkey-less account names receive the same initial | ||
| 307 | assertion response as valid accounts. A generic failure appears only after the | ||
| 308 | ceremony, preventing the first response from enumerating accounts. | ||
| 309 | |||
| 310 | A passkey signature counter must advance. A non-advancing nonzero counter can | ||
| 311 | indicate a cloned credential, so Vole refuses sign-in and records | ||
| 312 | `auth.clone-warning`. Authenticators with broken counters can remain locked out | ||
| 313 | until an admin removes the credential. Synced passkeys that always report zero | ||
| 314 | follow WebAuthn's separate rule and do not trigger this refusal. | ||
| 315 | |||
| 316 | Open registration creates an account and its first passkey without an admin. | ||
| 317 | Its configured instance-wide role applies only to public repositories. Accepted | ||
| 318 | self-registration roles are `none`, `reader`, and `contributor`; `runner`, | ||
| 319 | `maintainer`, and `admin` require an explicit admin grant. Registration has no | ||
| 320 | email verification. | ||
| 321 | |||
| 322 | ### Access-rule evaluation | ||
| 323 | |||
| 324 | The effective repository role is the highest of: | ||
| 325 | |||
| 326 | - the repository default role; | ||
| 327 | - the account's explicit repository entry; | ||
| 328 | - the account's instance-wide role. | ||
| 329 | |||
| 330 | Instance-wide `reader`, `contributor`, `runner`, and `maintainer` do not open | ||
| 331 | private repositories. Instance-wide `admin` administers all repositories, | ||
| 332 | including private ones. A repository entry can raise an instance-wide role but | ||
| 333 | cannot lower it. | ||
| 334 | |||
| 335 | Access-rule updates use compare-and-swap. A command or browser form that read an | ||
| 336 | older rule version cannot overwrite a newer change. Operations that own one | ||
| 337 | field, such as visibility or one role entry, reread the row and modify only | ||
| 338 | that field to preserve unrelated concurrent updates. | ||
| 339 | |||
| 340 | Repository visibility switches the default role between `none` and `reader` | ||
| 341 | without changing explicit entries. Private repository paths return `404` to | ||
| 342 | anonymous readers so existence is not disclosed. | ||
| 343 | |||
| 344 | Every push is checked before any ref moves. Browser metadata writes use the same | ||
| 345 | capabilities and validators as pre-receive. These checks cover protected | ||
| 346 | branches, approvals, required checks, file limits, locks, metadata rules, and | ||
| 347 | runner role. Privileged overrides and merges through review are | ||
| 348 | recorded in `data/audit.log`. | ||
| 349 | |||
| 350 | ### Protected refs and trusted runners | ||
| 351 | |||
| 352 | A protected-branch pattern is an exact ref or a prefix ending in one `*`. | ||
| 353 | `protect` and related commands use `list`, `add`, `remove`, `set`, and `clear` to | ||
| 354 | inspect, change one entry, replace the list, or empty it. Admins can push | ||
| 355 | protected refs directly. | ||
| 356 | |||
| 357 | The `runner` role is the CI trust decision. It is ordered between `contributor` | ||
| 358 | and `maintainer`, so it may lease and run jobs, have its results satisfy required | ||
| 359 | checks, and publish the repository's site and declared artifacts. It is above | ||
| 360 | `reader` and `contributor` but below shared-branch writes, triage, and approval. | ||
| 361 | Maintainers and admins are above it and count as runners implicitly. Retired | ||
| 362 | accounts stop counting even if their role entries remain. | ||
| 363 | |||
| 364 | The retired runner allowlist is read once and folded into the role: an existing | ||
| 365 | allowlist entry becomes `runner` unless the account already held something | ||
| 366 | higher. The `acl runners` commands are gone; use `acl set-role <repo> <account> | ||
| 367 | runner` instead. | ||
| 368 | |||
| 369 | ### Contributor metadata writes | ||
| 370 | |||
| 371 | Contributors can push only their own `refs/heads/contrib/<account>/` namespace | ||
| 372 | and permitted metadata records. The metadata gate accepts issues, comments, and | ||
| 373 | requests that the same account could create or manage in the browser. It rejects | ||
| 374 | other paths and authorship changes. | ||
| 375 | |||
| 376 | CI allow decisions name the exact contributor head and are stored in the CI | ||
| 377 | queue database. A replacement or force-pushed tip waits for another decision. | ||
| 378 | Allowing a tip authorizes its workflow and image build and grants declared | ||
| 379 | repository secrets to the job. | ||
| 380 | |||
| 381 | ### Bot capabilities | ||
| 382 | |||
| 383 | Bots have permanent account kinds as well as permanent names. They cannot | ||
| 384 | receive passkeys or enrollment links, sign in to the browser, or hold the | ||
| 385 | instance-admin role. Their names are labeled as bots in profiles and the user | ||
| 386 | directory. | ||
| 387 | |||
| 388 | Repository roles otherwise apply normally. A maintainer bot can push shared | ||
| 389 | branches, trigger CI immediately, manage items permitted by its role, approve | ||
| 390 | another account's request, and receive declared secrets. A runner bot can lease | ||
| 391 | and run jobs, report checks, and publish sites and artifacts, but cannot push a | ||
| 392 | shared branch or approve. A contributor bot is limited to its own namespace and | ||
| 393 | maintainer-approved CI. | ||
| 394 | |||
| 395 | A runner uses the bot's ordinary SSH key to authenticate the runner process. By | ||
| 396 | contrast, `acts-as:` gives a job a new credential scoped to that repository and | ||
| 397 | run. The per-run credential cannot perform instance administration, read secret | ||
| 398 | values directly, or lease work. It expires when the run ends. | ||
| 399 | |||
| 400 | Retiring a bot revokes its ordinary key and stops it leasing work. Its historical | ||
| 401 | issues, changes, and run records retain the bot name. | ||
| 402 | |||
| 403 | ### Profiles and privacy | ||
| 404 | |||
| 405 | The account directory and profiles are public, but repository-derived counts and | ||
| 406 | activity are filtered for the current reader. Two readers can therefore see | ||
| 407 | different totals for the same account. Private-repository activity contributes | ||
| 408 | nothing to a reader who cannot open that repository. | ||
| 409 | |||
| 410 | Profiles are derived from `data/index.db`, which combines Git metadata and CI | ||
| 411 | records; they are not additional account records in `instance.db`. Keys, passkeys, | ||
| 412 | sessions, and instance roles are not public. An instance admin can see the role | ||
| 413 | because that account can already manage it. | ||
| 414 | |||
| 415 | The directory supports name search, active or retired filters, sortable columns, | ||
| 416 | and pagination. Filter, order, and page state lives in the URL so a link | ||
| 417 | reproduces the same view. Both directory and profile pages ask crawlers not to | ||
| 418 | index them. | ||
| 419 | |||
| 420 | `@name` links to an existing account profile in issue, comment, change-request, | ||
| 421 | and release Markdown. Workflow `mentioned` filters use the same syntax. Unknown | ||
| 422 | names and code samples are not mentions. | ||
| 241 | 423 | ||
| 242 | 424 | ## Next | |
| 243 | 425 | ||
| 244 | - [Access-control details](reference/accounts-and-access.md) — credential, | ||
| 426 | - [Access-control details](#access-control-details) — credential, | ||
| 245 | 427 | session, profile, and concurrent-rule behavior. | |
| 246 | 428 | - [Configuration](configuration.md#open-registration) — configure public | |
| 247 | 429 | registration. | |
| 248 | - [Operations](operations.md#back-up-an-instance) — back up the account | ||
| 430 | - [Back up and restore](backup-and-restore.md#back-up-an-instance) — back up the account | ||
| 249 | 431 | database. | |