Skip to content

feat(router): add scoped governed services and bounded telemetry - #550

Draft
Pal Lakatos-Toth (pallakatos) wants to merge 2 commits into
public/pr6-credential-sourcesfrom
public/pr7-governed-services
Draft

feat(router): add scoped governed services and bounded telemetry#550
Pal Lakatos-Toth (pallakatos) wants to merge 2 commits into
public/pr6-credential-sourcesfrom
public/pr7-governed-services

Conversation

@pallakatos

@pallakatos Pal Lakatos-Toth (pallakatos) commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Publication stack

Follows #549 and targets its credential-source branch for a focused delta. Do not merge into the intermediate feature branch. After preceding slices land, retarget to the protected kars-bridge integration branch and require fresh exact-head CI, genuine audit sign-offs and independent approval. Final promotion to main remains separate.

Scope

  • Add a bounded, UID-qualified capability-request queue with explicit request IDs, cancellation, expiry, immutable decisions, scope compare-and-swap reset and stale-request rejection.
  • Separate operator controls from agent-visible credentials: router-services-admin/control-token is mounted only in the inference router. The legacy admin token and localhost alone cannot authorize inspection, decisions or reset.
  • Project Sandbox/workspace/runtime-Namespace identity and qualified Task UID/generation/full effective authorization where applicable. Caller-supplied assignment labels are correlation, not execution proof.
  • Preserve immediate denied-egress behavior by default. Optional bounded waits resume only when both the request is approved and the existing normal egress policy allows the operation. A decision never grants network access by itself.
  • Add bounded metadata-only model/MCP/governance/proxy observations, scoped cursors, explicit missing/partial observations, and correctly classified MCP isError/transport failures. Observers must not replay accepted generations or alter provider credential routing.
  • Add narrow controller credential/identity projection and operational documentation at docs/governed-services.md.

Explicit boundaries and later integration

This is service infrastructure, not assignment delivery, runtime workers, an autonomous approval/grant broker, keyless GitHub services, managed MCP/skill/memory installation, a durable execution/receipt ledger, or aggregate task-budget enforcement. Existing unsupported finite/shared launch budgets remain rejected. Ordinary standalone Kars requires no Bridge installation.

Later task delivery must call POST /internal/access-requests/reset using the separate private service-control credential and current scope_id. Do not restore the old agent-visible-token/unscoped-reset contract. A future grant worker must compare current live Task UID, generation and full effective authorization before acting; resetting a request queue is not grant revocation.

Telemetry retains bounded identifiers/status/timing/usage, not prompts, assistant text, arguments/results, URLs, headers or credential bodies. Explicit request reasons remain bounded untrusted agent text. State is in-process and not durable billing evidence.

Remaining HIGH prerequisite — not review-ready

The legacy SRE agent can read cluster-wide Kubernetes Secrets with its mounted ServiceAccount credential, including the new operator token. Router-only mounts do not establish privacy. The operator-authorized registration/migration prerequisite is now published as draft #551, which must qualify and be integrated before this service layer: trusted UID enrollment, safe retirement of legacy grants, preserved Azure identity and pinned-image compatibility, and a real filtered Kubernetes access path. Names, labels and ownership-looking annotations are not sufficient authority. The current published candidate remains unsafe for deployment until that HIGH is closed.

The two MEDIUM findings are repaired in 11f4224d: cancellation/reset now coordinate with a dispatch claim after awaited policy checks, and accepted failed/incomplete Responses or error-plus-DONE streams no longer become completed telemetry. The claim is distinct from upstream acceptance; response bytes and no-replay behavior are preserved. Bounded source review is closed, 1,071 router unit plus 29 service integration tests passed, and strict router Clippy passed. The exact-head CI suite now passes apart from the missing genuine audit signatures, including the existing Kind smoke (https://github.com/Azure/kars/actions/runs/34185514205/job/101937153329). That suite does not cover the unresolved SRE-held Kubernetes credential path; the HIGH remains a deployment and merge blocker.

Do not mark this draft ready or merge it while the SRE prerequisite or genuine review/signature gates remain open.

Evidence and remaining gates

Current candidate: 11f4224d7c830b2c57878e356d1b4b20b13751e0, based on qualified namespace/credential stack head 8b206065.

  • Owning-agent qualification: 1,168 relevant tests passed (1,067 router unit, 24 new HTTP/lifecycle/telemetry integration, 73 existing guardrail/provider integration, four controller projection cases), plus strict affected-crate Clippy and formatting.
  • Committed-diff LOC/no-stub/crypto/copyright guards passed. No dependency changes or installations were introduced.
  • The existing disposable Kind harness now covers the real mounted credential boundary, rejection of the legacy token on privileged routes, live Sandbox/Namespace UID attribution, decisions/reset and stale scopes. It uses private credentials through curl stdin rather than arguments/logs and cleans up its local port-forward. Hosted execution passed at ab3a9a7c (112 cases, zero failures; https://github.com/Azure/kars/actions/runs/34179155035/job/101919697541 ). This initial smoke covers mounts, simple credential rejection and scope reset, but does not test SRE-held Kubernetes authority, the cancellation interleaving or accepted semantic model errors. That initial-head CI result does not close the HIGH SRE authority issue; the two MEDIUM repairs have separate evidence above. The genuine-signature gate also remains blocked.
  • Independent review found the three blockers above; closure and public exact-head CI remain pending. Local/source-level evidence does not constitute live or human approval.
  • Capability audit: docs/security-audits/2026-09-08-governed-router-services.md. Two genuine author/independent-reviewer sign-offs remain pending; the audit gate must not be bypassed or satisfied with fabricated identities.

No customer/H100 deployment, Azure mutation, public image release, integration merge or main merge is performed by preparing this draft.

Add separately authenticated operator controls, UID-qualified request scopes, bounded cancellation and policy-gated waits, metadata-only observations, and narrow router-only credential projection. Preserve existing policy enforcement and provider behavior. Add real Kind authentication/mount/reset coverage; independent review, hosted qualification and genuine audit sign-offs remain pending.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: eb3654cd-f1e0-445a-8734-430800af1903
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Coordinate dispatch claims with cancellation/reset after awaited policy checks and retain claims through response handling. Distinguish accepted Responses/OpenAI semantic errors from completed generations without replay or byte changes. Keep the separate HIGH SRE credential-privacy prerequisite explicitly blocked.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: eb3654cd-f1e0-445a-8734-430800af1903
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant