feat: machine-id firewall header — bundled mesh core (Host fix) + openframe-client - #1688
feat: machine-id firewall header — bundled mesh core (Host fix) + openframe-client#1688mikhailm-coder wants to merge 10 commits into
Conversation
…ine-id headers Refreshes the ARTIFACTORY-served CoreModule.js snapshot from the meshagent hotfix/machine-id-header branch: in openFrameMode the core now stamps x-machine-id (read from the shared OpenFrame machine_id file) and an Authorization bearer token on tunnel, download, and self-update requests. On agent binaries that predate the openFrameMode JS property the new code is a silent no-op, so the core can roll out ahead of the binaries. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughOpenFrame support adds conditional machine ID, bearer authorization, and host headers to outbound HTTP and WebSocket requests. The changes cover tunnels, downloads, file transfers, console connections, and agent self-updates. Tunnel diagnostic logging and minor formatting artifacts were removed. ChangesOpenFrame request headers
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Sync the ARTIFACTORY-served CoreModule.js with meshagent: addOpenFrameHeaders now restores the Host header the duktape http client drops once a headers object is present, so openFrame-mode relay/tunnel/download dials reach the gateway instead of getting rejected host-less. Fixes remote sessions stuck "connecting" on the 0.1.0 mesh binary — served to installed agents with no binary rebuild. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@openframe-client-core/src/main/resources/meshcentral-core-module`:
- Around line 1049-1052: Update the token injection block to require both
mesh.openFrameMode and a truthy result from mesh.authToken() before appending
the authorization query parameter. Preserve the existing separator handling, and
URL-encode the token value before adding it so null, undefined, and empty tokens
are never sent.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: ea83797b-82db-48e5-a819-c97ea6acfdab
📒 Files selected for processing (1)
openframe-client-core/src/main/resources/meshcentral-core-module
…connections Port of the machine-id-header client work from openframe-oss-tenant (hotfix/machine-id-header). MachineIdService persists a locally generated UUID in the shared app-support dir (read by mesh/fleet tool agents) and stamps it as x-machine-id on the HTTP clients, the NATS connection, and the NATS log stream (replacing the openframe-client placeholder). The server-assigned machine_id still names the NATS connection. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… token Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The oss-lib side of the machine-id firewall-header work, combining the mesh core and client changes (folds in the former #1729).
Mesh core (
openframe-client-core/src/main/resources/meshcentral-core-module)CoreModule.js: in OpenFrame mode the served core stampsx-machine-id(+ Authorization) on tunnel/download/self-update requests.96954f407):addOpenFrameHeadersnow setsHost, fixing the Remote Desktop relay regression the 0.1.0 mesh binary otherwise triggers (a duktape-http quirk drops Host onceoptions.headersexists). Verified working live.Client (
clients/openframe-client/)MachineIdService: generates a localUuid::v4(), persists it to the shared app-supportmachine_idfile (read by the mesh/fleet tool agents), cached behindArc<RwLock>.x-machine-idon the HTTP clients, the NATS control connection, and the NATS log stream (replacing the"openframe-client"placeholder). Server-assignedmachine_idstill names the NATS connection.openframe-agent-lib.cargo check --features bin+cargo fmt --checkpass. Companion PRs: meshagent #78, fleetmdm #96.🤖 Generated with Claude Code