Repository navigation
fix(cloud): preserve OS trust and network policy for first-party traffic - #16399
Minidoracat wants to merge 18 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 7a5b66f and 9df26bcccfa1e3744e14c7a2796ce8f0811510a7. 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe change adds first-party HTTP and WebSocket transports with system TLS trust, proxy support, and fixed request policies. Cloud, artifact, organization-membership, Relay, and relay-region requests use the new HTTP boundary. Relay control and data sockets use first-party WebSocket factories. Runtime packaging and Windows native rebuild handling support the new dependencies. Node trust smoke tests, Electron policy tests, workflow checks, and reliability-gate metadata provide validation. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The implementation addresses issue Full details: Description checkExplanation The description follows the repository template and covers the change, rationale, linked issue, visual proof, testing, review status, scope, risks, and checklist. It also clearly identifies the remaining managed-network verification gap. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ac34d6f to
cc53814
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: e07725e0-8b04-48f4-a42c-363d1686b977
📥 Commits
Reviewing files that changed from the base of the PR and between bc98655 and cc538145d1baa171ef6db41d7229ee6a4cf752b6.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (24)
config/packaged-runtime-node-modules.cjsconfig/scripts/package-electron-first-party-dispatcher-contract.test.mjspackage.jsonsrc/main/artifacts/artifact-cloud-request.tssrc/main/global-fetch-call-site-audit.test.tssrc/main/host/electron-http-client.test.tssrc/main/host/electron-http-client.tssrc/main/jira/client.test.tssrc/main/network/first-party-tls-trust.tssrc/main/network/http-client.tssrc/main/orca-profiles/profile-cloud-client.tssrc/main/orca-profiles/profile-cloud-org-members-client.tssrc/main/runtime/first-party-fetch-proxy.test.tssrc/main/runtime/first-party-fetch.test.tssrc/main/runtime/first-party-fetch.tssrc/main/runtime/first-party-relay-websocket.test.tssrc/main/runtime/first-party-relay-websocket.tssrc/main/runtime/relay/relay-control-client.tssrc/main/runtime/relay/relay-http-client.test.tssrc/main/runtime/relay/relay-http-client.tssrc/main/runtime/relay/relay-region-preference.test.tssrc/main/runtime/relay/relay-region-preference.tssrc/main/runtime/rpc/relay-transport.tstests/e2e/first-party-electron-http-policy.spec.ts
🚧 Files skipped from review as they are similar to previous changes (13)
- src/main/orca-profiles/profile-cloud-org-members-client.ts
- src/main/runtime/relay/relay-region-preference.ts
- src/main/artifacts/artifact-cloud-request.ts
- package.json
- config/scripts/package-electron-first-party-dispatcher-contract.test.mjs
- src/main/runtime/rpc/relay-transport.ts
- config/packaged-runtime-node-modules.cjs
- src/main/orca-profiles/profile-cloud-client.ts
- src/main/runtime/relay/relay-control-client.ts
- src/main/runtime/relay/relay-region-preference.test.ts
- src/main/runtime/relay/relay-http-client.ts
- src/main/runtime/first-party-relay-websocket.ts
- src/main/runtime/relay/relay-http-client.test.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
cc53814 to
7e98a3e
Compare
There was a problem hiding this comment.
Actionable comments posted: 5
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 264d47e3-bd5f-4ae1-a53f-6bc177a83e46
📥 Commits
Reviewing files that changed from the base of the PR and between cc538145d1baa171ef6db41d7229ee6a4cf752b6 and 7e98a3e468011962910fa47fe778196fd13c13cc.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (23)
.github/workflows/pr.ymlconfig/packaged-runtime-node-modules.cjsconfig/reliability-gates.jsoncconfig/scripts/build-first-party-node18-trust-smoke.mjsconfig/scripts/ensure-native-runtime.mjsconfig/scripts/first-party-node18-trust-smoke-entry.tsconfig/scripts/package-electron-first-party-dispatcher-contract.test.mjsconfig/scripts/pr-workflow-parallelism.test.mjsconfig/scripts/rebuild-native-deps.mjsconfig/scripts/smoke-first-party-node18-trust.mjspackage.jsonsrc/main/index.tssrc/main/network/first-party-ca-certificates.test.tssrc/main/network/first-party-ca-certificates.tssrc/main/network/first-party-tls-trust-node18.test.tssrc/main/network/first-party-tls-trust.tssrc/main/network/http-client.tssrc/main/runtime/first-party-relay-websocket.test.tssrc/main/runtime/first-party-relay-websocket.tssrc/main/runtime/relay/relay-control-client.tssrc/main/runtime/rpc/relay-transport.test.tssrc/main/runtime/rpc/relay-transport.tstests/e2e/first-party-electron-http-policy.spec.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.
3ea9c53 to
82a3473
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/network/first-party-ca-certificates.ts (1)
8-16: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUse Node path utilities for certificate file paths.
src/main/network/first-party-ca-certificates.ts#L8-L16: Build the macOS and Linux certificate paths withpath.join.src/main/network/first-party-ca-certificates.ts#L126-L126: Build the/dev/stdinpath withpath.join.src/main/network/first-party-ca-certificates.test.ts#L41-L45: Build the fixture path withpath.join.As per coding guidelines: “File paths: Use
path.joinor Electron/Node path utilities — never assume/or\.”Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: b3af0151-03a5-4e46-aecd-f58e80fe49a4
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (44)
.github/workflows/pr.ymlconfig/packaged-runtime-node-modules.cjsconfig/reliability-gates.jsoncconfig/scripts/build-first-party-node18-trust-smoke.mjsconfig/scripts/first-party-node18-trust-smoke-entry.tsconfig/scripts/package-electron-first-party-dispatcher-contract.test.mjsconfig/scripts/pr-workflow-parallelism.test.mjsconfig/scripts/rebuild-native-deps.mjsconfig/scripts/rebuild-native-deps.test.mjsconfig/scripts/smoke-first-party-node18-trust.mjspackage.jsonsrc/main/artifacts/artifact-cloud-recovery.test.tssrc/main/artifacts/artifact-cloud-request.tssrc/main/artifacts/artifact-cloud-service-races.test.tssrc/main/artifacts/artifact-cloud-service.test.tssrc/main/global-fetch-call-site-audit.test.tssrc/main/host/electron-http-client.test.tssrc/main/host/electron-http-client.tssrc/main/index.tssrc/main/jira/client.test.tssrc/main/network/first-party-ca-certificates.test.tssrc/main/network/first-party-ca-certificates.tssrc/main/network/first-party-tls-trust-node18.test.tssrc/main/network/first-party-tls-trust.tssrc/main/network/http-client.tssrc/main/orca-profiles/profile-cloud-client.test.tssrc/main/orca-profiles/profile-cloud-client.tssrc/main/orca-profiles/profile-cloud-org-members-client.test.tssrc/main/orca-profiles/profile-cloud-org-members-client.tssrc/main/runtime/first-party-fetch-proxy.test.tssrc/main/runtime/first-party-fetch.test.tssrc/main/runtime/first-party-fetch.tssrc/main/runtime/first-party-relay-websocket.test.tssrc/main/runtime/first-party-relay-websocket.tssrc/main/runtime/relay/relay-control-client-options.tssrc/main/runtime/relay/relay-control-client.test.tssrc/main/runtime/relay/relay-control-client.tssrc/main/runtime/relay/relay-http-client.test.tssrc/main/runtime/relay/relay-http-client.tssrc/main/runtime/relay/relay-region-preference.test.tssrc/main/runtime/relay/relay-region-preference.tssrc/main/runtime/rpc/relay-transport.test.tssrc/main/runtime/rpc/relay-transport.tstests/e2e/first-party-electron-http-policy.spec.ts
🚧 Files skipped from review as they are similar to previous changes (28)
- src/main/jira/client.test.ts
- src/main/runtime/first-party-fetch.ts
- src/main/index.ts
- config/scripts/build-first-party-node18-trust-smoke.mjs
- package.json
- src/main/runtime/first-party-fetch.test.ts
- src/main/host/electron-http-client.test.ts
- config/scripts/first-party-node18-trust-smoke-entry.ts
- src/main/global-fetch-call-site-audit.test.ts
- src/main/orca-profiles/profile-cloud-org-members-client.ts
- src/main/artifacts/artifact-cloud-request.ts
- src/main/orca-profiles/profile-cloud-client.ts
- src/main/runtime/relay/relay-region-preference.test.ts
- src/main/runtime/relay/relay-region-preference.ts
- src/main/network/http-client.ts
- src/main/runtime/first-party-fetch-proxy.test.ts
- config/scripts/smoke-first-party-node18-trust.mjs
- src/main/runtime/first-party-relay-websocket.ts
- src/main/runtime/rpc/relay-transport.test.ts
- src/main/runtime/relay/relay-http-client.ts
- src/main/runtime/rpc/relay-transport.ts
- src/main/network/first-party-tls-trust.ts
- src/main/runtime/relay/relay-http-client.test.ts
- config/reliability-gates.jsonc
- src/main/host/electron-http-client.ts
- tests/e2e/first-party-electron-http-policy.spec.ts
- config/scripts/package-electron-first-party-dispatcher-contract.test.mjs
- config/packaged-runtime-node-modules.cjs
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 6b9488da-1104-4db1-844b-9bdef827b39d
📒 Files selected for processing (2)
src/main/network/first-party-ca-certificates.test.tssrc/main/network/first-party-ca-certificates.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/main/network/first-party-ca-certificates.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Hi @Minidoracat! Could you test the latest signed ad-hoc build on the corporate/TLS-inspecting network where this issue originally occurred? Build: v1.4.189-adhoc.20260826043417 Downloads: Please test these four flows while connected to the managed/corporate network:
Please report the Orca version, OS version, which steps passed or failed, and any visible error code/message. Please do not share certificates, tokens, or other sensitive company information. Thank you! |
|
Happy to test this — with one correction to the premise first, because it affects how you triage other reports. This host is not a corporate or managed network. No proxy, no VPN, no corporate policy. The interception comes from a consumer-grade HTTPS-filtering tool installed locally, and it is per-application: on the same host, in the same minute, on the same network, a plain I have not installed the build yet, since it would replace the Orca I am currently working in. But the Windows trust path can be validated without installing, and I think that covers the highest-risk part of your question. Method. Injected into the already-intercepted Orca 1.4.188 main process (Electron 43.1.0) and ran the ad-hoc build's own Result.
So the Two things worth flagging in the meantime:
One more data point that may be useful for the release notes or a workaround section: on an affected host, pointing |
The rebase onto current main lands on a package-electron-runtime-contract.test.mjs that already sits at the max-lines ceiling (598 of 600 effective lines), so adding the packaged-undici assertion there fails `pnpm lint`. Move that one contract into its own file. The original suite returns to its main content unchanged, which also removes the only conflict surface this branch had against main.
9df26bc to
65b27b8
Compare
ELI5
On inspected corporate networks, the browser can trust the company certificate while Orca's Node-based Cloud and Relay connections reject it. This makes sign-in look successful, then Cloud or Relay fails. Orca now uses the operating system's trust at the process that actually owns each first-party connection, while keeping certificate and hostname verification on.
What Changed
The authoritative boundary is the host process performing the first-party request:
src/main/network/http-client.tssrc/main/network/first-party-ca-certificates.tssrc/main/network/first-party-tls-trust.tssrc/main/runtime/first-party-fetch.tssrc/main/runtime/first-party-relay-websocket.tsWhy
The reported failure is split trust authority: Chromium accepts the corporate TLS-inspection chain, while Node rejects the same chain during Cloud session exchange, Relay mint/assignment, and Relay control/data WSS.
Invariant: Node-hosted Orca Cloud and Relay HTTPS/WSS accept a host-trusted inspection chain without global trust mutation or disabling certificate or hostname checks.
Linked Issue
Fixes #13735
Related: #10758
Supersedes the landing path in #15208.
Visual Proof
N/A — this changes the network trust boundary and has no UI change.
Testing
The same byte-identical production-caller oracle was used for every comparison:
bfbc12e7ca447081f2fc28d6b584ef4a3c6ab63160f7b0ca355bab1b9f36a66332e630510ae85cf39e8c18fab0b6d541d14686a40e7e49c1636fa81cfe1809b7a3433d39b9ff42ee920ab3a79050011cf4f3c2d211d54e1723b25246a5adea5692a8100f698eUNABLE_TO_VERIFY_LEAF_SIGNATUREorigin/main5a8b4aff7b4450991cfa0558src/maintree restored byte-for-byte from latest mainExact primary command:
node config/scripts/build-first-party-node18-trust-smoke.mjs && \ ORCA_FIRST_PARTY_TRUST_SMOKE_NODE_MAJOR=18 npx -y node@18 config/scripts/smoke-first-party-node18-trust.mjsIndependent oracle signals:
ERR_TLS_CERT_ALTNAME_INVALID.Completed locally on macOS:
focused changed suites: 20 files, 155 passed / 3 platform-skipped
additional post-rebase focused suite: 10 files, 64 passed / 3 skipped
real HTTPS/WSS smoke under Node 18, 24, and 26
full typecheck, lint, quality/reliability/max-lines/Electron/skill/localization gates
frozen install and
build:unpackpackaged app
codesign --verify --deep --strictpackaged Undici
6.28.0real
smoke:orcad-terminalserver/worktree/terminal round tripreal Electron E2E:
tests/e2e/first-party-electron-http-policy.spec.ts, 1/1 passedI manually tested these changes locally
Automated tests added/updated
Review
Three fresh independent Luna reviews covered structural security, cross-platform compatibility, performance, and test-oracle quality. Valid findings were reproduced and fixed: HTTP method/content-type assertions, precise TLS causes, aggregate macOS timeout coverage, Windows partial-store recovery, and final merged Disallowed policy. Explicit WSS proxy tunneling remains out of scope; TLS validation is never disabled.
Known gap: no reporter has tested this exact rework on the original managed network. Keep the PR open until the signed ad-hoc build exercises all four Cloud/Relay legs on a managed network.
Required PR CI is now green: 51 jobs passed, including Windows packaging and first-party TLS on Node 18/24/26. A signed/notarized ad-hoc product build from
7a5b66fd33is published for that field test; current HEAD9df26bcccdiffers only by a POSIX test-fixture correction:https://github.com/stablyai/orca-adhoc/releases/tag/v1.4.189-adhoc.20260826043417
The original reporter has been asked on #13735 to test Cloud handoff/session exchange, Relay mint, HTTP assignment, and control/data WSS.
Agent skill upstream boundary
Notes
Checklist