Repository navigation
SEP-XXXX: Refusing Subscription Filters That Are Not Wholly Permitted - #70
Open
RamjotSingh wants to merge 3 commits into
Open
RamjotSingh wants to merge 3 commits into
RamjotSingh wants to merge 3 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 642313f5-3121-4469-9a2d-58c03da64a23
The draft referred to Ending Subscription Streams When Authorization Ends by a relative path that only resolved in the drafts folder. Point those references at the proposal on its branch. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 642313f5-3121-4469-9a2d-58c03da64a23
6 of 9 tasks
…request The proposal is now open as modelcontextprotocol#67. Point the reference to it at the pull request instead of the document on its branch. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 642313f5-3121-4469-9a2d-58c03da64a23
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.
Makes
subscriptions/listenall or nothing. A request that lists an entry the principal may not access is refused with-32602(Invalid params), naming the entries indata.denied, instead of being acknowledged in part, and no stream opens. The refusal is an ordinary JSON-RPC error, sent to clients of every protocol version.Motivation and Context
The specification does not say what a server does when a filter lists something the principal may not access. Leaving it out of the acknowledgment leaves a client believing it watches resources it does not, and a client that compares the acknowledgment with its request learns only that something is missing, not why. The question comes up whenever a client re-establishes a stream after access changed.
How Has This Been Tested?
Prototype on a TypeScript SDK fork, branch
poc/authorization-lifetime(reviewer guide), which implements the combined draft in #63. When a stream opens, each entry of the filter goes through the same access check as notifications.pnpm --filter @mcp-examples/authorization-lifetime start:fast), scenario 3, step 4: a stream reopened with its old filter is refused, namingcase-114.md, and the client reopens it onconfig.jsonalone and reports the change; another is refused the same way, and the client reports the loss without prompting.data.denied; the same refusal for a client of an earlier protocol version; the same filter without the denied entry acknowledged in full; a filter with no permitted entry refused, naming every entry.main.Breaking Changes
Behavioral, for every protocol version: such a request now receives
-32602instead of an acknowledgment. The code already exists, so older clients see an ordinary request error and need not understanddata.denied.Types of changes
Checklist
AI disclosure: Ideas and specs are mine but I have used AI to link it back into the existing protocol and SEPs that introduced them as well as formulate into official language from my draft. POC has been built by AI as well on my guidance.