github / github/copilot-sdk

Feature Request: user-delegated authentication for MCP servers and external resources

未关闭
#2,683 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Java
星标
10.5k
派生
1.5k
平均合并
1 天 14 小时
30 天内合并 PR
129

描述

## Problem

When a session is started on behalf of a user by a host application or an automated entry point, it runs under an application identity rather than the requesting user's identity. Any MCP server or external system that enforces per-user authorization therefore either denies the request or, worse, operates with broader permissions than the requesting user actually holds.

The available alternative is to configure long-lived static credentials centrally. That is unattractive for security review, does not reflect the requesting user's permissions, and is often not configurable by the teams that need it, because it requires organization-level administrative rights.

## What is missing

- No supported model for delegated, least-privilege access on behalf of a requesting user.
- No distinction between user-delegated mode and workload-identity mode for unattended operation.
- No visibility into which identity and permission scope a given tool call used.
- Static credential configuration is only available to organization administrators, which blocks teams that cannot obtain those rights.

## Proposed behavior

- A session can be created with a user-delegated credential, so MCP servers and external resources see the requesting user's effective permissions.
- A workload identity mode remains available for unattended operation where user delegation is inappropriate.
- Administrators can centrally approve MCP servers and policies, while individual sessions still obtain per-user authorization within those bounds.
- The session exposes, per tool call, which identity and scope were used, so access is auditable.
- Credentials never appear in prompts, model context, or serialized session state.

## Example scenario

A session needs to read a work-tracking system and an internal data source, both of which authorize per user. The requesting user consents once; the session then acts within exactly that user's permissions and no further.

## Acceptance criteria

- A documented authentication model covers both user-delegated and workload-identity modes.
- Least-privilege scopes are supported and enforced.
- Identity and scope for each external call are observable by the caller.

## Related

- #1002 — OAuth support for HTTP-based MCP servers.
- #2492 — refreshing MCP authentication headers during a session.
- #182 — user-delegated billing for third-party applications.

贡献指南

打开贡献指南

调研方向

首先查看相关 issue #1002、#2492 和 #182,以了解现有的身份验证、会话和委托访问上下文。完成的标准是:记录用户委托模式和工作负载身份模式,执行最小权限 scopes,并使每次外部调用的 identity 和 scope 都可观测,同时不在 prompt 或序列化的会话状态中暴露凭据。

由索引模型根据 Issue 内容生成。

评估

领域
api, authentication, authorization, security
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
活跃
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。