feat/947 sandbox repo credential - #968
Merged
Merged
Conversation
Mint run-bound repository credentials from immutable snapshots and provide them only to approved sandbox git or gh commands. Revoke credentials on release and orphan cleanup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Launch credential-bearing git and gh commands directly, retain failed revocations for retry, and require approval for sensitive gh credential commands. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Restrict credential-bearing Git to a child-free command and retry failed token revocations after claim cleanup. Refs #947 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Use the canonical destructive command list when sandbox YAML omits it, while preserving explicit policy overrides. Refs #947 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Refs #947 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Refs #947 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
Reconcile each API replica's local credential registry with shared run and SandboxClaim state so releases and orphan cleanup on another replica trigger local revocation retries. Refs #947 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
LaunchAgentHostPodAsync derived its own authoritative AgentHost SandboxClaim name but never wrote it back to the run store, so kata-exec-sidecar AgentHost runs always had Run.SandboxClaimName unset. RunRepositoryCredentialLiveness only checks claim liveness when that field is populated, so a replica that minted a repository credential for an AgentHost run could never learn another replica had deleted its claim, and the credential was never revoked. Persist the claim name (and the real kata-exec-sidecar backend, now a shared ExecutorBackendName constant instead of an inferred label) from inside LaunchAgentHostPodAsync itself, immediately after the claim is created or reclaimed and before any repository credential can be minted. The write uses SetSandboxInfoAsync's existing non-destructive partial-update semantics, and the deterministic claim-name derivation means restart/reclaim always restores the same name. Replace the prior unit test's manual SandboxClaimName injection with an integration-style test that drives the real LaunchAgentHostPodAsync claim lifecycle against a fake cluster, asserts production code (not test setup) persisted the claim, then simulates a second replica deleting that claim and proves the first replica revokes its local token. Refs #947 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f94bc67-d29d-4d47-a8f7-5d99540c4b42
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.
Stack created with GitHub Stacks CLI • Give Feedback 💬