Repository navigation
e2e: a member cannot run a connection as the owner's account (#15) - #60
Merged
Merged
Conversation
A member who can use the app saves an MCP connection whose runsAs names the owner's personal account. The product route refuses it with ConnectionAccessInvalid (reason account) and links nothing for the member, so a swapped saved profile cannot impersonate another principal.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test-only. Adds the saved-profile (
runsAs) substitution evidence that #15's acceptance asks for. No product or runtime change.What it proves. In "Scoped connections run apps only as the selected accounts and link bare accounts" (
scopedConnectionAccounts):runsAsnames the owner's personalworkaccount.ConnectionAccessInvalidwith reasonaccount, notapp, so the app check passed and the account check refused.The same scenario already covers the in-call substitutions:
$accountsfails withAccountChoiceUnsupported;hostedMcpLinkHeldAccesscovers the race where account access is withdrawn while a save waits. This step covers the simpler case: another person's account named up front.Limits. Native requests (#16) are out of scope.
Run locally:
bun run e2e:self-host --test-name 'Scoped connections run apps only as the selected accounts and link bare accounts'passed (1 passed).bun run checkpassed. The scenario's Cloud target runs in deployed tests.