Closed Bug 1616788 Opened 6 years ago Closed 6 years ago

New Anti-Tracking permission model

Categories

(Core :: Privacy: Anti-Tracking, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: dimi, Assigned: timhuang)

References

Details

Attachments

(6 files)

Permission manager is now using principal as the permission key and permission type, and these information are exposed to child processes.

In fission, we are going to remove the use of permission manager in the child processes, and use hashed principals to look permissions up in WindowContext.

Depends on: 1612385
Assignee: nobody → tihuang
Status: NEW → ASSIGNED

We add a flag 'HasStoragePermission' in the LoadInfo. This flag
represents whether the loading document, for docuemnt loads, or the
loading resource has the storage permission. And this flag would only
get updated in the parent process when opening the channel.

Because we're going to check the storage permission outside the file
ContentBlocking.cpp. So we move the CheckAntiTrackingPermission() function
which was in the ContentBlocking.cpp to AntiTrackingUtils. And we rename
it to CheckStoragePermission() which is more clear.

Depends on D67466

In order to pre-calculate the storage permissio in the parent process,
we add a CheckStoragePermissionInParent() function to check the
permission in the parent process.

Depends on D67467

We do the pre-calculation of the storage permission in the parent
process when opening the channel.

Depends on D67468

We propagate the HasStoragePermission flag from the loadInfo to the
WindowContext in the patch. We add a flag HasStoragePermission in the
document and this flag will get updated when the
Document::StartDocumentLoad() happens. And then, we would sync this to
the WindowContext in the final stage of the
nsGlobalWindowOuter::SetNewDocument() where the WindowContext is ready.

Depends on D67470

Blocks: 1624268

We made a modification to our new permission model. We no longer rely on the hashed principal approach. Instead, we will pre-calculate the storage permission check result in the parent process when opening the channel. We propagate the result as a flag with the LoadInfo to the content process. Once the content process gets the flag, it will sync this flag to the WindowContext.

This bug would only handle the pre-calculation and the propagation of the permission check result. The flag updating would be addressed in Bug 1624268.

Pushed by tihuang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/739cb622736c Part 1: Add a hasStoragePermission flag in the LoadInfo. r=dimi,baku https://hg.mozilla.org/integration/autoland/rev/bba7aab05b72 Part 2: Moving the CheckAntiTrackingPermission() to AntiTrackingUtils and rename it to CheckStoragePermission(). r=dimi,baku https://hg.mozilla.org/integration/autoland/rev/124c24753bca Part 3: Add a AntiTrackingUtils::CheckStoragePermissionInParent() to check the storage permssion of a channel in parent. r=dimi,baku https://hg.mozilla.org/integration/autoland/rev/f6180c9bfdf4 Part 4: Set the hasStoragePermission when opening the channel in the parent process. r=dimi,baku https://hg.mozilla.org/integration/autoland/rev/d82ee126aceb Part 5: Add a field HasStoragePermission in the WindowContext. r=dimi,baku,farre https://hg.mozilla.org/integration/autoland/rev/05e0f36e1ef9 Part 6: Propagate the HasStoragePermission from the loadInfo to the WindowContext. r=dimi,baku
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: