Repository navigation
Conversation
…f HTTP 403 MCP clients read an HTTP 401 or 403 as an authorization challenge and cache the server as needing sign-in. A refused JSON-RPC request on an mcp endpoint now gets a JSON-RPC error on HTTP 200 (-32600 with supportedVersions for a revision refusal, -32601 for a method refusal), and a refused notification gets an empty HTTP 202. The OCSF deny event is unchanged. Non-POST and non-JSON bodies keep the HTTP deny response. Closes #6048 Signed-off-by: Evan Lezar <elezar@nvidia.com>
|
🌿 Preview your docs: https://nvidia-preview-pr-6118.docs.buildwithfern.com/openshell |
This branch has not been deployed
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.
Summary
An L7 refusal on a
protocol: mcpendpoint was an HTTP 403policy_denied. MCP clients read a 401/403 on a first request as an authorization challenge and cache the server as needing sign-in.For a POST carrying a JSON-RPC message, the refusal now travels in-protocol:
id. Code-32600withdata.supportedVersionswhenmcp.versionsexcludes the revision;-32601for a method or tool call the policy refuses. The error message carries the same detail as before. A batch gets an array of errors.id): empty HTTP 202.mcpprotocols.Both relay paths (JSON-RPC relay and the inspected/route-selected relay) are covered.
Testing
L7_REQUEST deny/JSONRPC_L7_REQUEST decision=denymessages.cargo test -p openshell-supervisor-network --lib: 1875 passed.cargo clippy -p openshell-supervisor-network --all-targets -- -D warningsis clean. Gateway/server tests were not run locally (z3 is not installed).Docs: updated the MCP rejections section in
docs/how-it-works/policies/schema.mdx.Closes #6048