fix: harden org-scoped MCP config chat gating, updates, and visibility - #28065
fix: harden org-scoped MCP config chat gating, updates, and visibility#28065ibetitsmike wants to merge 9 commits into
Conversation
Docs previewCheck off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
updateMCPServerConfig merged request fields onto the param middleware's snapshot, taken before the request body was parsed, so an overlapping update could have its changes to omitted fields silently reverted. Re-fetch the row on the transaction handle before constructing the merged update, restoring the pre-existing behavior.
…er refetch errors A failed background refetch flips the MCP query's isSuccess off while TanStack Query v5 retains the cached data, so gating the composer on isSuccess blocked sends despite a usable organization MCP list. Gate on missing data instead; the error alert still surfaces refetch failures.
The auditor roles' MCP config read grant exists so auditors can inspect the resources audit logs reflect, but the full-view gate only checked update permission, leaving auditors with the member view: redacted management fields and 404s for disabled configs. Before org scoping the site auditor's deployment-config read selected the full view. Gate the full view on org audit-log read as well, which site and org auditors hold and ordinary members do not.
The cross-org concealment helper prefixed every case with /mcp-servers, so the callback case hit a router 404 without invoking the handler; the callback lives on the frozen /mcp/servers route. Disconnect deliberately returns 200 for callers without a token so config IDs cannot be probed, which the 404 expectation contradicted. Also pin that legacy MCP selection migration is a no-op while the server list has not resolved.
…ect body concealment Add a cross-organization callback test proving tokens bind to (user, org-scoped config) with no cross-org reuse, and restore the full-response equality check that a concealed config's disconnect is indistinguishable from a nonexistent ID.
20125f4 to
d0783f3
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0783f3ff4
ℹ️ 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".
Hardens the org-scoped MCP server config surface from #27942 with fixes and regression pins that are independent of the core cutover:
isSuccess).Stack context
Part of the MCP org-separation stack (CODAGT-711 org scope -> apidocs -> hardening -> CODAGT-717 audit -> CODAGT-712 ACLs -> CODAGT-806 token RBAC). Split out of #27942 to keep the core cutover reviewable; each change here builds on the org-scoped routes and chat gating introduced below it.