revert(webmcp): remove unauthenticated remote handoff session - #60
Conversation
Roll back only PR #59's remote human-handoff surface after post-merge review found forgeable Origin-based creation plus unresolved pending-submit and TTL notification races. Preserve the prior public registry MCP/browser WebMCP surface. Reintroduce remote handoff only with a server-authenticated creation capability and complete lifecycle semantics.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ae6497078
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const result = protocol.handle(message, { protocolVersion, handoffSession }); | ||
| if (result?.notification) return sendEmpty(response, 202, corsHeaders(request, allowedOrigins)); | ||
| const result = protocol.handle(message, { protocolVersion }); | ||
| if (result?.notification) return sendEmpty(response, 202); |
There was a problem hiding this comment.
Restore CORS headers on accepted notification responses
When a browser client from any configured allowed origin posts a JSON-RPC notification such as notifications/initialized, this branch returns 202 without Access-Control-Allow-Origin, so the browser reports a CORS failure even though the server accepted the request and its preflight advertises POST support. The same omission affects the parse, routing, and protocol-version error branches; restore corsHeaders(request, allowedOrigins) on all responses to accepted cross-origin requests.
Useful? React with 👍 / 👎.
Post-merge review of #59 found a security P1: handoff creation treats a forgeable browser
Originas authentication, allowing arbitrary session creation and bounded-store displacement/DoS. Two lifecycle P2s also remain: stale pending submissions can publish after edits, and TTL expiry does not notify connected clients that the dynamic tool disappeared.This reverts only #59 to the exact pre-feature tree. The prior public registry MCP and browser-native WebMCP remain. The remote human-handoff concept is preserved in #59/history but should return only with a server-authenticated creation capability plus complete submit/expiry lifecycle semantics.
hmmm: authentication mechanism for a future remote handoff is intentionally not invented in this rollback.