René's URL Explorer Experiment


Title: fix(credentials): authorize shared credentials without requiring a workflow by waleedlatif1 · Pull Request #6571 · simstudioai/sim · GitHub

Open Graph Title: fix(credentials): authorize shared credentials without requiring a workflow by waleedlatif1 · Pull Request #6571 · simstudioai/sim

X Title: fix(credentials): authorize shared credentials without requiring a workflow by waleedlatif1 · Pull Request #6571 · simstudioai/sim

Description: Summary authorizeCredentialUse could only reach its member-based sharing branch when a workflowId was supplied, so non-workflow surfaces (KB connectors, credential management) fell through to an owner-only path and rejected everyone but the user who ran the OAuth flow a workflow now only pins which workspace a legacy account id resolves through — it never grants access on its own legacy raw account.ids resolve through whichever workspace credential rows the caller can actually reach, instead of owner-only extracted canUseCredential and replaced the predicate that was hand-inlined at five sites reused resolveCredentialTokenIdentity for owner resolution instead of keeping a second local copy of the same invariant the workflow-pinned path still cannot fall through to the owner path and cross a workspace boundary Reported against RI - MDS: a workspace admin who did not run the SharePoint OAuth flow got Credential not found setting up a KB connector. The literal error came from the prod-only owner-scoped getCredential(…, auth.userId) in the connector-create route, which staging already replaced in #5273 — this PR fixes the systemic half underneath it. Net effect: access is now decided by one rule everywhere — active credential member, or derived credential admin (workspace admin, for shared types). Membership stays explicit; a plain workspace member still needs a grant, same as in workflows. Type of Change Bug fix Testing New lib/auth/credential-access.test.ts (13 cases) covering the non-owner admin/member paths, workspace-loss on both requester and owner, the workflow-pinning invariant, and the unshared-account-stays-private case. Each guard test verified to fail against the pre-fix behavior. Full suites green across lib/auth, lib/credentials, lib/oauth, lib/knowledge, app/api/auth, app/api/credentials, app/api/knowledge, app/api/tools, executor. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Open Graph Description: Summary authorizeCredentialUse could only reach its member-based sharing branch when a workflowId was supplied, so non-workflow surfaces (KB connectors, credential management) fell through to an o...

X Description: Summary authorizeCredentialUse could only reach its member-based sharing branch when a workflowId was supplied, so non-workflow surfaces (KB connectors, credential management) fell through to an o...

