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.

Rewrite documentation around reader tasks

d1f44d838966c0a4762073f12375ec7562582fdf · Keenan Nemetz · 21h ago · parent 9103f6a8

docs/reference/accounts-and-access.md −173

@@ -1,173 +0,0 @@
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/instance.db` stores accounts, instance roles, SSH keys, passkeys, enrollment
16 links, browser sessions, repository access rules, file locks, and release
17 channels. SSH and passkey credentials store public keys.
18 Session and enrollment 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`, `reader`, and `contributor`; `runner`,
70 `maintainer`, and `admin` require an explicit admin grant. Registration has no
71 email verification.
72
73 ## Access-rule evaluation
74
75 The effective repository role is the highest of:
76
77 - the repository default role;
78 - the account's explicit repository entry;
79 - the account's instance-wide role.
80
81 Instance-wide `reader`, `contributor`, `runner`, and `maintainer` do not open
82 private repositories. Instance-wide `admin` administers all repositories,
83 including private ones. A repository entry can raise an instance-wide role but
84 cannot lower it.
85
86 Access-rule updates use compare-and-swap. A command or browser form that read an
87 older rule version cannot overwrite a newer change. Operations that own one
88 field, such as visibility or one role entry, reread the row and modify only
89 that field to preserve unrelated concurrent updates.
90
91 Repository visibility switches the default role between `none` and `reader`
92 without changing explicit entries. Private repository paths return `404` to
93 anonymous readers so existence is not disclosed.
94
95 Every push is checked before any ref moves. Browser metadata writes use the same
96 capabilities and validators as pre-receive. These checks cover protected
97 branches, approvals, required checks, file limits, locks, metadata rules, and
98 runner role. Privileged overrides and merges through review are
99 recorded in `data/audit.log`.
100
101 ### Protected refs and trusted runners
102
103 A protected-branch pattern is an exact ref or a prefix ending in one `*`.
104 `protect` and related commands use `list`, `add`, `remove`, `set`, and `clear` to
105 inspect, change one entry, replace the list, or empty it. Admins can push
106 protected refs directly.
107
108 The `runner` role is the CI trust decision. It is ordered between `contributor`
109 and `maintainer`, so it may lease and run jobs, have its results satisfy required
110 checks, and publish the repository's site and declared artifacts. It is above
111 `reader` and `contributor` but below shared-branch writes, triage, and approval.
112 Maintainers and admins are above it and count as runners implicitly. Retired
113 accounts stop counting even if their role entries remain.
114
115 The retired runner allowlist is read once and folded into the role: an existing
116 allowlist entry becomes `runner` unless the account already held something
117 higher. The `acl runners` commands are gone; use `acl set-role <repo> <account>
118 runner` instead.
119
120 ### Contributor metadata writes
121
122 Contributors can push only their own `refs/heads/contrib/<account>/` namespace
123 and permitted metadata records. The metadata gate accepts issues, comments, and
124 requests that the same account could create or manage in the browser. It rejects
125 other paths and authorship changes.
126
127 CI allow decisions name the exact contributor head and are stored in the CI
128 queue database. A replacement or force-pushed tip waits for another decision.
129 Allowing a tip authorizes its workflow and image build and grants declared
130 repository secrets to the job.
131
132 ## Bot capabilities
133
134 Bots have permanent account kinds as well as permanent names. They cannot
135 receive passkeys or enrollment links, sign in to the browser, or hold the
136 instance-admin role. Their names are labeled as bots in profiles and the user
137 directory.
138
139 Repository roles otherwise apply normally. A maintainer bot can push shared
140 branches, trigger CI immediately, manage items permitted by its role, approve
141 another account's request, and receive declared secrets. A runner bot can lease
142 and run jobs, report checks, and publish sites and artifacts, but cannot push a
143 shared branch or approve. A contributor bot is limited to its own namespace and
144 maintainer-approved CI.
145
146 A runner uses the bot's ordinary SSH key to authenticate the runner process. By
147 contrast, `acts-as:` gives a job a new credential scoped to that repository and
148 run. The per-run credential cannot perform instance administration, read secret
149 values directly, or lease work. It expires when the run ends.
150
151 Retiring a bot revokes its ordinary key and stops it leasing work. Its historical
152 issues, changes, and run records retain the bot name.
153
154 ## Profiles and privacy
155
156 The account directory and profiles are public, but repository-derived counts and
157 activity are filtered for the current reader. Two readers can therefore see
158 different totals for the same account. Private-repository activity contributes
159 nothing to a reader who cannot open that repository.
160
161 Profiles are derived from `data/index.db`, which combines Git metadata and CI
162 records; they are not additional account records in `instance.db`. Keys, passkeys,
163 sessions, and instance roles are not public. An instance admin can see the role
164 because that account can already manage it.
165
166 The directory supports name search, active or retired filters, sortable columns,
167 and pagination. Filter, order, and page state lives in the URL so a link
168 reproduces the same view. Both directory and profile pages ask crawlers not to
169 index them.
170
171 `@name` links to an existing account profile in issue, comment, change-request,
172 and release Markdown. Workflow `mentioned` filters use the same syntax. Unknown
173 names and code samples are not mentions.