feat(credentials): add opt-in workspace credential sources - #549
Draft
Pal Lakatos-Toth (pallakatos) wants to merge 4 commits into
Draft
feat(credentials): add opt-in workspace credential sources#549Pal Lakatos-Toth (pallakatos) wants to merge 4 commits into
Pal Lakatos-Toth (pallakatos) wants to merge 4 commits into
Conversation
Bind supported agent channel/search collections by source UID, project only into owned namespaces, refresh and revoke consumers without silent legacy fallback, and preserve the existing direct path when unset. Add CLI lifecycle, schema, documentation, and a disposable Kind consumer gate. Independent review, live CI evidence, and genuine audit sign-offs remain pending. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: eb3654cd-f1e0-445a-8734-430800af1903
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Declare the existing optional upstream compatibility fields used by CEL so Kubernetes can install the Sandbox CRD. Keep overlay/source validation, assert referenced schema fields, require the intended live admission rejection, and stop E2E setup on Helm failure. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: eb3654cd-f1e0-445a-8734-430800af1903
The real consumer lifecycle passed but its final InferencePolicy deletion hung. Keep deletion mandatory, bound the wait and API calls, and surface safe diagnostics before the job deadline. Do not claim the underlying cleanup issue resolved. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: eb3654cd-f1e0-445a-8734-430800af1903
Replace partial server-side apply finalizer writes rejected by Kubernetes with named UID/resourceVersion-fenced metadata merges. Preserve unrelated finalizers and retain cleanup retries on non-404 profile deletion failures. Cover registration, deletion, conflicts and malformed identity through the real reconcile path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: eb3654cd-f1e0-445a-8734-430800af1903
This was referenced Sep 8, 2026
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.
Publication stack
Follows #548 and targets its namespace-ownership branch for a focused delta. Do not merge into the intermediate feature branch. After preceding slices land, retarget to the protected
kars-bridgeintegration branch and require fresh exact-head CI, genuine audit sign-offs and independent approval. Final promotion tomainremains separate.Scope
spec.credentialsRef: {name, uid}. When absent, the existing direct<sandbox>-credentialscollection remains the default.add --credential-source,credentials update --use-source,--remove,--disable-source, workspace selection, UID binding, one-time migration, schema-retention detection and controller acknowledgement.Deliberate v1 limits
This source supports the existing ten channel/search credential keys only. Arbitrary internal-system keys, raw GitHub tokens, provider credentials and process-environment overrides are not supported. Migration rejects unsupported keys rather than dropping them. Existing direct-mode flags remain available.
This is not full Bridge credential integration or Secret-RBAC closure. Bridge still needs a separate adapter, launch binding, scoped permissions and qualification; its arbitrary-key credential UI cannot simply be redirected to this limited allowlist. No Bridge permissions are removed here. Kars remains independently usable without Bridge.
Source revocation is asynchronous: Kubernetes API/node failures can delay termination, and this does not invalidate an external-provider token or erase a value already observed by an agent. Overlay-managed and unwired runtimes are not supported. These limits are documented in
docs/how-to/credential-sources.md.Hosted installation blocker and repair
The first real Kind run at
b69a6ad6exposed a missing Helm schema declaration: the new CEL rule referencedupstreamCompatibility, so Kubernetes rejected the entire Sandbox CRD. Credential-consumer execution was therefore not established. This was a real install blocker, not the separate missing-signature gate.Repair
693a46cadeclares the existing optional Rust compatibility fields, retains the source/overlay admission restriction, asserts its schema dependencies, and requires the intended rejection message in live admission coverage. Helm setup now stops immediately on failure. Automated source review of the five-file repair is closed with no significant issues found: optional/native behavior is preserved and the CEL field dependencies are declared. This is not live API qualification or human approval. The repaired head must pass actual API-server and lifecycle execution before readiness; rendering and source review alone are not sufficient.Lifecycle cleanup repair and closure
Hosted run
34161927565at693a46casuccessfully installed the CRD, enforced the intended overlay admission guard, and passed real BYO credential delivery, rotation/key removal, source-deletion revocation without fallback, and explicit opt-out. Sandbox namespace deletion completed. The subsequent InferencePolicy fixture deletion hung until the job deadline; the complete E2E gate therefore remains failed, not green.Diagnostic commit
d444656bexposed the root cause: Kubernetes rejected the partial server-side-apply finalizer-removal payload because metadata.name was missing, leaving the policy terminating after its profile ConfigMap was deleted. Repair8b206065replaces both finalizer registration/removal with complete name/namespace/UID/resourceVersion-fenced metadata merges, preserves other finalizers, and propagates non-404 ConfigMap cleanup errors before releasing cleanup authority. Fourteen targeted reconcile/HTTP cases and strict controller Clippy passed. Automated bounded review of the finalizer repair is closed with no significant issues found. This is source/test inspection, not human approval or independent live execution. The mandatory Kind gate now passes at exact head8b206065: 111 cases, zero failures, including complete policy cleanup and preservation of the core namespace. Evidence: https://github.com/Azure/kars/actions/runs/34169168508/job/101889685225 . All technical CI gates pass; the sole remaining failing check requires two genuine audit sign-offs (author and independent reviewer). No human approval is implied.Evidence and remaining gates
Current candidate:
8b206065608593667a40665b3f48225ef9ce278d, based on namespace head62093414.8b206065, including the final mandatory cleanup.b69a6ad6, with no significant issues found. Source review and in-memory CLI probes are not independent live execution, human sign-off or merge approval. Hosted lifecycle results and genuine review/signature gates remain required.docs/security-audits/2026-09-07-credential-sources.md. Genuine author and independent-reviewer signatures are pending; the audit gate must remain blocked until they exist. No identities or sign-offs are fabricated.No customer/H100 deployment, Azure infrastructure mutation, public image release, integration merge or main merge is performed by preparing this draft.