Repository navigation
Description
Let a client discover how to sign in, then require a valid OAuth access token before it can list or run MCP tools. Publish the resource metadata needed to start that flow without credentials. This is required for the launch in #2408.
Track implementation in #2669 and enforce issuer, audience, expiry, scope, and database permissions at the MCP endpoint. Reject ID tokens, AstraCS tokens, and old custom token headers. Ordinary HTTP API authentication remains separate.
The companion authorization service owns sign-in, consent, client registration, and renewal. Its owner, tracking reference, and contract revision must be linked through #2408. This ticket implements the Data API side.
This ticket is done when implementation and focused authorization tests pass, including unauthenticated discovery and denied access. #2626 verifies HTTP behavior, #2633 tests complete client sign-in, and #2634 checks the public deployment.
Status on November 3, 2026
PR #2669 is open with opt-in JWT Bearer authentication, protected-resource discovery and recorded local tests. PR #2617 is closed without merging. The final authorization-service contract still needs a named owner and public-safe revision reference through #2654.
Data API admission and metadata are this ticket's implementation work. Gateway forwarding and database wake-up need platform ownership. The proposed service-client JWT identity and permission mapping need agreement with the backend owner. #2634 verifies the combined deployed path.
Implementation requirements and source references
Tracking issue: #2408. Workstream: Handshake. Launch required.
Requirement IDs: H1 resource discovery, H6 token exchange and protected calls, L1 authentication contract. H2–H5 and H7 are authorization-service integration prerequisites. These IDs are shared with the delivery plan.
Outcome
Implement the OAuth-only MCP protected resource. Implementation is tracked in PR #2669. The earlier preparatory PR #2617 is closed without merging. Preserve authentication for ordinary Data API HTTP endpoints.
Acceptance
-
Publish unauthenticated RFC 9728 resource metadata and a 401 Bearer resource_metadata challenge. Also provide well-known discovery. Use a canonical resource identifier and at least one authorization server.
-
Require an authorized OAuth access token for protected MCP discovery, listing and execution. Reject ID tokens, manually supplied AstraCS tokens and Token/token/X-Cassandra-Token fallback at the MCP route.
-
Validate token authenticity, issuer, audience and expiry before extracting identity or executing tools. Enforce scope and organization/database/operation permissions. Use the agreed JWT/JWKS or opaque-token contract and test rotation, revocation and permission changes.
-
Keep identity, the inbound credential and downstream credentials separate. Do not forward the MCP access token to other APIs or embedding/reranking providers.
-
Return 401 for missing/invalid credentials and 403 for insufficient scope or permission with the required challenge. Keep offline_access out of resource-required scope challenges. Authorization failures cannot become successful tool results.
-
Test forged, expired, wrong-issuer, wrong-audience and wrong-tenant credentials, read-only versus write access, old headers, key rotation and recovery after denial. Metadata must remain reachable without credentials.
-
Agree the final subject and permission contract with the authorization service and backend. Test the agreed service-client access JWT through a permitted database operation and a denied organization/database/operation. Preserve existing user-token behavior.
-
Record the canonical public resource and issuer URLs, including path prefixes, and which component serves each metadata endpoint. Coordinate public routing and Bearer forwarding checks with MCP: Verify the deployed service and prepare rollout #2634.
Completion evidence
Link the implementation PR, exact artifact/revision and passing focused authorization tests. Record the authorization-service contract revision using a public-safe identifier and redacted configuration evidence. Keep environment-specific configuration and private implementation links in private records.
Close this ticket on its implementation and focused tests. Independent browser/client qualification belongs to #2633, packaged raw HTTP conformance to #2626 and deployed verification to #2634. Those release gates remain open independently.
Sources
Authorization, authorization-server discovery and security considerations. Related changelog IDs m7–m9 and D4 concern the companion authorization-service/client contract, not new resource-server callback endpoints.
Resource discovery checks
Record the public resource identifier and exact metadata URL. Verify unauthenticated GET returns HTTP 200 and application/json, with the expected resource value and a nonempty authorization_servers array of issuer identifiers. Keep the chosen challenge and well-known routes reachable through the deployed edge. The MCP RPC endpoint's GET restriction must leave metadata GET available.
Verify the resource value against the full public identifier, including its path. Keep this OAuth metadata endpoint distinct from protected MCP server/discover. Requiring both server discovery mechanisms remains our interoperability choice. The specification requires at least one.
Link the companion authorization-service owner and contract reference recorded in #2408. Use a public-safe reference if implementation details are private.
See RFC 9728 sections 3.1–3.3 and the MCP discovery requirements.
Activity
[-]MCP: Implement the OAuth-only protected resource[/-][+]MCP: Add OAuth authentication and discovery[/+]