Sign in

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

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.

Restructure documentation around reader tasks

348a43c364fbb04be834af44a7cd43a0931fa280 · Keenan Nemetz · 20d ago · parent b7383c19

Restructure documentation around reader tasks

Group the site by getting started, collaboration, CI, publishing, and administration. Rewrite the guides as executable procedures and move issue formats, merge semantics, configuration defaults, customization, and access-control mechanics into dedicated references.

Verify the quickstart and review flow against a throwaway instance, execute the service recipe, inspect the rendered site, and run the complete verify workflow.

Closes: 01M7B6X6RDYBAP3JVA5SYSA1K8

docs/reference/accounts-and-access.md +162

@@ -0,0 +1,162 @@
1 # Access-control details
2
3 This reference defines credential storage, browser-session protections, profile
4 privacy, and concurrent access-rule behavior. For account and role procedures,
5 see [Accounts and access](../accounts-and-access.md).
6
7 ## Identity and credential storage
8
9 An account's permanent name is its identity. Access rules, contributor refs,
10 approval paths, file locks, CI records, and metadata authors all use that name.
11 There is no separate mutable display identifier. Retiring an account keeps its
12 row and reserves the name so historical references cannot resolve to a new
13 person.
14
15 `data/users.db` stores accounts, instance roles, SSH keys, passkeys, enrollment
16 links, browser sessions, repository access rules, file locks, and daily page-view
17 counters. SSH and passkey credentials store public keys. Session and enrollment
18 tokens are stored only as hashes.
19
20 Vole reloads the roster every few seconds, so key changes and retirement take
21 effect without restarting the server. Git commit author fields are text supplied
22 by the committer; they do not prove an account and are not used for access
23 control.
24
25 ## Browser credential security
26
27 New passkeys are discoverable credentials and require user verification. The
28 username field supports WebAuthn conditional UI through
29 `autocomplete="username webauthn"`; the username-first form remains available
30 for unsupported browsers and older credentials.
31
32 Enrollment links are single-use and expire. Issuing another link invalidates the
33 previous one. The token travels in the URL fragment:
34
35 ```text
36 https://forge.example.com/-/invite#<token>
37 ```
38
39 Browsers do not send fragments to the server, proxy access logs, or referrers.
40 Older `/-/invite/<token>` links redirect into this form, and Vole redacts the old
41 path in its logs.
42
43 Session cookies are HttpOnly and Secure, and the database stores only token
44 hashes. Retiring an account deletes its sessions. Removing a passkey deletes
45 sessions created by that passkey, including the session used for removal.
46 Renaming a passkey changes only its display label. Removing a final credential
47 is refused; an SSH key counts as a remaining Git credential even though it does
48 not provide browser sign-in.
49
50 Sign-in, registration, enrollment, and passkey creation are rate-limited by
51 client address, with an additional account-name budget for sign-in. Ceremonies
52 expire after five minutes and their in-flight store is bounded. Excess requests
53 receive `429` and `Retry-After`. Behind a trusted proxy, configure
54 `git_http_client_ip_header` so limits use visitor addresses rather than the
55 proxy's address.
56
57 Unknown, retired, and passkey-less account names receive the same initial
58 assertion response as valid accounts. A generic failure appears only after the
59 ceremony, preventing the first response from enumerating accounts.
60
61 A passkey signature counter must advance. A non-advancing nonzero counter can
62 indicate a cloned credential, so Vole refuses sign-in and records
63 `auth.clone-warning`. Authenticators with broken counters can remain locked out
64 until an admin removes the credential. Synced passkeys that always report zero
65 follow WebAuthn's separate rule and do not trigger this refusal.
66
67 Open registration creates an account and its first passkey without an admin.
68 Its configured instance-wide role applies only to public repositories. Accepted
69 self-registration roles are `none`, `read`, and `contribute`; `maintain` and
70 `admin` require an explicit admin grant. Registration has no email verification.
71
72 ## Access-rule evaluation
73
74 The effective repository role is the highest of:
75
76 - the repository default role;
77 - the account's explicit repository entry;
78 - the account's instance-wide role.
79
80 Instance-wide `read`, `contribute`, and `maintain` do not open private
81 repositories. Instance-wide `admin` administers all repositories, including
82 private ones. A repository entry can raise an instance-wide role but cannot
83 lower it.
84
85 Access-rule updates use compare-and-swap. A command or browser form that read an
86 older rule version cannot overwrite a newer change. Operations that own one
87 field, such as visibility or one runner entry, reread the row and modify only
88 that field to preserve unrelated concurrent updates.
89
90 Repository visibility switches the default role between `none` and `read`
91 without changing explicit entries. Private repository paths return `404` to
92 anonymous readers so existence is not disclosed.
93
94 Every push is checked before any ref moves. Browser metadata writes use the same
95 capabilities and validators as pre-receive. These checks cover protected
96 branches, approvals, required checks, file limits, locks, metadata rules, and
97 trusted-runner membership. Privileged overrides and merges through review are
98 recorded in `data/audit.log`.
99
100 ### Protected refs and trusted runners
101
102 A protected-branch pattern is an exact ref or a prefix ending in one `*`.
103 `protect`, `runners`, and related list commands use `list`, `add`, `remove`,
104 `set`, and `clear` to inspect, change one entry, replace the list, or empty it.
105 Admins can push protected refs directly.
106
107 Admins always count as trusted runners. A non-admin must be named in the
108 repository runner allowlist for its result to satisfy a required check. Retired
109 accounts stop counting even if their names remain in stored lists.
110
111 ### Contributor metadata writes
112
113 Contributors can push only their own `refs/heads/contrib/<account>/` namespace
114 and permitted metadata records. The metadata gate accepts issues, comments, and
115 requests that the same account could create or manage in the browser. It rejects
116 other paths and authorship changes.
117
118 CI allow decisions name the exact contributor head and are stored in the CI
119 queue database. A replacement or force-pushed tip waits for another decision.
120 Allowing a tip authorizes its workflow and image build and grants declared
121 repository secrets to the job.
122
123 ## Bot capabilities
124
125 Bots have permanent account kinds as well as permanent names. They cannot
126 receive passkeys or enrollment links, sign in to the browser, or hold the
127 instance-admin role. Their names are labeled as bots in profiles and the user
128 directory.
129
130 Repository roles otherwise apply normally. A maintain bot can push shared
131 branches, trigger CI immediately, manage items permitted by its role, approve
132 another account's request, and receive declared secrets. A contribute bot is
133 limited to its own namespace and maintainer-approved CI.
134
135 A runner uses the bot's ordinary SSH key to authenticate the runner process. By
136 contrast, `acts-as:` gives a job a new credential scoped to that repository and
137 run. The per-run credential cannot perform instance administration, read secret
138 values directly, or lease work. It expires when the run ends.
139
140 Retiring a bot revokes its ordinary key and stops it leasing work. Its historical
141 issues, changes, and run records retain the bot name.
142
143 ## Profiles and privacy
144
145 The account directory and profiles are public, but repository-derived counts and
146 activity are filtered for the current reader. Two readers can therefore see
147 different totals for the same account. Private-repository activity contributes
148 nothing to a reader who cannot open that repository.
149
150 Profiles are derived from `data/index.db`, which combines Git metadata and CI
151 records; they are not additional account records in `users.db`. Keys, passkeys,
152 sessions, and instance roles are not public. An instance admin can see the role
153 because that account can already manage it.
154
155 The directory supports name search, active or retired filters, sortable columns,
156 and pagination. Filter, order, and page state lives in the URL so a link
157 reproduces the same view. Both directory and profile pages ask crawlers not to
158 index them.
159
160 `@name` links to an existing account profile in issue, comment, change-request,
161 and release Markdown. Workflow `mentioned` filters use the same syntax. Unknown
162 names and code samples are not mentions.