fix(security): thread relay token + trusted origin to session recorder (RQ-3095, RQ-3096) - #97
Open
dinex-dev wants to merge 1 commit into
Open
fix(security): thread relay token + trusted origin to session recorder (RQ-3095, RQ-3096)#97dinex-dev wants to merge 1 commit into
dinex-dev wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Wires the session-recorder relay auth (RQ-3095, RQ-3096) end to end. The service worker mints one stable
relayTokenper recording plus the top-frame origin, and the content script forwards both into theSessionRecorderSDK 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 optionalrelayToken/trustedOrigintoSessionRecordingConfig.browser-extension/mv3/src/service-worker/services/sessionRecording.ts—withRelayAuth()mints/keeps a stable token + top origin; applied at bothstartRecordingbroadcast 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
Dependency / release ordering⚠️
Depends on the paired SDK change: requestly/requestly-web-sdk#18.
Before release: publish the new
@requestly/web-sdkversion and bump the pin inbrowser-extension/mv3/package.json(currently0.15.1). The release runs a cleannpm install, which would otherwise pull the old SDK without relay-auth support and silently ship without the fix.🤖 Generated with Claude Code