Repository navigation
Honor configured tenancy for Desktop MCP credentials - #408
agent-relay-code[bot] wants to merge 2 commits into
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
@willwashburn, could you take the independent source review of Please trace the configured tenancy mode through both credential management and MCP token resolution. Check that a verified Desktop parent stays bound to its original user, organization and workspace even when the user belongs to two organizations. Check membership removal, parent revocation, child lease expiry, and single-mode refusal when a second organization exists. The writer reproduced the original 403 with a synthetic fixture and passed the local typecheck and 13 credential tests. The PR remains held for the merge decision after review and CI. This request covers source review only. |
|
Successor |
A synthetic verified Desktop sign-in in multi-tenant mode reproduced the reported Cursor registration failure on main: adding a second organization caused POST to answer 403 workspace_access_changed. Both registration and child-token resolution required the entire database to contain exactly one organization.
Pass the store's configured tenancy mode into both DesktopMcpCredentials instances. The global singleton condition still applies in single mode. The multi-mode SQL retains the exact workspace/organization/user membership joins, parent proof, locks, revocation and lease checks.
The HTTP regression covers registration, MCP authentication, renewal, a different organization's workspace, and loss of the original membership. A single-mode fixture also checks refusal after a second organization appears. Existing tests cover parent revocation and token-class restrictions. No Alpha environment access or deployment was used.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes Desktop MCP credential registration and child-token resolution failing in multi-tenant mode. The credential store enforced a whole-database single-organization invariant regardless of configured tenancy, so adding a second organization caused MCP authentication to return 403
workspace_access_changed.DesktopMcpCredentialsinstances; single-tenant mode keeps the global single-organization check, multi-tenant mode scopes to the verified workspace and live membership.Written for commit 248f351. Summary will update on new commits.