Serve MCP and hooks with a secret through the portal tunnel
The connector now serves /mcp, its OAuth documents and /hooks/ besides /api/v1/, refuses any dot segment (httpx resolves them, which carried /api/v1/../../mcp onto the MCP mount), addresses calls to the hub's host, and bridges served sockets by calling the app with a websocket scope. A hook without a secret answers the tunnel with the 404 (or 1008) of a wrong secret. Requests through the hub get the hub's issuer, resource and consent page in the OAuth metadata and the 401, and the MCP host check admits the hub while enrolled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
@@ -1737,6 +1737,9 @@ export class OauthService {
|
||||
/**
|
||||
* Authorize
|
||||
* Approve a client, on behalf of the signed-in user.
|
||||
*
|
||||
* Through the hub the endpoint is the one there, which is the resource an
|
||||
* agent that came that way asks for.
|
||||
* @param data The data for the request.
|
||||
* @param data.requestBody
|
||||
* @returns OAuthAuthorizeResponse Successful Response
|
||||
|
||||
Reference in New Issue
Block a user