Skip to content

fix(coderd): require deployment-wide workspace read for WatchAllWorkspaceBuilds endpoint - #26985

Merged
cstyan merged 1 commit into
mainfrom
callum/watch-workspace-auth
Jul 6, 2026
Merged

fix(coderd): require deployment-wide workspace read for WatchAllWorkspaceBuilds endpoint#26985
cstyan merged 1 commit into
mainfrom
callum/watch-workspace-auth

Conversation

@cstyan

@cstyan cstyan commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

This PR adds an RBAC auth check to the WatchAllWorkspaceBuilds endpoint/function. Even though this endpoint is gated behind an experimental feature flag, and currently only used for scaletesting, it should still require some additional level of permissions. Currently any authenticated client can hit that endpoint and receive updates for all workspace builds for the whole deployment.

With this PRs changes the endpoint will be gated behind the deployment wide workspace read all permission, which is limited to just deployment owners and template admins. Org admins and lower would no longer be able to use this endpoint.

…kspacebuilds

The experimental /api/experimental/watch-all-workspacebuilds endpoint
streamed build events for every workspace in the deployment without any
per-item authorization. Any authenticated user could enumerate all
workspace names and observe build activity across organizations they do
not belong to.

Gate the endpoint on deployment-wide workspace read
(rbac.ResourceWorkspace.All(), granted by Owner or Template Admin) so the
firehose is only accessible to sufficiently privileged users.

Addresses SEC-A6B05AB854 / ANT-2026-22462.
@cstyan
cstyan requested a review from sreya July 6, 2026 03:24
@cstyan
cstyan merged commit bf58e8a into main Jul 6, 2026
54 of 55 checks passed
@cstyan
cstyan deleted the callum/watch-workspace-auth branch July 6, 2026 20:04
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants