Tracking: generalize brokered credential delivery beyond inference.local and Microsoft S2S
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 28/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
调研方向
将其视为跟踪和设计 issue,而不是实现任务。先从 architecture、Providers v2 和 policy-schema 文档开始,然后审查 PR #1424 和 Entra OBO 子 issue #1754。完成的要求是制定出符合所列验收标准的具体 broker architecture,并将实现工作拆分到已链接的子 issue 中。
由索引模型根据 Issue 内容生成。
描述
Problem Statement
OpenShell has a strong broker pattern for LLM provider credentials through inference.local, and PR #1424 adds a concrete Microsoft S2S step. The same pattern should become a general credential-delivery architecture for IdP-issued dynamic tokens, downstream API tokens, refresh token custody, and consent-driven flows.
Proposed Design
- Expose a stable internal broker surface such as
credentials.local, with provider aliases only where they improve compatibility. - Acquire downstream credentials through the appropriate flow: client credentials, OBO, RFC 8693 token exchange, refresh, or async consent where the IdP supports it.
- Cache, rotate, and revoke credentials gateway-side; never return downstream tokens to the sandbox.
- Inject credentials on egress only for policy-approved hosts and tools.
- Reject or strip sandbox-supplied
Authorizationheaders for hosts configured as brokered, so a local shell or attacker-supplied credential cannot bypass broker policy. - Key broker decisions on attested workload identity where available. Treat DPoP or mTLS proof-of-possession as provider-scoped enhancements, not universal acceptance criteria.
Acceptance criteria:
- At least one non-LLM downstream API can be called without token material readable from inside the sandbox.
- Credential rotation completes without sandbox restart.
- Gateway-side revocation blocks subsequent use within one policy reload or documented revocation interval.
- Sandbox-supplied
Authorizationon brokered hosts is rejected or stripped, with a structured policy error. - Broker decisions log
agent_id,session_id,user_principalwhere applicable, tool/binary identity, requested scope/resource, granted scope/resource, decision, and correlation ID.
Sub-issues:
- #1754 Entra OBO token acquisition
- #1756 Scope attenuation for broker-issued downstream tokens
- #1757 Async user-consent broker for always-on agents
- #1758 OpenTelemetry trace correlation across gateway activity
Alternatives Considered
- Continue adding one provider-specific shim at a time: fastest locally, but risks uneven semantics and audit gaps.
- Rely only on network allowlists: controls destination, but not token scope, issuer, custody, or attribution.
- Let every tool manage its own credential cache: compatible, but puts credential material back into the sandbox trust boundary.
Agent Investigation
Problem. OpenShell has a strong broker pattern for LLM provider credentials through inference.local, and PR #1424 adds a concrete Microsoft S2S step. The same pattern should become a general credential-delivery architecture for IdP-issued dynamic tokens, downstream API tokens, refresh token custody, and consent-driven flows. This is a tracking/design issue. The most concrete sub-issue (Entra OBO) should be filed first and linked here.
Investigation:
- The
inference.localmodel already proves credential brokering works at the gateway: sandbox-supplied credentials are stripped, backend credentials are injected at the proxy, and the agent never sees the upstream secret. This issue asks for that pattern to become a general delivery architecture. - PR #1424 (
microsoft-agent-s2s) is the second concrete instance of the pattern — confirming the broker extends from LLM keys to dynamic IdP-issued app tokens. - Providers v2 supports
oauth2_client_credentials,oauth2_refresh_token,google_service_account_jwt,static, andexternalrefresh strategies today. All are machine-credential or pre-acquired-token shaped; none initiate user-context exchange (OBO) or async user consent (CIBA). - The Providers v2 Roadmap explicitly lists "Automatic credential scope extraction" and "Refresh telemetry as OCSF events" as future work, directly motivating the scope-attenuation and OTel-correlation sub-issues.
- Current Providers v2 credential delivery still uses environment-variable placeholders resolved at the proxy. Acceptable for app S2S; insufficient for user-context tokens, which must not be readable from inside the sandbox under any path. A non-env-var delivery contract is part of the ask.
Current Documented Capability Map:
| Credential capability | Current documented state | Requested change |
|---|---|---|
| LLM provider keys | Brokered through inference.local; sandbox credentials are stripped and backend credentials are injected at the gateway. |
Use this as the reference broker pattern. |
| Providers v2 service-account / client-credential profiles | Profile and policy composition with credential placeholders and runtime/provider integration. | Clarify and extend into a general broker model where tokens do not enter the sandbox. |
| Microsoft S2S | Draft PR #1424 adds Microsoft Agent S2S support. | Keep S2S as the first Microsoft provider step. |
| Entra OBO / user principal | Not covered by PR #1424 and not documented as brokered downstream access. | Add through the Entra OBO sub-issue (#1754 ). |
| Downstream API tokens: Graph, GitHub, Slack, Jira, Telegram | Tools can require credentials or app-specific tokens outside the inference.local path. |
Broker and inject tokens for configured hosts/tools; reject sandbox-supplied Authorization for brokered hosts. |
| Refresh token custody | Not documented as a gateway custody feature for downstream user/API tokens. | Keep refresh material gateway-side with rotation and revocation. |
| Async user consent | No documented user-scoped async consent broker. | Add through the async consent sub-issue (#1757 ). |
| OTel trace correlation | OCSF JSON export exists; OTel trace export is not documented. | Add through the OTel tracing sub-issue (#1758 ). |
References:
- OpenShell architecture /
inference.local: https://docs.nvidia.com/openshell/about/architecture - OpenShell Providers v2: https://docs.nvidia.com/openshell/sandboxes/providers-v2
- OpenShell policy schema: https://docs.nvidia.com/openshell/reference/policy-schema
- OpenShell PR #1424: https://github.com/NVIDIA/OpenShell/pull/1424
- RFC 8693 (OAuth 2.0 Token Exchange): https://datatracker.ietf.org/doc/html/rfc8693
Checklist
- I've reviewed existing issues and the architecture docs
- This is a design proposal, not a "please build this" request
- 主要语言
- Rust
- 星标
- 8.7k
- 派生
- 1.3k
- 平均合并
- 2 天 7 小时
- 30 天内合并 PR
- 243
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NVIDIA/OpenShell 的其他 Issue
-
area:docs
难度 1/5 1 小时以内 新手友好度 88/100
-
state:triage-needed
难度 2/5 1-3 小时 新手友好度 82/100
-
area:cli state:validated
难度 2/5 1-3 小时 新手友好度 72/100
-
state:triage-needed
难度 1/5 1 小时以内 新手友好度 90/100
-
area:build spike state:review-ready state:stale
难度 2/5 半天 新手友好度 68/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 1/5 1 小时以内 新手友好度 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
难度 2/5 1-3 小时 新手友好度 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
难度 2/5 1-3 小时 新手友好度 68/100