Relationships
#4875 A workspace kind in grants: a group can be given its own hosted workspaces on the root
Opened by zack · 11/18/2026· Shipped 11/18/2026
Issue 13 of the execution plan in design/surfaces/serve-workspaces.md. One PR. Depends on swamp-club#4849 (workspace requests on the root), shipped.
Problem
Only the root's admins can create, get, suspend, resume or delete a hosted workspace. The handlers check admin on access:* for every request but list (src/serve/handlers/workspace_handlers.ts). A team cannot be given its own workspaces without being made an admin of the whole root.
A caller acting through an integration or a delegation is refused even list, because its ceiling cannot name a workspace.
Change
workspace becomes a resource kind in grants, and the lifecycle requests check it.
The kind.
workspacejoinsResourceKindSchema, with a pattern that is a workspace name or a prefix ending in*(src/domain/access/resource_selector.ts). The error for an unknown kind lists it. Every table keyed by resource kind gains an entry, the condition fields included.What each request needs on the root.
Request Needs workspace.createwriteonworkspace:<name>workspace.getreadonworkspace:<name>workspace.suspend,workspace.resume,workspace.deleteadminonworkspace:<name>workspace.listany authenticated principal Root admins pass as before. With no grant naming
workspace, nothing changes for anyone.The actions keep the meaning access control already gives them. The design grants
writeandadmintogether to a group that creates, starts and removes its own workspaces. Withwritealone a group creates a workspace that an admin then starts.Ceilings. A caller acting through an integration or a delegation is held to its ceiling, which can now name a workspace. It is no longer refused outright.
Deny. A deny on
workspace:<pattern>refuses as a deny does for any other kind.access can-ianswers for the new kind.Audit is unchanged: every request, allowed or refused, is recorded with the caller and the workspace name.
Decisions this issue makes
The PR states what it chose and updates the design doc and design/enablers/access-control.md.
- What
listneeds from a ceilinged caller. Today it needs root admin. The choices are any ceiling that names a workspace, or a list filtered to the names the ceiling reaches. - A grant naming
workspaceon a serve that is not a host's root. The expected answer is that it is accepted and never checked, since that serve refuses everyworkspace.*request anyway.
Registered workspaces
The design says no grant reaches the suspend or resume of a registered workspace: only the root's admins may do that. Registered workspaces are swamp-club#4865, not built. If that issue has landed when this one is built, this PR makes the handlers refuse a grant holder who is not a root admin. If not, that issue carries the rule.
Done when
- A group granted
writeandadminonworkspace:data-*can create, resume, suspend and deletedata-x, and is refused each of those onops-x. - A group with
writealone createsdata-xand is refused its resume. - A principal with
readonworkspace:data-xcan get it and is refused its suspend. - A root admin with no
workspacegrant still makes every request. - A deny on
workspace:data-xrefuses a principal an allow would admit. - A delegated caller whose ceiling names
workspace:data-*is admitted fordata-xand refused forops-x. swamp access can-igives the same answers as the handlers.- The access suites and property tests cover the new kind.
- Each refusal is in the root's audit log.
- Tests run in-process. A test that authenticates through serve's HTTP routes as a fixed principal calls
resetRateLimitState()first.
Out of scope
- The sign-in exchange.
- The
swamp serve workspacecommands. swamp-club#4850. - Grants inside a workspace. Each workspace's own access records are untouched.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.