Repository navigation
Let admins list and inspect workspaces, audited #1026
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3756778
3ac3901
25e2db2
4efa536
9ed4581
f46a0cc
1e6ac2e
3986cc6
9c38578
6426acb
584d939
dc723be
7787e47
de70462
07ef303
6dfc1ba
baa55fe
77a6d96
38458a1
a362fec
a53f117
28a6ab6
12771b3
7d3af00
a8da002
0b97d63
b3c2ef3
5c281ab
27434f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -107,6 +107,48 @@ The check works as follows: | |||||||||||||
| sharing graph (`computeEffectiveAccess`), and for a gadget, whether their access includes a | ||||||||||||||
| gadget that reaches it -- never off whether they currently have it open. | ||||||||||||||
|
|
||||||||||||||
| ### Admin access: a deliberate exception | ||||||||||||||
|
|
||||||||||||||
| A deployment admin (a user the backend's `ADMINS` variable lists) can inspect a workspace through | ||||||||||||||
| `AdminApi.inspectWorkspace()` without being verified against its gatekeepers and without being | ||||||||||||||
| seen by its members: `OverseerDurableObject.openForAdmin()` skips `authorizeCollaborator()` and | ||||||||||||||
| observer verification by explicit policy, and the admin is never registered as an observer. So | ||||||||||||||
| `excludeObservers` never names an admin, and no observation is blocked on an admin's account. | ||||||||||||||
|
|
||||||||||||||
| The exception is bounded. Restricted data (chat messages and attachments, file contents, commit | ||||||||||||||
| messages, the argument summaries of queued agent calls, the descriptions and fields of actions, | ||||||||||||||
| observations and hooks, and blueprint ids; see | ||||||||||||||
| [What a call exposed](admin-access.md#what-a-call-exposed) for each call) is visible only at the | ||||||||||||||
| `"full"` access level, which only a deployment config change permits and which an inspection must | ||||||||||||||
| ask for: `ADMIN_WORKSPACE_ACCESS_MAX` caps the level, `metadata` by default, and fails closed to | ||||||||||||||
| `off` for any value that is not a level. Titles, names, notes and blueprint descriptions stay | ||||||||||||||
| visible at `"metadata"`, and can echo content. | ||||||||||||||
|
|
||||||||||||||
| What a connection supplied is read only as the workspace stores it, and the connection is never | ||||||||||||||
| asked. That includes a repository: a worktree can be a checkout through a connection, and the view | ||||||||||||||
| reads any commit the workspace stores. So an admin never verified against that connection sees, at | ||||||||||||||
| `"metadata"`, the repository's file names, commit ids, authors and times, and the paths that | ||||||||||||||
| differ between two of its commits; and at `"full"` its files and commit messages, as far as the | ||||||||||||||
| workspace pulled them, from the workspace's copy. `"metadata"` also shows each attachment's name, | ||||||||||||||
| type, size and `oid` (a hash of its bytes, which `listChatAttachments()` returns), and which | ||||||||||||||
| collaborators hold an observer record, with the id of the account each chose for each connection; | ||||||||||||||
| the account itself is in the collaborator's own user account and is not read. | ||||||||||||||
|
|
||||||||||||||
| The compensating controls are: | ||||||||||||||
|
|
||||||||||||||
| - the admin list and the access cap are environment variables, out of reach of an admin session; | ||||||||||||||
| - every inspection takes a reason, recorded with every call made through the view; | ||||||||||||||
| - an inspection gets `"metadata"` unless it asks for `"full"` and the deployment allows it, so | ||||||||||||||
| reading content is a separate, recorded step with its own reason; | ||||||||||||||
| - a view expires (15 minutes by default, an hour at most); | ||||||||||||||
| - every call re-checks that the view is live and its admin still an admin; | ||||||||||||||
| - every call is recorded, with whether its answer held content, before anything it read leaves the | ||||||||||||||
| server, in the deployment-wide audit log (nothing is written to the workspace); a call whose | ||||||||||||||
| record cannot be written fails, returning nothing; | ||||||||||||||
|
Comment on lines
+145
to
+147
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. docs/observers.md says inspection records are also written in the workspace. They go only to the deployment-wide audit log (contradicted by docs/admin-access.md:326). This bullet lists the compensating controls for admin inspection. It says each call is recorded "in the workspace (apart from its action log)". The view writes nothing to the inspected workspace: records go only to the deployment-wide audit log, as
Suggested change
|
||||||||||||||
| - `ADMIN_AUDIT_RETENTION_MIN_DAYS` sets a floor on how long those records are kept. | ||||||||||||||
|
|
||||||||||||||
| [admin-access.md](admin-access.md) is the design record. | ||||||||||||||
|
|
||||||||||||||
| --- | ||||||||||||||
|
|
||||||||||||||
| ## 2. Background: relevant existing code | ||||||||||||||
|
|
||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.