Repository navigation
Per-user credential isolation within a shared workspace (user-scoped providers, or interceptable exec as a minimal alternative) #6193
flo0791
started this conversation in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
On a shared gateway, I'd like team members to use personal credentials (Jira/Confluence PATs, GitHub fine-grained PATs) inside a shared team workspace without other members being able to use them.
Today this isn't possible: providers belong to the workspace, every member can attach any provider, and every member can exec into any sandbox. I'd like to propose either user-scoped providers (full solution) or making exec interceptable (minimal change that lets operators enforce ownership with a gateway interceptor).
Context: RFC 0011
I understand this is a deliberate design choice. RFC 0011 (multi-player design) treats the workspace as the credential isolation boundary and states that, within a workspace, all members share the same trust domain and the same provider credentials, so restricting sandbox access by owner brings no security benefit. Per-user credential isolation is meant to be achieved by giving each user their own workspace.
I'd like to challenge that assumption for personal credentials:
Use case
We run a shared OpenShell gateway (0.1.10) with OIDC login via Keycloak (federated with our corporate Active Directory). Team members create sandboxes and work with agents that need Jira, Confluence and GitHub access through their personal accounts.
The placeholder-based credential injection works well: the agent never sees the real token, and the proxy only resolves it for bound endpoints. The gap is purely about who may use a credential, not who can read it.
Current workaround
One workspace per user, with each user as Workspace Admin of their own workspace. It works, but:
Proposal A (full solution): user-scoped providers
An optional user scope for providers, for example:
Suggested semantics:
subjectthat created it.Restricting owner-only access to sandboxes that carry user-scoped providers keeps the RFC 0011 model ("all members can access all sandboxes") intact for everything else.
Proposal B (minimal alternative): make exec interceptable
Gateway interceptors in 0.1.10 already receive the authenticated principal and can validate
CreateSandbox,AttachSandboxProvider,CreateSshSessionand the provider mutation RPCs. With that, an operator can already:ownerlabel on sandboxes at creation (modify_operationonCreateSandbox),validateonAttachSandboxProvider),validateonCreateSshSession).The remaining gap is exec:
ExecSandboxandExecSandboxInteractiveare streaming RPCs and therefore not interceptable, so any workspace member can still exec into the owner's sandbox and use the attached credentials.Proposal B would close that gap with two smaller changes:
validatehook forExecSandboxandExecSandboxInteractive, evaluated once on the initial request before the stream starts.current_stateinvalidatewith the target sandbox (at least its labels) for sandbox-scoped RPCs, so interceptors don't need a separate lookup or shadow registry.This would let operators enforce sandbox ownership for their deployments without changing the core authorization model.
Related
Environment
All reactions