Repository navigation
fix(sandbox): separate terminal access from Agent grant inventory - #356
Merged
FumingZhang merged 2 commits intoOct 29, 2026
Merged
FumingZhang merged 2 commits into
FumingZhang merged 2 commits into
Conversation
Keep exact owner-bound terminal access out of Agent grant recovery and revocation. Verify fixed binding subjects and live own-resource read roles rather than trusting a terminal label, and share the role contract with its producer. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Validate the fixed terminal subject, role and rendered workload before excluding its RoleBindings from the Agent Kubernetes grant journal and guarded writer. Preserve rejection of missing labels, changed roles, foreign ownership and absent terminal workloads. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Keep the isolated platform terminal's own access bindings separate from an Agent's policy-approved Kubernetes grants.
The local composition of #337 and #354 rejected Custom terminal workloads because the grant inventory classified terminal RoleBindings and the own-Agent reader ClusterRoleBinding as Agent Kubernetes grants. This change:
Related issue
Discovered while composing #337 and #354 for the requested acceptance run.
This PR is deliberately stacked on #337, targeting
feat/kata-kubernetes-access, rather than importing either complete feature branch into another feature PR. It does not add Custom execution to #337.Validation
Offline checks used Go 1.27.3 and the existing pinned dependencies:
In the separate local integration with #354, the original Custom terminal tests failed before this repair and passed afterward. The real local API-server terminal cases also passed for Kata/container contracts. Those tests use synthetic runtime observations and are not live VM, Cilium, CSI or interactive-terminal qualification.
Compatibility and operational impact
No CRD, dependency-version, runtime permission or timeout expansion. Existing Agent grant validation, write-ahead confirmation and cleanup remain fail-closed. The terminal retains its separate fixed authority; this does not grant model credentials or HOME access to its Pod.
The shared inventory correction was separately tested on current main. The grant-writer classification in this stacked diff depends on #337. Maintainer review is required before integration.
Checklist