You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracks workstream 2 from #6831: moving upstream credentials from session ownership to user ownership, designed once in an RFC in stacklok/rfcs with @hellouz818, then split into implementation issues. The first step, user-keyed storage for Go embedders, is "User-keyed upstream storage behind the embedder option" (#7263); runner-built storage is "Re-authorization walks the full upstream chain instead of evaluating existing credentials" (#6831).
The RFC decides:
the row key and who owns a row;
account binding at write time (one upstream subject per user and provider);
client scope: credentials shared across a user's clients, ClientID records provenance only;
explicit reconnect and replace;
deletion and revocation of shared rows (revoking one client or all of a user's sessions does not delete shared upstream rows);
load scoping for shared rows: once two authorization servers read the same rows, or a central one holds connections for many resources, each server's bulk load reads only the providers that server is configured for, taken from its own upstream list (not from the resource's backend config);
per-user storage of the company-IdP refresh token used for the re-check at ID-JAG issuance;
Delegated requirements it carries: the delegated-access marker (#6404), the ownership-checked read (#6407). Per-client access is decided at redemption by the gateway's own authorization server, not in storage.
Compatibility constraint: an existing implementation already keys rows by (gateway, user, provider) behind the current storage interface. The read interface in #6407 must stay implementable by such a backend, so the RFC should not require a row key, owner check, account-replacement rule or refresh coordination that a (gateway, user, provider) store cannot meet. Rows are keyed by user; this RFC records that design and its lifecycle.
Sub-issue: #4279 (Redis encoding waits for the key shape). Designed here, nested under #6406: #6403, #6404, #6407. The RFC pull request is linked here when opened.
I added "load scoping for shared rows" to the list above, so it isn't lost.
While building user-keyed storage we tried limiting the interactive bulk load to the providers a resource's backends use, as a guard against a stolen interactive token or a once-approved client pulling in every connection the user has. With one authorization server it isn't needed, because rows are already scoped to that server's upstreams by its key prefix, so it was dropped from "User-keyed upstream storage behind the embedder option" (#7263).
It matters again once rows are shared between authorization servers or held by a central one. The set should then come from the server's own upstream list rather than from vMCP backend config, which turned out fragile. The reader option from that work (upstreamtoken.WithProviders) can be reused. The stolen-token and approved-once-client case itself is a client-scope question, not something a load filter answers.
One more thing to settle under client scope: whether connections should stay shared across all of a user's clients (the current line above, with ClientID as provenance only), or whether a client's first use of a connection should need the user's consent.
A possible mechanism for the second is a URL elicitation when a client first uses one of the user's connections, stored per (user, client, provider). It would be the same mechanism as the connect link in "vMCP: answer a call for an unconnected provider with a URL elicitation carrying the connect link" (#7188), with a consent page instead of a connect page. Some constraints:
it only helps against a stolen token if approving needs the user's identity-provider sign-in on the authorization server's origin, so whoever holds the token can't just click approve;
it's for the interactive route and clients a person drives; delegated agents keep getting approval at the issuing authorization server and often have no person present to answer;
clients without URL-mode elicitation would need a refusal that carries the link.
This is the real answer to the stolen-token and approved-once-client concern that the dropped load filter was meant to address. It's not needed for the current delegated-access work, so I'm only recording it as an open question for the RFC.
Activity
jhrozek commentedon Nov 26, 2026
I added "load scoping for shared rows" to the list above, so it isn't lost.
While building user-keyed storage we tried limiting the interactive bulk load to the providers a resource's backends use, as a guard against a stolen interactive token or a once-approved client pulling in every connection the user has. With one authorization server it isn't needed, because rows are already scoped to that server's upstreams by its key prefix, so it was dropped from "User-keyed upstream storage behind the embedder option" (#7263).
It matters again once rows are shared between authorization servers or held by a central one. The set should then come from the server's own upstream list rather than from vMCP backend config, which turned out fragile. The reader option from that work (
upstreamtoken.WithProviders) can be reused. The stolen-token and approved-once-client case itself is a client-scope question, not something a load filter answers.jhrozek commentedon Nov 26, 2026
One more thing to settle under client scope: whether connections should stay shared across all of a user's clients (the current line above, with
ClientIDas provenance only), or whether a client's first use of a connection should need the user's consent.A possible mechanism for the second is a URL elicitation when a client first uses one of the user's connections, stored per (user, client, provider). It would be the same mechanism as the connect link in "vMCP: answer a call for an unconnected provider with a URL elicitation carrying the connect link" (#7188), with a consent page instead of a connect page. Some constraints:
This is the real answer to the stolen-token and approved-once-client concern that the dropped load filter was meant to address. It's not needed for the current delegated-access work, so I'm only recording it as an open question for the RFC.