-
Notifications
You must be signed in to change notification settings - Fork 729
Implementation for SEP-2350 Client-side scope accumulation in step-up authorization #1591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mikekistler
wants to merge
10
commits into
main
Choose a base branch
from
mdk/sep-2350
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e3fb978
Implement SEP-2350: Client-side scope accumulation in step-up authori…
mikekistler 3e8ec3c
Fix SEP-2350 scope accumulator thread safety
mikekistler 97ba119
New skill to run conformance tests from a branch
mikekistler 84b5585
Sort accumulated scopes for deterministic output in GetScopeParameter
Copilot a34fac0
Merge branch 'main' into mdk/sep-2350
mikekistler 18b26bf
Stop futile step-up retries when an insufficient_scope challenge adds…
tarekgh e210e26
Update src/ModelContextProtocol.Core/Authentication/ClientOAuthProvid…
tarekgh b3f8721
Update src/ModelContextProtocol.Core/Authentication/ClientOAuthProvid…
tarekgh 7b1cc3c
Rename scope accumulator field for clarity
tarekgh 9eeecef
Potential fix for pull request finding
tarekgh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| --- | ||
| name: run-conformance-from-branch | ||
| description: Run MCP conformance tests in the C# SDK against a conformance branch (including forks) instead of the published npm version, then restore pinned dependencies. | ||
| compatibility: Requires npm, node, and dotnet SDK. Uses the csharp-sdk repo package.json/package-lock.json and tests/ModelContextProtocol.AspNetCore.Tests. | ||
| --- | ||
|
|
||
| # Run Conformance From Branch | ||
|
|
||
| Run C# SDK conformance tests against an unpublished `modelcontextprotocol/conformance` branch (including branches in forks). | ||
|
|
||
| ## Use Cases | ||
|
|
||
| - Validate a conformance PR before it is published to npm | ||
| - Validate C# SDK behavior against a fork with custom scenario changes | ||
| - Reproduce failures caused by conformance changes | ||
|
|
||
| ## Safety / Repo Hygiene | ||
|
|
||
| 1. Start from a clean git state. | ||
| 2. Commit or stash local changes first. | ||
| 3. Restore pinned dependencies when done (`git checkout -- package.json package-lock.json` + `npm ci`). | ||
|
|
||
| ## Inputs | ||
|
|
||
| - **Source type**: `upstream-branch` or `fork-branch` | ||
| - **Source locator**: | ||
| - Upstream branch: `modelcontextprotocol/conformance#<branch>` | ||
| - Fork branch: `<owner>/conformance#<branch>` | ||
| - **Scenario** (optional): e.g. `auth/scope-step-up` | ||
|
|
||
| ## Workflows | ||
|
|
||
| ### A) Install directly from GitHub branch (upstream or fork) | ||
|
|
||
| From `csharp-sdk` root: | ||
|
|
||
| ```bash | ||
| npm install --no-save @modelcontextprotocol/conformance@github:<owner>/conformance#<branch> | ||
| ``` | ||
|
|
||
| Examples: | ||
|
|
||
| ```bash | ||
| npm install --no-save @modelcontextprotocol/conformance@github:modelcontextprotocol/conformance#main | ||
| npm install --no-save @modelcontextprotocol/conformance@github:myuser/conformance#sep-2350-check | ||
| ``` | ||
|
|
||
| ## Run Tests | ||
|
|
||
| ### Run client conformance tests with dotnet test filter: | ||
|
|
||
| ```bash | ||
| dotnet test tests/ModelContextProtocol.AspNetCore.Tests/ModelContextProtocol.AspNetCore.Tests.csproj -f net10.0 --filter "FullyQualifiedName~ClientConformanceTests" | ||
| ``` | ||
|
|
||
| ### Run server conformance tests with dotnet test filter: | ||
|
|
||
| ```bash | ||
| dotnet test tests/ModelContextProtocol.AspNetCore.Tests/ModelContextProtocol.AspNetCore.Tests.csproj -f net10.0 --filter "FullyQualifiedName~ServerConformanceTests" | ||
| ``` | ||
|
|
||
| ## Reporting | ||
|
|
||
| Always report: | ||
|
|
||
| 1. Installed conformance source (`npm ls @modelcontextprotocol/conformance --depth=0`) | ||
| 2. Scenario results (pass/fail/warnings) | ||
| 3. Any new check IDs observed (for traceability) | ||
|
|
||
| ## Cleanup / Restore | ||
|
|
||
| Return repo to pinned dependency state: | ||
|
|
||
| ```bash | ||
| git checkout -- package.json package-lock.json | ||
| npm ci | ||
| ``` | ||
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.