René's URL Explorer Experiment


Title: improvement(egress): route workspace requests through the organization's egress gateway by waleedlatif1 · Pull Request #10040 · simstudioai/sim · GitHub

Open Graph Title: improvement(egress): route workspace requests through the organization's egress gateway by waleedlatif1 · Pull Request #10040 · simstudioai/sim

X Title: improvement(egress): route workspace requests through the organization's egress gateway by waleedlatif1 · Pull Request #10040 · simstudioai/sim

Description: Summary Requests Sim makes on a workspace's behalf now leave through the organization's dedicated egress gateway (its static IPs) when it has one. Before, only secureFetch* and generic tool HTTP were routed; raw fetch and the AWS SDK always used shared IPs, so token mints, OAuth refreshes and code exchanges, tenant API calls and many tool clients bypassed the gateway outboundFetch (lib/core/network/outbound-fetch.server.ts), a drop-in for fetch: gateway org → gateway; every other route → the global fetch, unchanged. Outside any scope it goes direct with a warning so a path that never set a scope can't become an outage; scopedOutboundFetch fails closed for paths that always run scoped (knowledge connectors, admissions, wand, model lists) organizationAwsRequestHandler for AWS SDK clients signing with customer credentials (STS, AWS tools, BYOK Bedrock): gateway orgs tunnel per org with no socket shared across orgs; everyone else keeps exactly the handler they had, including Bedrock's HTTP/2 Converted: credential token mints and verifies, OAuth refresh and connect (a routed default code exchange built from better-auth's own request builder, scoped to the user's connect draft), lib/internal tool clients, tools, webhook subscriptions and polling, LLM/embedding providers (incl. Gemini/Vertex via httpOptions.fetch), data drains (incl. the GCS/BigQuery token mint), selectors, knowledge admission Sim-owned destinations stay direct (// egress-direct: ): internal services, Sim's storage/billing/telemetry, Sim's own Azure deployments and fal billing account, operator-local Ollama/vLLM/LiteLLM, and Cerebras (its SDK's own transport carries the 600s budget) An egress outage is a Sim-side outage: a new shared unavailable orchestration code maps it to 503 (v1/internal, v2 SERVICE_UNAVAILABLE, SCIM) with a fixed message. It never marks a credential dead or revoked, never says "reconnect", never counts toward disabling a webhook, poller or knowledge connector, and degradable work (Slack event formatting) still runs. An unresolvable destination still fails as a missing host Wand and the provider model-list routes now go through authorized use cases (lib/wand, lib/provider-models), so the route only authenticates and presents and the use case sets the egress scope Removed /api/auth/oauth/token (GET/POST), its contracts and route-only helpers, plus the token-resolution inputs only it used: nothing has called it since in-process token resolution (#7340), and no sibling repo references it New check:organization-egress AST audit: a reference to the global fetch (call, alias, globalThis/window.fetch, or an imported fetch other than outboundFetch) in code that acts for a workspace fails unless annotated; the rule is in CLAUDE.md Type of Change Improvement Testing Real-socket tests through a local CONNECT gateway: outboundFetch and the AWS handler go through the scoped org's gateway, each org gets its own tunnel, pooled sockets are never shared across orgs, and an unresolvable host fails as a missing host Equivalence tests: the routed code exchange sends byte-identical requests to better-auth's own generic-oauth exchange (basic+PKCE, post+headers, discovery, token params, error/redirect) Scope and outage tests for callbacks, cron, Slack, knowledge admission, connectors, polling, sync engines, selectors, minters, managed OAuth, wand and v1 search — each seen failing with its guard removed Targeted vitest across every touched directory (~10k tests); check:organization-egress, check:egress-boundary, check:api-validation:strict, check:test-patterns, check:test-types, check:explicit-any, check:permission-group-enforcement, check:boundaries, check:client-boundary, check:application-graph, lint and type-check pass locally; full suite and check:audits in CI Line-by-line audit in six slices, independent reviews, and /simplify + /cleanup passes, findings applied Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing (new tests pass the test-audit authoring gate) 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 Requests Sim makes on a workspace's behalf now leave through the organization's dedicated egress gateway (its static IPs) when it has one. Before, only secureFetch* and generic too...

X Description: Summary Requests Sim makes on a workspace's behalf now leave through the organization's dedicated egress gateway (its static IPs) when it has one. Before, only secureFetch* and gen...

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

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:2f7f9062-11ce-bc2e-3579-27f22665b190
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idACC8:25A7D0:254561:34FB09:6AFB304C
html-safe-nonce7d3cf878ad08c2a679ecebe60f912470a8195b3b186b14fd3e440cac1cdffd45
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQ0M4OjI1QTdEMDoyNTQ1NjE6MzRGQjA5OjZBRkIzMDRDIiwidmlzaXRvcl9pZCI6IjExNDQxOTQwNDY5NTY4NzU4NTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaceeaf87d3c1b3d2d7c16698cb0462ff20d77af95ca4c107ba5b838b4b3505d511
hovercard-subject-tagpull_request:5307653910
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/10040/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 Requests Sim makes on a workspace's behalf now leave through the organization's dedicated egress gateway (its static IPs) when it has one. Before, only secureFetch* and generic too...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneefe184de15c1d8c1107a340cfc27bf7187b458dc07687ee1fa51f035148fb3d1
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
releasef567cf3af46b50a3211fb5dab569a9d6a7b58025
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/10040/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F10040%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%2F10040%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/10040/files
Reloadhttps://github.com/simstudioai/sim/pull/10040/files
Reloadhttps://github.com/simstudioai/sim/pull/10040/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests198 (198)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
improvement/org-egress-credentialshttps://github.com/simstudioai/sim/tree/improvement/org-egress-credentials
Conversation 77 https://github.com/simstudioai/sim/pull/10040
Commits 39 https://github.com/simstudioai/sim/pull/10040/commits
Checks 97 https://github.com/simstudioai/sim/pull/10040/checks
Files changed https://github.com/simstudioai/sim/pull/10040/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/10040/files
improvement(egress): route workspace requests through the organization's egress gateway https://github.com/simstudioai/sim/pull/10040/files#top
Show all changes 39 commits https://github.com/simstudioai/sim/pull/10040/files
d786e33 improvement(egress): add outboundFetch for organization-routed requests waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/d786e331309ec138a452ee8de893632ea7f17b0a
f01595b improvement(egress): route credential token mints and verifications t… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/f01595b3dc43e63d310613b6d538b89a9ba8764c
f4a91d3 improvement(egress): route a-l internal tool clients through outbound… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/f4a91d3593b58123ad43fd4a3bf9dae0ac71b7dc
23bf80f improvement(egress): route m-z internal vendor clients through outbou… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/23bf80fb8f77897d41545f6959f77f0b05a136d6
482d344 improvement(egress): route workspace vendor calls in tools, webhooks,… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/482d344090be7a5b0ef9bbb1ce25ddebceab1a0c
95eb174 improvement(egress): route customer-credential AWS SDK clients throug… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/95eb1743c6fd8d58a87054e9366376c87f39467d
30e1dd6 improvement(egress): enforce organization-routed requests with check:… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/30e1dd694bcd6ca4f4be6bf1e1eb9716c6de51a4
79fe874 improvement(egress): route oauth token traffic through the organizati… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/79fe874f8df9c001d10f49270a8c72d6422e8357
c2c57ce docs(egress): document outboundFetch in the integration rules waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/c2c57ce956efc576b5e7ad7c5c50a085776549b0
2d50fc9 test(egress): use the central workspace context mock in the new scope… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/2d50fc92223f236be78042adbe25798dd2a0cca3
2d9052e fix(egress): keep direct AWS requests on the client's own handler and… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/2d9052e535211e51415d20e9d5cd5934880d1e29
0ee5738 fix(egress): keep Sim-owned endpoints direct, fail closed for connect… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/0ee5738c2b232e4191da77d1d352d6e40fd6d030
3c894e2 chore(egress): drop references to the removed token route waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/3c894e284a0476a662556f62afb41aa02ab529be
cd7fb10 improvement(egress): route gemini/vertex sdk, wand, provider model li… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/cd7fb102f6e52dc93bb78b5716df82860e75bd7e
194c7b7 improvement(egress): scope generic oauth connect callbacks to their d… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/194c7b725448ebe1cb8a315809e27e3f341c88dc
817d925 improvement(egress): route generic oauth and credential-group code ex… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/817d9257451beb26f81c5dde51210f459e806518
f785e34 improvement(egress): share the missing-scope route rule, bound gatewa… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/f785e34b73fdc2328431e27cc4683803e3446637
05db88c test(egress): tighten the new egress tests and shrink the non-null ba… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/05db88c64196160901bf81a20a8110c68a6b8b8a
0730c24 fix(egress): type the routed AWS handler's config passthrough waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/0730c2482b270b5da43b1e2a3ed92328d7ba319e
388d282 fix(egress): keep the Azure DevOps block's constants off the server f… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/388d28219846b6c7c1ed905677742b9a9611587f
6b08ac0 improvement(egress): drop token-resolution inputs left dead by the to… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/6b08ac001f2fdfef688dfb95494a9d7ac2a8b97a
2c9970e improvement(egress): classify an organization egress outage once as a… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/2c9970ebd4e4dfcefba249ab6a59813ed62dbd0a
96aa2b3 improvement(egress): read egress outages through the shared unavailab… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/96aa2b301bab9ed1e626491996e65a80621d8de1
72f97c7 improvement(egress): move wand and provider model listing behind auth… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/72f97c755d3576dcce225d111ccad81036295771
29e3fca chore(egress): scan the wand and provider-model use cases in check:or… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/29e3fcaa8b9c49f5a240448bb4f4e175b8fdca9b
adf7aee fix(egress): declare why the new operations are permission-group exem… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/adf7aeed87bd51a1037f28d24b825bf82a2daff1
7f63ada improvement(egress): surface gateway failures as 503 and keep Sim-own… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/7f63ada4e1ede828e3eec88dc67e87684bd0aabf
0e8b47d improvement(egress): propagate egress outages and route remaining wor… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/0e8b47ddf5e717f4fc5ffe013b441b7310aa0230
fe4a771 fix(egress): reach Confluence from the knowledge base owner's route a… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/fe4a771fdc82b3ff2192f39cdea3b4c50e4dddb4
891e31c improvement(egress): surface org egress outages as Sim's outage, neve… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/891e31c1c3c0ec1926c290132c68bda0fc3578b4
cfd06e4 fix(egress): keep a bad routing configuration from failing the auth m… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/cfd06e41e815a160a95a4e5f160dab7a77adf959
7db9dbc improvement(egress): keep org egress outages from disabling connector… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/7db9dbcbbd90f22a62ff69c93aee68636afc985c
03a2b85 improvement(egress): share the unavailable-failure predicate and simp… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/03a2b85af67f83ce12bf6da91572c9d2b44a3783
1aca7d3 chore(egress): trim restating comments and tighten the outage tests waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/1aca7d3e01137affb8facb0d05d980e358a22237
df75784 fix(egress): fail an unresolvable destination as a missing host on th… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/df75784bcd0bbc18d01a55fdcf22feaf889e5869
ae156a4 fix(egress): answer an egress outage as 503 from the shared JSON tool… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/ae156a43eaebdada10b7f4187befd4cc9d67e9bd
e0d25ee improvement(egress): keep egress outages as Sim-side 503s across poll… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/e0d25eec61d8e9a5ef3c0d4a1c6587964c33a078
b3511be fix(egress): keep the poll cursor on a mid-batch outage and carry the… waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/b3511be9ace154786c097c8905ebb4643b5f0d58
34a10e0 fix(egress): mark Gmail mail read best effort so a delivered message … waleedlatif1 Nov 14, 2026 https://github.com/simstudioai/sim/pull/10040/commits/34a10e039cb0ca0e083aee5e0f5f3834939145f4
Clear filters https://github.com/simstudioai/sim/pull/10040/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/10040/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/10040/files
CLAUDE.mdhttps://github.com/simstudioai/sim/pull/10040/files#diff-6ebdb617a8104a7756d0cf36578ab01103dc9f07e4dc6feb751296b9c402faf7
View file https://github.com/simstudioai/sim/blob/34a10e039cb0ca0e083aee5e0f5f3834939145f4/CLAUDE.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/10040/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/10040/files#diff-6ebdb617a8104a7756d0cf36578ab01103dc9f07e4dc6feb751296b9c402faf7
https://github.com/simstudioai/sim/pull/10040/files#diff-6ebdb617a8104a7756d0cf36578ab01103dc9f07e4dc6feb751296b9c402faf7
Please reload this pagehttps://github.com/simstudioai/sim/pull/10040/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/10040/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.