Skip to content

fix(oauth): reject user-scoped clients on single-workspace hosts - #1894

Open
The-AarushiSingh wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
The-AarushiSingh:fix/oauth-single-workspace
Open

fix(oauth): reject user-scoped clients on single-workspace hosts#1894
The-AarushiSingh wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
The-AarushiSingh:fix/oauth-single-workspace

Conversation

@The-AarushiSingh

Copy link
Copy Markdown
Contributor

Fixes #1850

On local/desktop the executor subject is LOCAL_SUBJECT ("local") and every connection is org-scoped. createClient still accepted owner: "user", so those clients could never be used. The later mismatch error also used cloud wording (“A Workspace connection must use a Workspace app.”).

Change

  • In createClient, reject owner: "user" when deps.subject === "local".
  • Multi-workspace fixtures keep subjects like test-subject / subject-a / subject-b, so existing user-client tests are unchanged.
  • Mismatch error is now host-neutral: An org connection must use an org-owned OAuth client.

No new config. No silent remap of userorg.

Test

  • Existing oauth-remove / list / flow user-client tests still pass.
  • Added one case: subject "local" + owner: "user" returns the new error.

- Reject owner: 'user' when deps.subject === 'local'
- Keep user-owned OAuth clients working for other subjects
- Update mismatch error to avoid 'Workspace' terminology

Closes UsefulSoftwareCo#1850
@The-AarushiSingh

Copy link
Copy Markdown
Contributor Author

cloud 13of16 is mcp-session-cap-eviction (no mcp-session-id on session-5), not this change. Rerunning the shard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Single-workspace hosts allow creating user-scoped OAuth clients that can never be used

1 participant