feat(workspace): add workspace resource model with scoping, membershi…#2243
Draft
derekwaynecarr wants to merge 2 commits into
Draft
feat(workspace): add workspace resource model with scoping, membershi…#2243derekwaynecarr wants to merge 2 commits into
derekwaynecarr wants to merge 2 commits into
Conversation
2468c04 to
77ef1fc
Compare
Thread workspace through compute drivers (Docker, Podman, K8s) with
converged container naming (openshell-{workspace}--{name}-{id}),
workspace labels, and label-based lookup. Fix sandbox-side policy sync
to use learned workspace instead of hardcoding empty string. Fix TUI
all-workspaces view to use per-row workspace for sandbox actions. Add
provider profile to workspace deletion blocking check. Thread workspace
through SSH config generation with workspace-qualified host aliases.
Signed-off-by: Derek Carr <decarr@redhat.com>
Add workspace as a required parameter for resource-scoped operations (create, get, delete, wait_ready, wait_deleted) and optional for list operations that support all_workspaces global lookup. Rename ClusterInferenceConfig to InferenceRouteConfig and set_cluster/get_cluster to set_route/get_route to match the renamed proto RPCs. Signed-off-by: Derek Carr <decarr@redhat.com>
77ef1fc to
7bba756
Compare
sjenning
reviewed
Jul 14, 2026
| for (object_type, label) in [ | ||
| (Sandbox::object_type(), "sandbox"), | ||
| (Provider::object_type(), "provider"), | ||
| (StoredProviderProfile::object_type(), "provider profile"), |
Contributor
There was a problem hiding this comment.
From CodeRabbit review:
Include SSH sessions in workspace deletion blockers.
ObjectWorkspace for SshSession marks sessions as workspace-scoped, but deletion does not check SshSession::object_type(). A workspace can therefore be removed while session records still reference it.
for (object_type, label) in [
(Sandbox::object_type(), "sandbox"),
(Provider::object_type(), "provider"),
+ (SshSession::object_type(), "SSH session"),
(ServiceEndpoint::object_type(), "service"),
(InferenceRoute::object_type(), "inference route"),
] {
| &self, | ||
| request: Request<ListWorkspacesRequest>, | ||
| ) -> Result<Response<ListWorkspacesResponse>, Status> { | ||
| workspace::handle_list_workspaces(&self.state, request).await |
Contributor
There was a problem hiding this comment.
From CodeRabbit review:
Enforce target-workspace membership on read RPCs.
The static workspace:read/user check does not bind authorization to request.workspace or request.name. Any user holding that scope can enumerate workspaces and list another workspace’s member subjects. Add workspace-specific membership authorization before delegating to these handlers.
Also applies to: 728-733
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Phase 1 of RFC 0011 — the workspace and membership model that provides hard isolation boundaries for multi-player OpenShell deployments.
from context
method for infrastructure operations (reconciler, resume, provider refresh)
principal for bundle resolution; thread --workspace through CLI inference commands
CRUD and membership subcommands; inference help text updated from "gateway-level" to "workspace-level"
Related Issue
#1977
Changes
workspace fields on set/get request/response messages
Testing
Known remaining work