Repository navigation
feat: allow scoped access to isolated session workers - #177207
Draft
vincentkoc wants to merge 2 commits into
Draft
vincentkoc wants to merge 2 commits into
vincentkoc wants to merge 2 commits into
Conversation
Add explicit operator.workers admission for attached worker create, execution, process management, and teardown while preserving session policy, live authority, and dedicated allocation fences. Keep raw environment administration restricted and document grants and reconnect requirements. Fixes #177204
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Contributor
|
Codex review: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
This branch has not been deployed
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.
Fixes #177204
What Problem This Solves
Shared-session collaborators currently need gateway-wide administrator access to create, use, and stop an isolated Crabbox worker.
User Impact
Operators can grant
operator.workersfor the attached-worker lifecycle through existing role definitions and verified GitHub-login mappings. The scope must be present in both the role ceiling and the connection's authenticated scopes; existing identity grants can supply it after reconnect. Ordinary guest and writer permissions stay unchanged.Providers explicitly opt in eligible isolated targets for delegated access. Crabbox permits AWS, Azure, Daytona, GCP, Hetzner, and Machine0 targets. Administrator behavior, global allocation metadata, sandbox policy, and existing cleanup semantics remain unchanged.
Why This Change Was Made
Delegated callers use current participation, agent and sandbox policy, tool policy, approvals, and revocation checks. A synchronous provider-owned eligibility hook checks the frozen target before delegated effects; active operations also require current dedicated-lease authority. Raw environment administration and dispatch remain administrator-only.
Teardown keeps its existing owner and serialized provider operations. This revision removes the earlier detached allocation lookup and global backend reclassification. The complete change is production +239/-33, tests +649/-16, and docs +65; the production growth implements the scoped permission and its lifecycle boundaries.
Evidence
git diff --checkpassed.Focused validation scope
Gateway method scopes and role schema; session caller authority and identity-grant reconnect/revocation; plugin dispatch and managed provider lifetime; session execution/attachment lifecycle; Crabbox tool/provider contracts; session portal targets; existing provider allocation cleanup and provisioning replay tests that protect serialized provision → resolve → destroy ordering.