NVIDIA / NVIDIA/OpenShell

Tracking: generalize brokered credential delivery beyond inference.local and Microsoft S2S

Open
#1,755 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

state:stale
Dominant language
Rust
Stars
8.7k
Forks
1.3k
Avg merge
2d 11h
Merged PRs (30d)
253

Description

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
  1. Expose a stable internal broker surface such as credentials.local, with provider aliases only where they improve compatibility.
  2. Acquire downstream credentials through the appropriate flow: client credentials, OBO, RFC 8693 token exchange, refresh, or async consent where the IdP supports it.
  3. Cache, rotate, and revoke credentials gateway-side; never return downstream tokens to the sandbox.
  4. Inject credentials on egress only for policy-approved hosts and tools.
  5. Reject or strip sandbox-supplied Authorization headers for hosts configured as brokered, so a local shell or attacker-supplied credential cannot bypass broker policy.
  6. 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 Authorization on brokered hosts is rejected or stripped, with a structured policy error.
  • Broker decisions log agent_id, session_id, user_principal where 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.local model 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, and external refresh 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:

Checklist
  • I've reviewed existing issues and the architecture docs
  • This is a design proposal, not a "please build this" request

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Treat this as a tracking and design issue rather than an implementation task. Start with the architecture, Providers v2, and policy-schema documents, then review PR #1424 and the Entra OBO sub-issue #1754. Done requires a concrete broker architecture meeting the listed acceptance criteria, with implementation work split into the linked sub-issues.

Written by the indexing model from the issue text.

Assessment

Domain
ai-infra-agents, authentication, authorization, backend-api-design, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.