Skip to main content
← Back to list
01Issue
FeatureShippedSwamp CLIPublic
Assigneeszack

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. workspace joins ResourceKindSchema, 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.create write on workspace:<name>
    workspace.get read on workspace:<name>
    workspace.suspend, workspace.resume, workspace.delete admin on workspace:<name>
    workspace.list any 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 write and admin together to a group that creates, starts and removes its own workspaces. With write alone 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-i answers 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 list needs 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 workspace on a serve that is not a host's root. The expected answer is that it is accepted and never checked, since that serve refuses every workspace.* 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 write and admin on workspace:data-* can create, resume, suspend and delete data-x, and is refused each of those on ops-x.
  • A group with write alone creates data-x and is refused its resume.
  • A principal with read on workspace:data-x can get it and is refused its suspend.
  • A root admin with no workspace grant still makes every request.
  • A deny on workspace:data-x refuses a principal an allow would admit.
  • A delegated caller whose ceiling names workspace:data-* is admitted for data-x and refused for ops-x.
  • swamp access can-i gives 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 workspace commands. swamp-club#4850.
  • Grants inside a workspace. Each workspace's own access records are untouched.
02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 6 MOREPR_LINKED+ 2 MORESESSION_SUMMARIZED

Shipped

11/18/2026, 8:15:38 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
zack assigned zack11/18/2026, 6:48:40 PM

Sign in to post a ripple.