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

[Explainer] Support custom dataOrigin in createWorklet #198

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

pythagoraskitty
Copy link
Collaborator

@pythagoraskitty pythagoraskitty commented Sep 20, 2024

We have developers currently testing the Shared Storage API who have indicated they want to be able to run their worklet on a different origin from the origin that wrote the data. In particular, one of these two actions may be served by, e.g., a CDN, and the other by another domain.

Third-party cookies allow sharing data at the site level. The current architecture of shared storage, however, only allows the invoking context's origin for addModule()/createWorklet() to be used as the shared storage data partition origin, or in the case of createWorklet(), the worklet script's origin may be manually selected as the data partition origin using the option dataOrigin: "script-origin".

We suggest making it possible for a worklet script to use shared storage data from an arbitrary origin other than the worklet script's origin or the invoking context's origin. The data origin would have to opt-in for data use to occur, as data processing could modify the data origin's data, send reports, and would affect its shared storage privacy budget.

While the worklet script will be able to process the data origin's data within a shared storage worklet, the current restrictions will remain in place on output of shared storage data.

We have developers currently testing the Shared Storage API who have indicated they want to be able to run their worklet on a different origin from the origin that wrote the data. In particular, one of these two actions may be served by, e.g., a CDN, and the other by another domain.  

Third-party cookies allow sharing data at the site level. The current architecture of shared storage, however, only allows the invoking context's origin for `addModule()`/`createWorklet()` to be used as the shared storage data partition origin, or in the case of `createWorklet()`, the worklet script's origin may be manually selected as the data partition origin using the option `dataOrigin: "script-origin"`.

We suggest making it possible for a worklet script to use shared storage data from an arbitrary origin other than the worklet script's origin or the invoking context's origin on an opt-in basis. The data-owning origin would have to opt-in for data use to occur, as data processing could modify the data origin's, send reports, and would affect its shared storage privacy budget. 

While the worklet script will be able to process the data-owning origin's data within a shared storage worklet, the current restrictions will remain in place on output of shared storage data.
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
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.

2 participants