Skip to content

Auth Server: multi-upstream provider support #3924

@jhrozek

Description

@jhrozek

Overview

This epic tracks the implementation of RFC-0052: adding multi-upstream Identity Provider (IDP) support to the embedded OAuth authorization server (pkg/authserver/). The auth server currently hard-rejects more than one upstream provider configuration; this feature lifts that restriction by adding a providerName dimension to the storage layer and introducing a sequential authorization chain so a single auth server instance can acquire tokens from multiple upstream IDPs in one flow.

Background

Multi-upstream IDP support is a prerequisite for the full vMCP auth story. Without it, backends requiring credentials from different IDPs (e.g., a corporate SSO token for internal services and a GitHub token for public APIs) cannot be served by a single auth server instance. The RFC specifies a server-driven sequential authorization chain, eager token loading into Identity.UpstreamTokens at middleware time, and full backward compatibility for existing single-upstream deployments.

Task Breakdown

Task ID Title Depends On GitHub Issue #
TASK-001 Phase 1: Storage Layer #4136
TASK-002 Phase 2: Handler and Server Layer TASK-001 #4137
TASK-003 Phase 3: Config and Operator TASK-001 #4138
TASK-004 Phase 4: Identity Enrichment and upstreamswap Middleware TASK-001 #4139

Acceptance Criteria

  • A single auth server instance accepts and validates configuration with multiple upstream OAuth2/OIDC providers
  • Sequential authorization chain drives the user through each configured upstream in turn; the client makes one GET /oauth/authorize and receives one authorization code
  • All upstream tokens are eagerly loaded into Identity.UpstreamTokens at auth middleware time
  • upstreamswap middleware reads upstream tokens from Identity.UpstreamTokens with no hidden storage calls
  • Single-upstream deployments continue to work with no configuration changes required
  • Redis breaking change (key pattern) and ProviderIdentity breaking change documented in migration guide
  • All linked task issues completed

References

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions