SEP-3193: Cross-Server Data-Origin Labels and Flow Policy - #3193
Open
omkarparth wants to merge 2 commits into
Open
SEP-3193: Cross-Server Data-Origin Labels and Flow Policy#3193omkarparth wants to merge 2 commits into
omkarparth wants to merge 2 commits into
Conversation
Author
|
Hi @pcarleton and @localden , requesting to review the SEP and sponsor the changes. |
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.
Adds a Standards Track SEP proposing two additive primitives — a host-attached
flowOriginlabel naming the principals whose content contributed to a request,and a server-declared
flowPolicystating which origins that server accepts —together with a runnable, dependency-free reference prototype.
Files added:
seps/3193-cross-server-data-origin-labels-and-flow-policy.mdsep-flow-policy-poc/— reference host, two reference servers, attack demo, 34 conformance testsMotivation and Context
MCP hosts are multi-server by design, and every connected server's output lands in
the same context window that selects the next tool call. Nothing in the protocol
marks which server produced which bytes, so a server receiving a request cannot
tell whether the arguments derive from the user, from its own earlier results, or
from an untrusted third-party server that injected them.
That gap admits a two-server chain in which neither server is compromised and
neither misbehaves by its own contract: a low-assurance server returns content
that steers the model into a higher-assurance server's privileged tool, and the
result is handed straight back out through the low-assurance server. Every call in
the sequence is individually well-formed and authorized.
The host cannot close this alone. Only the receiving server knows its own risk
appetite — a ticketing server may accept arguments derived from scraped web pages
where a payments server must not — and that is a policy statement the host cannot
infer. Per-host heuristics also do not compose across independently authored
servers. This is the same split the web made for
Originand CORS: the browsercomputes the origin, the server declares what it accepts, and neither half is
useful alone.
The labels are host-asserted and unsigned, which is made safe by one normative
invariant: origin labels may only restrict, never authorize. A recipient may
refuse on their strength but must never grant anything, so forging a label can
only cause the forger's own request to be denied. That property is what lets this
ship with no cryptographic dependency, and it is what keeps it on the correct side
of the boundary the SEP-2817 discussion settled on, where client-asserted
_metais explicitly not authorization evidence.
Prior art was checked before filing. This addresses the Security IG discussion-agenda
item "Tool identity across servers", open without a champion since the group's
charter. It is complementary to and disjoint from SEP-2817 (audit-only), SEP-1913
(labels tool risk, not data origin), and SEP-3140 (supplies the verification that
produces the
verifiedassurance state).How Has This Been Tested?
A dependency-free prototype implements the whole mechanism end to end and runs on
a stock Node install:
34 conformance tests, all passing. Coverage includes:
succeeds and the customer table leaves the trust boundary, demonstrating the gap
in the protocol as it stands. With it enabled, the privileged call is never
dispatched and the exfiltration leg is independently blocked.
low-assurance server has contributed.
lists, a
completevalue that is not literallytrue, unknown assurance states,and unrecognized
acceptFromtokens all resolve to the most restrictive reading.disables the host check to drive the server's independent re-evaluation.
resources/readgating — a read ofnotes://export?data=<secret>is acomplete exfiltration channel, so reads are gated on the same terms as calls.
acceptFromentry survives into what the model may see.
com.example.tier:goldfails to match on a hostthat does not understand it, so extension makes an older evaluator more
restrictive rather than less.
any shape, can convert a denial into an approval.
The model is simulated: the demo hard-codes the tool sequence an injected page
would induce, because the point under test is the flow control, not the model's
susceptibility.
Breaking Changes
None. The proposal is fully additive and capability-negotiated.
flowOriginbehaves exactly as today.flowPolicybehaves exactly as today, and hostsperform no pre-dispatch check for it.
flowPolicyon a tool declaration andflowOriginin_metaare optionalfields that older peers ignore.
One adoption note is called out in the SEP: because an absent label evaluates as
unverifiedandcomplete: false, a server adopting a strict policy before itsclients adopt labelling will reject calls. Servers should therefore keep a
permissive default until labelling is widespread.
Types of changes
Checklist
Additional context
Design decisions worth reviewing:
the integrity of the label at all. Where a recipient wants to rely on origin
rather than merely restrict on it, it needs a signed assertion, and that belongs
with the attestation family (SEP-2787 / SEP-2828 / SEP-3004) rather than here.
tracking through model reasoning is not solvable in general, and any attempt at
precision will under-report — the one contributor dropped is exactly the injected
one. Over-approximation is sound but imprecise; the cost is false rejections,
which is an availability trade rather than a security one.
contributor set maximal within a few turns and operators would switch the feature
off. Hosts may narrow to a partition under a structural, checkable condition. The
SEP states plainly that summarization does not clear a contributor — treating
a summary as clean builds a laundering step, and injected instructions survive
summarization comfortably.
reserved range is how collisions arise, and the number carries nothing the payload
does not. Recipients discriminate on the namespaced
datakey; the numeric codeshould follow whatever emerges from SEP-2145.
lists what would have been accepted lets an injected instruction iterate until it
finds an ungated route — the same failure as a login form distinguishing "no such
user" from "wrong password". Hence the normative rule that the violation set is
host-facing only.
third overlapping trust vocabulary does not emerge alongside SEP-1913 and
SEP-3140. Identifiers are open via a reverse-DNS vendor prefix, which is safe
because unknown tokens never match.
acceptFromis an allowlist, not a denylist. A denylist silently admitsanything the author did not think of.
Rejected alternatives are documented in the SEP: host-only enforcement,
rejectFromdenylists, per-argument labels, transport headers, a dedicated errorcode, and overloading SEP-2817's
aiInvocationblock.Scope of the prototype. Transport is omitted deliberately — this SEP changes
what accompanies a request, not how bytes move. Context partitions are modelled but
not policed. This is the runnable prototype, not the SEP-2484 conformance artifact,
which additionally requires a scenario in the conformance repository with a
traceability file mapping each MUST and SHOULD to a check ID. I'm happy to add that
if the proposal gains a sponsor.
Three open questions remain in the SEP, on vocabulary ownership if the Security IG
consolidates the three axes, whether vendor-prefixed tokens need registration, and
whether flow policy should be declarable per resource or URI template.
Seeking a sponsor.