Skip to content

feat: adopt shared OAuth configuration and UserInfo - #490

Merged
QuentinBisson merged 6 commits into
mainfrom
feat/mcp-library-adoption
Nov 27, 2026
Merged

QuentinBisson merged 6 commits into
mainfrom
feat/mcp-library-adoption

Conversation

@QuentinBisson

@QuentinBisson QuentinBisson commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Adopts mcp-oauth v1.24.0 configuration and UserInfo, with separate resource-server and authorization-server values; main's mcp-toolkit v0.12.0 and URL elicitation are retained. Deprecated inputs retain the platform login audience.

What is the effect of this change to users?

Credential operations use the validated provider account across manager OAuth and portal authentication, without changing the audit principal. Delegated actors remain refused. Resource-only GitHub exchange uses one explicit trusted provider without local OAuth client credentials.

Any background context you can provide?

Part of #467 and giantswarm/giantswarm#39405 slice 5. Before upgrading, finish or cancel pending operations and inspect uncertain saves before retrying, as documented. The platform skill guidance is in giantswarm/agent-platform#1512; agent-manager layout wiring still follows giantswarm/agent-platform#1489. Provider ID-token forwarding remains tracked in giantswarm/giantswarm#39102.

Do the docs need to be updated?

Updated credential ownership, upgrade recovery, resource-only exchange and chart documentation. Tests cover both credential authentication directions, actor rejection, real MCP requests and audience compatibility.

The server reads its OAuth settings with oauthconfig.SettingsFromEnv and builds the resource server with oauthconfig.Setup (mcp-oauth v1.24.0). The --oauth-*, --dex-*, --google-*, --oauth-trusted-audiences, --sso-allow-private-ip-jwks-hosts and --allow-public-client-registration flags and their variables map onto the OAUTH_* names for one more release and log a deprecation warning; an OAUTH_* variable wins over them. OAUTH_PROVIDER=github is refused at startup: it issues no ID token. The caller's ID token comes from handler.ProviderIDTokenFromContext, and with downstream OAuth handler.RequireProviderIDToken refuses a request without one. GitHub token exchange needs Dex in the settings and takes its subject issuer from OAUTH_DEX_ISSUER_URL. The chart renders the OAUTH_* variables from its existing values and no longer passes the no-op allowPrivateURLs and allowPrivateIPs values.
…nID Provider

The chart reads oauth.resourceServer (resource, additionalResources, authorizationServers, trustedIssuers, requireResourceAccessTokens) and oauth.authorizationServer (enabled, issuer, upstream type/issuer/client/certificateAuthority, dynamicClientRegistration, clientIDMetadataDocuments, storage), and renders them as OAUTH_* variables with client secrets mounted as files. Without trustedIssuers it lists the provider people sign in with in OAUTH_TRUSTED_ISSUERS as the openIDProvider, accepting its ID tokens for the platform client (else the upstream client) and the MCPServer's requiredAudiences, in place of OAUTH_TRUSTED_AUDIENCES. The earlier oauth.* keys still work for one more release; NOTES names each one that is set.
…dentity package

The user is mcp-oauth's providers.UserInfo; internal/identity is gone. Write log lines name the user as user.issuer, user.subject and user.actor.{issuer,subject} instead of caller=<email>, never profile data, and lines for work without a user carry no user instead of caller=service-account. requestedBy and the created-by values keep the email, else the subject. The user's ID token travels in internal/idtoken whenever mcp-oauth resolves one (agentgateway sessions, skill-manager, the GitHub token exchange, and the Kubernetes clients with --downstream-oauth). A call is delegated when the token carries an act claim of any shape. The GitHub token exchange checks the subject ID token's own issuer and act claim. The default-agent cache is keyed by issuer and subject.

Credential operations are owned by the validated token's issuer and subject and bound to its OAuth client (azp, else a single audience) instead of the token's audience list. Operations prepared before the upgrade therefore get new IDs; they expire within 15 minutes. A token this server issued itself now carries agent-manager's own issuer rather than the Dex issuer.
@circleci-architect

circleci-architect Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Published Helm chart agent-manager

3.5.12-r14517d4at20261127122207hff45637
Chart agent-manager
Version 3.5.12-r14517d4at20261127122207hff45637
OCI reference oci://gsoci.azurecr.io/charts/giantswarm/agent-manager:3.5.12-r14517d4at20261127122207hff45637
Digest sha256:f1ee8479dd81f866260dcf62080767bbc2125e4dd9178edc497ed22b34a28dec
Registry public — gsoci.azurecr.io
Git catalog giantswarm-test-catalog (index)
Pull this chart
helm pull oci://gsoci.azurecr.io/charts/giantswarm/agent-manager --version 3.5.12-r14517d4at20261127122207hff45637

Posted by architect-orb · build 13247 · commit ff45637 · updated in place on every push

@QuentinBisson QuentinBisson changed the title feat: adopt the shared MCP library (OAUTH_* settings, values layout, UserInfo) feat: adopt shared OAuth configuration and UserInfo Nov 27, 2026
@QuentinBisson
QuentinBisson marked this pull request as ready for review November 27, 2026 12:28
@QuentinBisson
QuentinBisson requested a review from a team as a code owner November 27, 2026 12:28
@QuentinBisson
QuentinBisson merged commit a600fdf into main Nov 27, 2026
20 checks passed
@QuentinBisson
QuentinBisson deleted the feat/mcp-library-adoption branch November 27, 2026 12:34
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.

1 participant