Repository navigation
Conversation
Add a Quarkus HTTP filter on the MCP endpoint that answers any request with an Origin header not listed in stargate.jsonapi.mcp.allowed-origins with HTTP 403 and a fixed JSON-RPC error. The list is empty by default. Requests without an Origin header are unchanged. The filter runs before CORS and authentication, answers preflight requests from approved Origins and exposes WWW-Authenticate to them. The localhost-only framework check is disabled so the allowlist is the single policy.
Contributor
📈 Unit Test Coverage Delta vs Main Branch
|
Contributor
Unit Test Coverage Report
|
This was referenced Oct 23, 2026
Contributor
📉 Integration Test Coverage Delta vs Main Branch (dse69-it)
|
Contributor
Integration Test Coverage Report (dse69-it)
|
Contributor
📉 Integration Test Coverage Delta vs Main Branch (hcd-it)
|
Contributor
Integration Test Coverage Report (hcd-it)
|
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.
What this PR does:
Rejects MCP requests whose Origin header is not on the new
stargate.jsonapi.mcp.allowed-originsallowlist, with HTTP 403 and a fixed JSON-RPC error containing a null id. The list is empty by default, and requests without an Origin header are unchanged. The check runs before CORS and authentication. Approved Origins can complete preflight and readWWW-Authenticate; approval never skips authentication. The localhost-only Quarkiverse check is disabled so the allowlist is the single policy.Which issue(s) this PR fixes:
Part of #2630, which remains open. Public edge verification belongs to #2634, and the launch Origins are not yet recorded in #2624.
Verification
All 65 focused tests passed with 0 failures, 0 errors, and 0 skips. Formatter and XML checks also passed.
The full unit suite, packaged integration tests, and manual browser checks were not run after the latest change.
Checklist