Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

chore(conformance): run the enterprise-managed-authorization client scenario - #1565

Merged
connor4312 merged 2 commits into
modelcontextprotocol:mainfrom
1yakub:chore/conformance-ema-id-token
Dec 3, 2026
Merged

connor4312 merged 2 commits into
modelcontextprotocol:mainfrom
1yakub:chore/conformance-ema-id-token

Conversation

@1yakub

@1yakub 1yakub commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Handles the auth/enterprise-managed-authorization client scenario in the conformance client, removes it from the extension baseline, and marks it passing in ROADMAP.md.

Motivation and Context

expected-failures-extensions.yaml lists auth/enterprise-managed-authorization as a known failure. The scenario is the SEP-990 flow with an OIDC ID token as the subject: token exchange at the IdP for an ID-JAG, then the JWT bearer grant at the MCP authorization server. conformance-client has no arm for it and exits with Unsupported conformance scenario.

rmcp has supported this flow since #1385 (EmaExchangeRequest::new_with_id_token), after the baseline was written in #1019. The -refresh-token variant already has an arm, run_ema_refresh_token_client (#1234), for the scenario proposed in modelcontextprotocol/conformance#484.

The change:

  1. run_ema_refresh_token_client becomes run_ema_client, which takes the subject: IdToken or RefreshToken. One match on the subject builds each exchange, so the IdP client authentication and the subject token always come as a pair.
  2. For IdToken, the context's idp_id_token goes to new_with_id_token, with a public IdP client (the default of EmaAuthorizationServer::new). The fixture hands no IdP secret, and the referee's IdP does not check client authentication, so a public client is the only choice. The refresh token path keeps client_secret_basic with idp_client_secret, as before.
  3. The scenario leaves expected-failures-extensions.yaml. The baseline is strict, so with the arm in place CI would fail the entry as stale.
  4. ROADMAP.md marks the scenario as passing.

How Has This Been Tested?

  • Automated unit / integration tests
  • Tested manually
  • Tested in a real application

Every step of the client job in conformance.yml, run locally on Windows 11 at fbd0f24 with npx @modelcontextprotocol/conformance@0.2.0-alpha.12 and Rust 1.96 (the pinned toolchain):

Step Result
--scenario auth/enterprise-managed-authorization 9/9 checks pass, including complete-flow-token-exchange and complete-flow-jwt-bearer
client, extensions suite against expected-failures-extensions.yaml exit 0, "Baseline check passed: all failures are expected." (only auth/dpop, auth/dpop-nonce and auth/wif-jwt-bearer fail)
the same step against the baseline on main exit 1, "Stale baseline entries (now passing - remove from baseline): auth/enterprise-managed-authorization"
client, 2025-11-25 217/217
client, 2026-07-28 407/407
  • cargo clippy -p mcp-conformance --all-targets -- -D warnings: clean.
  • cargo test -p mcp-conformance: 2 passed (the client and server unit tests).
  • cargo +nightly fmt --all -- --check: clean.

The auth/enterprise-managed-authorization-refresh-token scenario is not in a released conformance version (conformance#484 is still open), so the refresh token path of run_ema_client was compiled and checked by clippy, but not run against a referee. It sends the same requests as before: the same client authentication at the IdP and at the authorization server, the same refresh token, the same scopes.

Breaking Changes

None. Only the conformance client, its baseline and the roadmap table change.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Test update (non-breaking change which adds or updates tests)
  • Refactoring (non-breaking change which makes things better)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • CI/build script update (update CI workflow or build scripts)

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • I have added automated tests for my change
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

There is no new test: the change is itself coverage, since the extension step in CI now runs this scenario against a strict baseline.

auth/wif-jwt-bearer stays in the baseline: it needs a plain RFC 7523 JWT bearer grant with a workload JWT, and rmcp's JWT bearer step only redeems an ID-JAG from exchange_id_jag. The DPoP entries are tracked in #1472.

Two other rows of the roadmap table are out of date (the tasks-* row still counts 9 expected failures, and there are no DPoP rows). They are left for a separate change, to keep this one to the scenario.

Written with AI (Claude Code): the code change and this description.

1yakub and others added 2 commits December 4, 2026 02:19
…cenario

The conformance client had no arm for auth/enterprise-managed-authorization,
the SEP-990 flow with an OIDC ID token subject, so the extension baseline
listed it as a known failure. rmcp supports that subject since
EmaExchangeRequest::new_with_id_token (modelcontextprotocol#1385).

run_ema_refresh_token_client becomes run_ema_client, which takes the
subject. The ID token fixture hands no IdP secret, so its IdP client is
public. The scenario leaves the strict baseline, which would otherwise
fail it as stale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The subject decides both the IdP client authentication and the subject
token, so one match arm now builds each pairing. ROADMAP.md marks
auth/enterprise-managed-authorization as passing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1yakub
1yakub requested a review from a team as a code owner December 3, 2026 21:09
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-03T21:11:50.465244Z fbd0f24 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@connor4312 connor4312 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for folding both subjects into one run_ema_client: the ID-token path uses a public IdP client, the refresh-token path keeps client_secret_basic, and the stale baseline entry is removed.

@connor4312
connor4312 merged commit 76ba793 into modelcontextprotocol:main Dec 3, 2026
23 checks passed
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