Skip to content

fix(security): thread relay token + trusted origin to session recorder (RQ-3095, RQ-3096) - #97

Open
dinex-dev wants to merge 1 commit into
masterfrom
fix/websdk-relay-origin-validation
Open

fix(security): thread relay token + trusted origin to session recorder (RQ-3095, RQ-3096)#97
dinex-dev wants to merge 1 commit into
masterfrom
fix/websdk-relay-origin-validation

Conversation

@dinex-dev

Copy link
Copy Markdown
Member

What & why

Wires the session-recorder relay auth (RQ-3095, RQ-3096) end to end. The service worker mints one stable relayToken per recording plus the top-frame origin, and the content script forwards both into the SessionRecorder SDK options. Result: cross-origin iframe relay is authenticated (token) and no longer broadcast to untrusted frames (trustedOrigin).

Changes

  • browser-extension/common/src/types.ts — add optional relayToken / trustedOrigin to SessionRecordingConfig.
  • browser-extension/mv3/src/service-worker/services/sessionRecording.tswithRelayAuth() mints/keeps a stable token + top origin; applied at both startRecording broadcast sites (broadcast reaches every frame, so top and iframes share the same token).
  • browser-extension/mv3/src/content-scripts/common/sessionRecorder.ts — forward both fields into the SDK options.

Testing

  • Built the extension with the updated SDK and verified cross-page recording is unaffected — A/B compared against a stock build, identical behavior.
  • Relay auth verified via the SDK's two-origin harness.

Dependency / release ordering ⚠️

Depends on the paired SDK change: requestly/requestly-web-sdk#18.

Before release: publish the new @requestly/web-sdk version and bump the pin in browser-extension/mv3/package.json (currently 0.15.1). The release runs a clean npm install, which would otherwise pull the old SDK without relay-auth support and silently ship without the fix.

🤖 Generated with Claude Code

…r (RQ-3095, RQ-3096)

Mint a stable per-recording relayToken and the top-frame origin in the service worker and forward them through the content script into the SessionRecorder SDK options, so cross-origin iframe relay is authenticated (token) and not broadcast to untrusted frames (trustedOrigin). Requires @requestly/web-sdk with the matching relay-auth support.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant