Make the Service Worker to use foreignPartitionedPrinicpal for registration, intercept channels and spawning workers in dFPI
Categories
(Core :: Privacy: Anti-Tracking, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox96 | --- | fixed |
People
(Reporter: timhuang, Assigned: timhuang)
References
Details
Attachments
(5 files)
Bug 1731990 - Part 1: Using ForeignPartitionedPrincipal in ServiceWorkerInterceptController. r?asuth
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
To partition Service Worker, it has to use the partitionPrincipal to do the registration and spawning workers.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
This patch changes to use the foreign partitioned principal when check
if a channel needs to be intercepted by a certain service worker.
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
The patch modifies ServiceWorkerContainer::GetScopeForUrl() to use the
foreign partitioned principal.
Depends on D128731
Assignee | ||
Comment 3•3 years ago
|
||
We used to use the principal URL for the partitionKey in
ServiceWorkerPrivateImpl. This is correct if the ServiceWorker only
works in first-party context. But, it isn't correct in third-party
context.
To fix that, we can directly use the foreign paritioned principal from
the ServiceWorkerPrivate to get the partitionKey in third-party context.
For the first-party context, we can still use the original approach to
get the partitionKey.
Depends on D128732
Assignee | ||
Comment 4•3 years ago
|
||
This patch changes ServiceWorkerScriptCache to use the principal of the
service worker to populate the partitionKey to the cookieJarSettings.
The service workers are using foreign partitioned principal. This means
it will contain a correct partitionKey if it's in a third-party context.
So we can use it to populate the partitionKey. In the first-party
context, we can use the script uri to get the partionKey, which is the
original approach.
Depends on D128733
Assignee | ||
Comment 5•3 years ago
|
||
Depends on D128734
Comment 7•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/97d6cf760a47
https://hg.mozilla.org/mozilla-central/rev/738670a0e276
https://hg.mozilla.org/mozilla-central/rev/f023cff11d39
https://hg.mozilla.org/mozilla-central/rev/c6c7c0aa9519
https://hg.mozilla.org/mozilla-central/rev/dd8df905c0a8
Description
•