feat: delegated identity providers and accelerated IdP flow#423
Open
feat: delegated identity providers and accelerated IdP flow#423
Conversation
Adds delegated authentication to the identity linking capability so businesses can outsource user authentication to trusted external IdPs and let platforms chain identity to new businesses without a fresh browser-based OAuth flow. Schema (source/schemas/common/identity_linking.json): * New `provider` $def: `auth_url` (URI, required) + `type` discriminator (default `oauth2`, reserved for future non-OAuth mechanisms like wallet attestation). * New `config.providers` map keyed by reverse-domain identifier in the business schema. Spec (docs/specification/identity-linking.md): * `config.providers` semantics: absent = business is implicitly its own (and only) IdP; present = strict whitelist, platforms MUST NOT fall back to direct OAuth on the business domain; businesses self-list to opt back in alongside externals. * New "Accelerated IdP Flow" section: RFC 8693 token exchange at the IdP -> RFC 7523 JWT bearer assertion grant at the business token endpoint. Profiles draft-ietf-oauth-identity-chaining-08 with two UCP-specific tightenings: token exchange MUST use `resource` (not `audience`); JWT grant MUST carry single-valued `aud` and unique `jti`. * JWT grant validation defers to RFC 7523 §3 with UCP-specific constraints (iss in `config.providers`, fail-closed JWKS, jti single-use). * Token Lifecycle: SHOULD NOT issue refresh tokens on JWT bearer grants (per draft §5.4); dual-layer revocation at IdP + business on unlink. * New "IdP Requirements" section: AS metadata must advertise `revocation_endpoint`, `jwks_uri`, and the token-exchange grant type.
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The v1 design (#354) only supports direct OAuth between platform and business: every business requires a fresh redirect, fresh consent, fresh credentials. In practice, many businesses already offer delegated IdPs (Sign in with Google, Shop, Apple, etc.) to give their users accelerated sign-in and account creation+linking. Platforms that already hold an identity at one of those IdPs benefit too: they can complete the link without re-prompting the user, which is essential for agentic flows where redirects and per-merchant consent screens are prohibitive.
This PR closes the gap by letting a business advertise the IdPs it trusts. Platforms that already hold a token at one of those IdPs chain identity to the business via a back-channel token exchange — no redirect, no extra prompt — and the business still issues its own access tokens under its own authority.
How a business advertises providers
Strict delegation: the business uses an external IdP and does not run its own oAuth infrastructure. Platforms authenticate via a listed provider (in this example accounts.shopify.com):
Hybrid: the business self-lists alongside an external IdP. Platforms pick either the IdP for accelerated flow, or the business directly (Account Linking Flow), based on what they already hold a token for or what the user prefers:
Checklist