Skip to content

docs(spec): 129 per-user upstream credentials (server edition) - #1945

Merged
Dumbris merged 5 commits into
mainfrom
129-per-user-upstream-credentials
Nov 20, 2026
Merged

Dumbris merged 5 commits into
mainfrom
129-per-user-upstream-credentials

Conversation

@Dumbris

@Dumbris Dumbris commented Nov 19, 2026

Copy link
Copy Markdown
Member

Spec only, no code. Server edition.

Each user's tool call carries that user's own upstream credential, so one central mcpproxy-server no longer turns every user into the same identity at the upstream. This was the Gcore request for an internal LiteLLM.

  • ${user:<slot>} in a server's header values. Each user fills their own slot through the existing encrypted credential store (Web UI, mcpproxy credential, REST).
  • auth_broker.mode: token_exchange (RFC 8693) and entra_obo. The subject token is the user's IdP access token, captured at login and purged with the session. Offline access and refresh tokens stay off, so Spec 107 FR-033's rationale holds.
  • oauth_connect with inject: true injects the stored connect-flow token, with single-flight refresh.

Design constraints:

  • It reuses the Spec 112 per-request header seam on the shared connection. The credential goes on tools/call requests only, is stripped from everything else, and is dropped on cross-origin redirects.
  • Spec 107's deleted per-(user, server) connection chain stays deleted. The FR-035 guard is amended, not removed.
  • Discovery keeps the operator's identity.
  • The read cache is bound to the credential digest.
  • Personal-edition configs reject these fields.

Origin: idea 5 of the LiteLLM MCP Gateway comparison.

Spec: specs/129-per-user-upstream-credentials/spec.md

Each user's tool call carries that user's own upstream credential: a
${user:<slot>} reference in a server header filled by the user, RFC 8693
token exchange or Entra OBO from the login, or an injected oauth_connect
token. Built on the Spec 112 per-request header seam; Spec 107's deleted
per-user connection chain stays deleted. Idea 5 of the LiteLLM MCP Gateway
comparison.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Distinct trusted credential context; redaction boundary for stored
values; one-source header construction with discovery_headers; delegation
grant bound to one session with effective expiry; https-only, no-redirect
token endpoints; Entra OBO needs an app-audience login token; generation
and broker-config fences on exchange/refresh; per-user auth failures kept
out of shared health; removed_keys.go coordination; namespaced store
records; personal edition preserves fields opaquely.
Discovery credentials only for background operations; prompts/get,
resources/read and completion refused for users in this phase; https
MCP URL with no userinfo or query; slots only in credential headers,
transport headers rejected; credential sources mutually exclusive;
cache binding covers every contributing slot; pending consent flows
fenced at initiation; Entra OBO login scopes and ID-token identity
defined; only Bearer access tokens injected; grants need a positive
expires_in.
Refuse dispatch of an uninspectable request that carries a trusted user
credential; keep Microsoft subjects stable when OBO switches identity to
ID-token claims (oid matches Graph id); make the operator when_no_user:
discovery exception explicit.
Bind the oauth_connect callback to the initiating user before the code
exchange; a mismatched principal consumes the state and stores nothing.
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown
Contributor

📦 Build Artifacts

Workflow Run: View Run
Branch: 129-per-user-upstream-credentials

Available Artifacts

  • archive-darwin-amd64 (33 MB)
  • archive-darwin-arm64 (30 MB)
  • archive-linux-amd64 (20 MB)
  • archive-linux-arm64 (18 MB)
  • archive-windows-amd64 (33 MB)
  • archive-windows-arm64 (29 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (29 MB)
  • installer-dmg-darwin-arm64 (26 MB)
  • smart-mcp-proxymcpproxy-goST8VEK.dockerbuild (0 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 44590595333 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

@Dumbris
Dumbris merged commit de1f2d6 into main Nov 20, 2026
68 checks passed
Dumbris added a commit that referenced this pull request Nov 20, 2026
`roadmap.yaml` had no epics after Spec 117. This PR adds them and
regenerates `ROADMAP.md`.

- **Shipped:** 118 auto-rescan (#1689), 118 pin visibility boundary
(#1684, #1688, #1821), 119 (#1740), 120 (#1781), 122 (#1818) and 123
(#1886, #1887, #1888, #1891).
- **In review:** 121 install surfaces (#1711). There is no `spec:` link
yet because its folder exists only on the PR branch.
- **In progress:** 124 (PR-1 #1918 done; PR-2 CLI and PR-3 Web UI to do)
and 125 (spec plus PR-1..3 done; PR-4 Web UI to do). Merged PRs are
listed as done child tasks, so `--check-github` doesn't flag a merged PR
under an in-progress epic.
- **Spec-only PRs:** 127 (#1943), 128 (#1944) and 129 (#1945).

Merge this after #1943, #1944 and #1945. Until then, `--check-github`
reports their `spec:` links as unresolved; `--check`, the pre-commit
hook, passes.

Not covered: Spec 126 (#1940, open) and the unsynced tasks.md checkboxes
for 123 and 124.
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.

2 participants