Opengraph URL: https://github.com/simstudioai/sim/pull/6571

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:5a8ded5c-215c-b136-9678-dfc182731e84
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD790:1ACA1F:508D34:731A2E:6AFB4050
html-safe-nonce39d2e5802e134cff296a7ff97f3d1b7914d3a64b1199c2dfc3262e4893ed1c23
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzkwOjFBQ0ExRjo1MDhEMzQ6NzMxQTJFOjZBRkI0MDUwIiwidmlzaXRvcl9pZCI6IjMxODc2MzcwNDE4MDc1MjQ2NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac7c4e98f5f192b4188afe4b7f911377efee0ce1c6e4306ab62b8eb2973813d2c2
hovercard-subject-tagpull_request:4257746359
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6571/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary authorizeCredentialUse could only reach its member-based sharing branch when a workflowId was supplied, so non-workflow surfaces (KB connectors, credential management) fell through to an o...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned849b928f455c800985398e7f1b659425adb312a5fa14fba5d9a14e62e9fe5dd
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea6c2f87cbcb6414452377b4967858ed6a66f1109
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6571/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6571%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6571%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/6571/files
Reloadhttps://github.com/simstudioai/sim/pull/6571/files
Reloadhttps://github.com/simstudioai/sim/pull/6571/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests200 (200)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
fix/kb-connector-credential-accesshttps://github.com/simstudioai/sim/tree/fix/kb-connector-credential-access
Conversation 3 https://github.com/simstudioai/sim/pull/6571
Commits 1 https://github.com/simstudioai/sim/pull/6571/commits
Checks 30 https://github.com/simstudioai/sim/pull/6571/checks
Files changed https://github.com/simstudioai/sim/pull/6571/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6571/files
fix(credentials): authorize shared credentials without requiring a workflow https://github.com/simstudioai/sim/pull/6571/files#top
Show all changes 1 commit https://github.com/simstudioai/sim/pull/6571/files
5f6bb43 fix(credentials): authorize shared credentials without requiring a wo… waleedlatif1 Aug 11, 2026 https://github.com/simstudioai/sim/pull/6571/commits/5f6bb433f598d23ef26a9f3fe365eba8d9ec3566
Clear filters https://github.com/simstudioai/sim/pull/6571/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6571/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6571/files
route.ts https://github.com/simstudioai/sim/pull/6571/files#diff-46839f4e673f60c0be01875a36322ed4b89849a9aa6ce46f3e8050f3cd7b839a
route.ts https://github.com/simstudioai/sim/pull/6571/files#diff-56f078f61f8957decb5c40d8a401c6f819aabb170174957196fcb3771034e5c0
evaluator-handler.test.ts https://github.com/simstudioai/sim/pull/6571/files#diff-349e75800134134493a5cf8a0b973c1e34b59ac553ecdb34c7454315317ad931
router-handler.test.ts https://github.com/simstudioai/sim/pull/6571/files#diff-301aff0677f688a704026c1673c63a966b446606b77ea8758ff0c537a88a49ce
vertex-credential.test.ts https://github.com/simstudioai/sim/pull/6571/files#diff-b6dd1b2975377e38bbf07b837861c50ee2a7ffe57ecffa5699ea8e5f6b46ce82
vertex-credential.ts https://github.com/simstudioai/sim/pull/6571/files#diff-7dd7ca0e92cbc2acf3fa7f1fa8aa61012df7544105f5aa2e6215d5e0fc09e24f
credential-access.test.ts https://github.com/simstudioai/sim/pull/6571/files#diff-02bc8b9a9a69527a7515b5de89bbba7c39a73be149beb58c13245dcf4a29073f
credential-access.ts https://github.com/simstudioai/sim/pull/6571/files#diff-82960c002df9ce80b14f06949caf6dde10eaa909486b825986ecc549368cef31
access.ts https://github.com/simstudioai/sim/pull/6571/files#diff-cc3a3524519fba749906993a783577c1dd22d45169bfea43ab74dc3dfaba896a
apps/sim/app/api/auth/oauth/credentials/route.tshttps://github.com/simstudioai/sim/pull/6571/files#diff-46839f4e673f60c0be01875a36322ed4b89849a9aa6ce46f3e8050f3cd7b839a
View file https://github.com/simstudioai/sim/blob/5f6bb433f598d23ef26a9f3fe365eba8d9ec3566/apps/sim/app/api/auth/oauth/credentials/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6571/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6571/files#diff-46839f4e673f60c0be01875a36322ed4b89849a9aa6ce46f3e8050f3cd7b839a
https://github.com/simstudioai/sim/pull/6571/files#diff-46839f4e673f60c0be01875a36322ed4b89849a9aa6ce46f3e8050f3cd7b839a
https://github.com/simstudioai/sim/pull/6571/files#diff-46839f4e673f60c0be01875a36322ed4b89849a9aa6ce46f3e8050f3cd7b839a
https://github.com/simstudioai/sim/pull/6571/files#diff-46839f4e673f60c0be01875a36322ed4b89849a9aa6ce46f3e8050f3cd7b839a
https://github.com/simstudioai/sim/pull/6571/files#diff-46839f4e673f60c0be01875a36322ed4b89849a9aa6ce46f3e8050f3cd7b839a
https://github.com/simstudioai/sim/pull/6571/files#diff-46839f4e673f60c0be01875a36322ed4b89849a9aa6ce46f3e8050f3cd7b839a
apps/sim/app/api/credentials/[id]/route.tshttps://github.com/simstudioai/sim/pull/6571/files#diff-56f078f61f8957decb5c40d8a401c6f819aabb170174957196fcb3771034e5c0
View file https://github.com/simstudioai/sim/blob/5f6bb433f598d23ef26a9f3fe365eba8d9ec3566/apps/sim/app/api/credentials/%5Bid%5D/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6571/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6571/files#diff-56f078f61f8957decb5c40d8a401c6f819aabb170174957196fcb3771034e5c0
https://github.com/simstudioai/sim/pull/6571/files#diff-56f078f61f8957decb5c40d8a401c6f819aabb170174957196fcb3771034e5c0
https://github.com/simstudioai/sim/pull/6571/files#diff-56f078f61f8957decb5c40d8a401c6f819aabb170174957196fcb3771034e5c0
https://github.com/simstudioai/sim/pull/6571/files#diff-56f078f61f8957decb5c40d8a401c6f819aabb170174957196fcb3771034e5c0
apps/sim/executor/handlers/evaluator/evaluator-handler.test.tshttps://github.com/simstudioai/sim/pull/6571/files#diff-349e75800134134493a5cf8a0b973c1e34b59ac553ecdb34c7454315317ad931
View file https://github.com/simstudioai/sim/blob/5f6bb433f598d23ef26a9f3fe365eba8d9ec3566/apps/sim/executor/handlers/evaluator/evaluator-handler.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6571/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6571/files#diff-349e75800134134493a5cf8a0b973c1e34b59ac553ecdb34c7454315317ad931
https://github.com/simstudioai/sim/pull/6571/files#diff-349e75800134134493a5cf8a0b973c1e34b59ac553ecdb34c7454315317ad931
apps/sim/executor/handlers/router/router-handler.test.tshttps://github.com/simstudioai/sim/pull/6571/files#diff-301aff0677f688a704026c1673c63a966b446606b77ea8758ff0c537a88a49ce
View file https://github.com/simstudioai/sim/blob/5f6bb433f598d23ef26a9f3fe365eba8d9ec3566/apps/sim/executor/handlers/router/router-handler.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6571/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6571/files#diff-301aff0677f688a704026c1673c63a966b446606b77ea8758ff0c537a88a49ce
https://github.com/simstudioai/sim/pull/6571/files#diff-301aff0677f688a704026c1673c63a966b446606b77ea8758ff0c537a88a49ce
apps/sim/executor/utils/vertex-credential.test.tshttps://github.com/simstudioai/sim/pull/6571/files#diff-b6dd1b2975377e38bbf07b837861c50ee2a7ffe57ecffa5699ea8e5f6b46ce82
View file https://github.com/simstudioai/sim/blob/5f6bb433f598d23ef26a9f3fe365eba8d9ec3566/apps/sim/executor/utils/vertex-credential.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6571/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6571/files#diff-b6dd1b2975377e38bbf07b837861c50ee2a7ffe57ecffa5699ea8e5f6b46ce82
https://github.com/simstudioai/sim/pull/6571/files#diff-b6dd1b2975377e38bbf07b837861c50ee2a7ffe57ecffa5699ea8e5f6b46ce82
apps/sim/executor/utils/vertex-credential.tshttps://github.com/simstudioai/sim/pull/6571/files#diff-7dd7ca0e92cbc2acf3fa7f1fa8aa61012df7544105f5aa2e6215d5e0fc09e24f
View file https://github.com/simstudioai/sim/blob/5f6bb433f598d23ef26a9f3fe365eba8d9ec3566/apps/sim/executor/utils/vertex-credential.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6571/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6571/files#diff-7dd7ca0e92cbc2acf3fa7f1fa8aa61012df7544105f5aa2e6215d5e0fc09e24f
https://github.com/simstudioai/sim/pull/6571/files#diff-7dd7ca0e92cbc2acf3fa7f1fa8aa61012df7544105f5aa2e6215d5e0fc09e24f
https://github.com/simstudioai/sim/pull/6571/files#diff-7dd7ca0e92cbc2acf3fa7f1fa8aa61012df7544105f5aa2e6215d5e0fc09e24f
https://github.com/simstudioai/sim/pull/6571/files#diff-7dd7ca0e92cbc2acf3fa7f1fa8aa61012df7544105f5aa2e6215d5e0fc09e24f
apps/sim/lib/auth/credential-access.test.tshttps://github.com/simstudioai/sim/pull/6571/files#diff-02bc8b9a9a69527a7515b5de89bbba7c39a73be149beb58c13245dcf4a29073f
View file https://github.com/simstudioai/sim/blob/5f6bb433f598d23ef26a9f3fe365eba8d9ec3566/apps/sim/lib/auth/credential-access.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6571/{{ revealButtonHref }}
Please reload this pagehttps://github.com/simstudioai/sim/pull/6571/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6571/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.