Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[spec] Allow createWorklet() in opaque origin contexts #156

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

xyaoinum
Copy link
Collaborator

@xyaoinum xyaoinum commented May 29, 2024

In opaque origin contexts (e.g. sandboxed iframes), we now allow window.createWorklet(url) and allow selectURL()/run() on the resulting worklet object. Those methods were previously disallowed in opaque origin contexts.

Reason: While direct storage access is typically disallowed in sandboxed iframe, that's more of a side effect of having an opaque origin, rather than the original intent of sandboxing. Thus, it should be okay to allow creating new non-opaque contexts via createWorklet(url), and the new contexts can further access shared storage. This enables more flexible functionality within the sandboxed environment while still adhering to the security principles of sandboxing.


Preview | Diff

In opaque origin contexts (e.g. sandboxed iframes), we now allow window.createWorklet(url) and allow selectURL()/run() on the resulting worklet object. Those methods were previously disallowed in opaque origin contexts.

Reason: While direct storage access is typically disallowed in sandboxed iframe, that's more of a side effect of having an opaque origin, rather than the original intent of sandboxing. Thus, it should be okay to allow creating new non-opaque contexts via createWorklet(url), and the new contexts can further access shared storage. This enables more flexible functionality within the sandboxed environment while still adhering to the security principles of sandboxing.
spec.bs Outdated Show resolved Hide resolved
Copy link
Collaborator

@pythagoraskitty pythagoraskitty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % comment

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 6, 2024
PR: WICG/shared-storage#156

Bug: 345274915
Change-Id: I748df668635d77a2d158bd86222aa2fdecfed3eb
@xyaoinum xyaoinum merged commit c375c8d into main Jun 6, 2024
1 check passed
@xyaoinum xyaoinum deleted the yao-allow-createworklet-in-opaque-origin branch June 6, 2024 22:31
github-actions bot added a commit that referenced this pull request Jun 6, 2024
…rigin

SHA: c375c8d
Reason: push, by xyaoinum

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 7, 2024
PR: WICG/shared-storage#156

Bug: 345274915
Change-Id: I748df668635d77a2d158bd86222aa2fdecfed3eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5564969
Reviewed-by: Cammie Smith Barnes <[email protected]>
Commit-Queue: Yao Xiao <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1311659}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 7, 2024
PR: WICG/shared-storage#156

Bug: 345274915
Change-Id: I748df668635d77a2d158bd86222aa2fdecfed3eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5564969
Reviewed-by: Cammie Smith Barnes <[email protected]>
Commit-Queue: Yao Xiao <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1311659}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jun 12, 2024
…n opaque origin contexts, a=testonly

Automatic update from web-platform-tests
[shared storage] Allow createWorklet() in opaque origin contexts

PR: WICG/shared-storage#156

Bug: 345274915
Change-Id: I748df668635d77a2d158bd86222aa2fdecfed3eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5564969
Reviewed-by: Cammie Smith Barnes <[email protected]>
Commit-Queue: Yao Xiao <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1311659}

--

wpt-commits: ffb30418af724f933a640e1142b349b10e129be7
wpt-pr: 46649
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Jun 14, 2024
…n opaque origin contexts, a=testonly

Automatic update from web-platform-tests
[shared storage] Allow createWorklet() in opaque origin contexts

PR: WICG/shared-storage#156

Bug: 345274915
Change-Id: I748df668635d77a2d158bd86222aa2fdecfed3eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5564969
Reviewed-by: Cammie Smith Barnes <[email protected]>
Commit-Queue: Yao Xiao <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1311659}

--

wpt-commits: ffb30418af724f933a640e1142b349b10e129be7
wpt-pr: 46649
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.

None yet

2 participants