Repository navigation
agentHost: add opt-in local credential delegation for Mission Control - #340387
Merged
Merged
Conversation
Allow an unregistered local-user opt-in in real builds to delegate the desktop credential for the exact Copilot protected resource. Validate remote and local owners, preserve MCP/repository authentication, and fence mode changes, rotation and withdrawal. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Credential delegation crosses a sensitive security boundary, and packaged-product/mobile inference remains unvalidated.
0 open findings
What changed in this PR
Adds an opt-in Mission Control path that delegates same-owner Copilot authentication to the desktop GitHub credential while preserving remote credential validation.
Changes:
- Adds the unregistered local-only opt-in and propagates it through Agent Host configuration.
- Validates both remote and desktop credentials and fences credential/mode changes.
- Adds security documentation and extensive authentication/lifecycle tests.
| File | Description |
|---|---|
src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHost.contribution.ts |
Reads the opt-in and configures delegation. |
src/vs/workbench/contrib/chat/test/browser/remoteAgentHost/missionControlContribution.test.ts |
Tests setting scope and reconfiguration. |
src/vs/platform/agentHost/common/agentService.ts |
Extends Mission Control options. |
src/vs/platform/agentHost/node/missionControl/missionControlEnvironment.ts |
Propagates mode and credential changes. |
src/vs/platform/agentHost/node/missionControl/missionControlAuthentication.ts |
Validates and substitutes the local credential. |
src/vs/platform/agentHost/node/missionControl/MISSION_CONTROL.md |
Documents operation and risks. |
src/vs/platform/agentHost/node/missionControl/MISSION_CONTROL_SECURITY_REQUIREMENTS.md |
Records the security exception. |
src/vs/platform/agentHost/test/node/missionControlAuthentication.test.ts |
Covers credential validation and fencing. |
src/vs/platform/agentHost/test/node/missionControlProtocolServer.test.ts |
Covers lane lifecycle and mode changes. |
src/vs/platform/agentHost/test/node/protocolServerHandler.test.ts |
Verifies internal-only forwarding. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
roblourens
marked this pull request as ready for review
October 7, 2026 23:07
roblourens
enabled auto-merge (squash)
October 7, 2026 23:07
Co-authored-by: Copilot <[email protected]>
Contributor
Vritant Bhardwaj (vritant24)
approved these changes
Oct 8, 2026
Ross Wollman (rwoll)
approved these changes
Oct 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.
Summary
Add an explicit host-owner opt-in to use the desktop GitHub credential for Copilot authentication from Mission Control clients.
The dedicated iOS GitHub App credential currently receives only legacy, picker-disabled models from CAPI in the observed reproduction. That yields an empty Copilot model catalogue and blocks useful mobile testing. This override permits testing with the owner's already-working desktop credential without changing the normal client-token path.
Security Boundary
This is an intentional testing exception to the normal user-local credential sponsorship/control-plane separation contract, not a transparent credential fallback or a managed-sandbox principal.
Remote work can use the desktop credential's broader GitHub permissions. Providers sharing the Copilot protected resource can receive it, and SDK agent work may use it beyond inference. Existing remote-control policy, workspace grants, and tool permissions remain in force. The shared provider credential store's retention/sponsorship limitations are unchanged.
The host logs a warning when the override is enabled, and the operation/security docs describe the exception. No new setting schema, enterprise policy, or remote configuration surface is added.
This PR does not include the separate local relay-tracing/model diagnostics or the iOS model-picker fix tracked in github/mobile-ios#26865.
Validation
npm run build-fast -- --client-only— passed for this standalone PR.npm run typecheck-client— passed.npm run eslint -- src/vs/platform/agentHost/common/agentService.ts src/vs/platform/agentHost/node/missionControl/missionControlAuthentication.ts src/vs/platform/agentHost/node/missionControl/missionControlEnvironment.ts src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHost.contribution.ts src/vs/platform/agentHost/test/node/missionControlAuthentication.test.ts src/vs/platform/agentHost/test/node/missionControlProtocolServer.test.ts src/vs/platform/agentHost/test/node/protocolServerHandler.test.ts src/vs/workbench/contrib/chat/test/browser/remoteAgentHost/missionControlContribution.test.ts— passed../scripts/test.sh --reporter dot --run src/vs/platform/agentHost/test/node/missionControlAuthentication.test.ts --run src/vs/platform/agentHost/test/node/missionControlProtocolServer.test.ts --run src/vs/platform/agentHost/test/node/missionControlHost.test.ts --run src/vs/workbench/contrib/chat/test/browser/remoteAgentHost/missionControlContribution.test.ts --run src/vs/platform/agentHost/test/node/protocolServerHandler.test.ts --grep 'Mission Control|relay|Relay|negotiates 0.9.0'— 153 tests passed.git diff --check— passed.Coverage includes default behavior, both sealing algorithms, local-only configuration in Insiders, owner checks, missing/rejected credentials, unchanged repository/MCP tokens, binding, local-token rotation, in-flight mode changes, withdrawal, and internal-only protocol-handler forwarding.
A prior full development build with the workaround was launched successfully; local delegation was enabled and Mission Control reported the environment online. Successful mobile inference with the override and packaged-product validation have not been confirmed.
Manual Testing
falseor remove it, reconnect, and verify normal client credentials are restored.(Written by Copilot)