Repository navigation
SEP-XXXX: Per-Notification Access Checks for Subscription Streams - #69
Open
RamjotSingh wants to merge 4 commits into
Open
RamjotSingh wants to merge 4 commits into
RamjotSingh wants to merge 4 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
Ending Subscription Streams When Authorization Ends is now open as modelcontextprotocol#67. Point references to the proposal as a whole at the pull request, and name it in the header. References to its sections still point at the document on the pull request's branch, since a pull request link cannot carry a section anchor. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 642313f5-3121-4469-9a2d-58c03da64a23
modelcontextprotocol#67 is now titled Ending Subscription Streams with an Authorization Reason, and its sections were reorganized. Use the new title, and point references to its sections at their new places. 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.
The original issue is described in #62
This is a split from #63 and builds on #67
Applies the server's resource-level access checks, such as ACLs and membership, to every notification on a
subscriptions/listenstream, not only to the request that opened it. Notifications the principal could not obtain with a request are dropped. A stream that loses access to some of its entries keeps the rest; one that loses access to all of them ends withrevoked.Motivation and Context
A server checks two things before it serves a request: that the token is valid, and that the principal may access what the request asks for (#62). The proposal this builds on covers the token; this one covers the resource. Today, a stream opened before a user lost access to a resource keeps delivering its change notifications, revealing when a resource they can no longer read changes, and notifications about sub-resources, such as a private channel in a watched team, raise the same problem without any change in access.
How Has This Been Tested?
Prototype on a TypeScript SDK fork, branch
poc/authorization-lifetime(reviewer guide), which implements the combined draft in #63. Every notification passes through a pluggable access check,authorize(authInfo, target).pnpm --filter @mcp-examples/authorization-lifetime start:fast), scenario 3, step 3: access to an HR case is revoked during a change to it. One stream keeps receiving changes toconfig.jsonwhile notifications about the HR case stop; another, whose only entry is the HR case, stays open past the change rather than revealing when it happened.revoked; a last entry lost during a change ends the stream only at its deadline.main.Breaking Changes
None for clients, and no wire change. Servers that deliver these notifications today must stop, but the notifications dropped are ones the principal could not obtain with a request, and a client cannot tell a dropped notification from no change. A stream ends only when nothing it watches is still readable, which older clients see as a close without a response, the same as any other unexpected disconnect.
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.