Repository navigation
Conversation
erichare
marked this pull request as ready for review
November 2, 2026 20:00
This was referenced Nov 3, 2026
Contributor
Author
|
The November 3 alignment added deployment checks in #2634 for Authorization Bearer forwarding and database wake-up, plus permitted and denied database operations using the final identity contract, once agreed. #2654 tracks the gateway/platform and backend ownership needed for those checks. The final subject and permission contract, token lifetime, and headless launch scope remain open. Resource-server acceptance of a JWT does not establish that the backend authorizes its identity correctly. Existing user-token behavior also needs to remain intact. These are integration dependencies alongside the local verification already recorded in this PR. |
Contributor
📈 Unit Test Coverage Delta vs Main Branch
|
Contributor
Unit Test Coverage Report
|
Contributor
📉 Integration Test Coverage Delta vs Main Branch (hcd-it)
|
Contributor
Integration Test Coverage Report (hcd-it)
|
Contributor
📉 Integration Test Coverage Delta vs Main Branch (dse69-it)
|
Contributor
Integration Test Coverage Report (dse69-it)
|
erichare
force-pushed
the
fix/mcp-oauth-integration
branch
from
November 5, 2026 19:28
c805b3a to
939ed32
Compare
This was referenced Nov 5, 2026
erichare
changed the base branch from
fix/mcp-request-isolation
to
feat/mcp-protocol-2026-07-28
November 5, 2026 19:29
A deployment that serves one public host per database can now set stargate.mcp.auth.public-host-suffix in place of the fixed public base URL. The protected resource metadata, the 401 challenge and the required aud claim are then built from the host of each request, so a token issued for one database is rejected on another. A host outside the suffix receives 401 without a challenge. Bearer authentication now also requires mp.jwt.token.header to be Authorization. Without a static audience list the built-in JWT mechanism accepted a token from a cookie on REST paths with no audience check.
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:
Adds opt-in JWT Bearer authentication and OAuth protected-resource discovery for MCP. OAuth mode rejects legacy MCP credentials and preserves ordinary REST authentication. It validates SmallRye's resolved issuer, key, and resource audience, and passes the encoded token to command execution. A deployment with one public host per database sets
stargate.mcp.auth.public-host-suffix, and the metadata, the 401 challenge, and the requiredaudthen come from each request's host. Tokens are accepted from theAuthorizationheader only. OAuth stays disabled by default. Includes a reusable smoke test for discovery, the catalog, and permitted and denied database reads with an issued token.Which issue(s) this PR fixes:
Refs #2642 and #2643.
Verification
524 focused tests passed with 0 failures, 0 errors, and 0 skips at
4d15d0c0e. That run used JDK 25 with the format check skipped, because the pinned formatter does not run on JDK 25, so CI is the first format check of this commit. With the audience comparison disabled, 5 of the new host-suffix tests failed. The smoke script's 10 unit tests pass, andgit diff --checkis clean. The packaged MCP suite, the live smoke test, and the local PKCE fixture passed before the rebase onto #2659 and were not rerun. Production Astra authorization, generic MCP-client login, and a token issuer that sets a per-databaseaudremain unverified. CI runs the unit and DSE/HCD integration suites on this push.Checklist
MCP stack
Merges bottom up; row 1 is the bottom of the stack.