Closed Bug 1824222 Opened 2 years ago Closed 1 year ago

Create a Remote Settings-based override mechanism for RFP Targets

Categories

(Core :: Privacy: Anti-Tracking, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox120 --- fixed

People

(Reporter: tjr, Assigned: timhuang)

References

(Regressed 1 open bug)

Details

(Whiteboard: [fpp:m5])

Attachments

(8 files)

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
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

For WebCompat-and-unbreaking-websites-reasons, we want to have a Remote Settings buckets that will allow us to specify RFP Lite overrides on a per-site basis.

We don't want to add checking the site into the hot path of IsRFPEnabledFor; I envision us having some variable at the Document level (? perhaps? not sure exactly where) populated upon initialization that will tell us if we have a webcompat override we need to check for.

Whiteboard: [fpp:m?]
Component: General → Privacy: Anti-Tracking
Product: Firefox → Core
Assignee: nobody → tihuang
Status: NEW → ASSIGNED
See Also: → 1832845
Depends on: 1834274
Whiteboard: [fpp:m?] → [fpp:m5]

This patch adds a new attribute called FingerprintingTargets to
nsILoadInfo. The FingerprintingTargets attribute contains the RFPTarget
flags that will be used to decide the fingerprinting protection behavior
of the corresponding channel.

This patch implements two helper functions in nsRFPService for getting
the RFPTargets that apply to the given context. The helper functions
will return the overridden RFPTargets if there is a fingerprinting
WebCompat override for the context. Otherwise, it will return Nothing().
Then, the context will use the default RFPTargets.

Depends on D185011

We populate the fingerprinting targets to the loadInfo when updating
AntiTracking Info for the channel. This happens when we open the channel
in the parent process, so we have every info we need to get the
RFPTargets for the channel.

Depends on D185012

To allow workers to know the fingerprinting targets, we populate the
fingerprinting targets to the worker loadInfo and worker private from
the document.

For service workers, we use the partitionKey in its principal to get the
RFPTargets of the given service worker.

Depends on D185013

Attachment #9346631 - Attachment description: Bug 1824222 - Add a FingerprintingTargets attribute to nsILoadInfo. r?tjr!,#necko! → Bug 1824222 - Add a RFPTargetMask attribute to nsILoadInfo. r?tjr!,#necko!
Attachment #9346632 - Attachment description: Bug 1824222 - Implement nsRFPService::GetRFPTargetsForChannel() and nsRFPService::GetRFPTargetsForURI(). r?tjr → Bug 1824222 - Implement nsRFPService::GetRFPTargetMaskForChannel() and nsRFPService::GetRFPTargetMaskForURI(). r?tjr
Attachment #9346633 - Attachment description: Bug 1824222 - Populate the fingerprinting targets to the loadInfo when opening http channels. r?tjr!,#anti-tracking! → Bug 1824222 - Populate the RFPTargetMask to the loadInfo when opening channels. r?tjr!,#anti-tracking!
Attachment #9346635 - Attachment description: Bug 1824222 - Add fingerprintingTargets to worker loadInfo. r?tjr!,#dom-workers! → Bug 1824222 - Add RFPTargetMask to worker loadInfo. r?tjr!,#dom-workers!
Attachment #9346636 - Attachment description: Bug 1824222 - Add fingerprinting targets to worklet implementation. r?tjr!,#dom-workers! → Bug 1824222 - Add RFPTarget mask to worklet implementation. r?tjr!,#dom-workers!

This patch adds a field called RFPTargetMask to WindowContext. The
RFPTargetMask represents the applied RFPTarget due to WebCompat for
the given context. The RFPTargetMask can be Nothing() if there is no
RFPTarget for the context.

Depends on D185015

Attachment #9346637 - Attachment description: Bug 1824222 - Make nsRFPService::IsRFPEnabledFor() to use the given fingerprinting targets for checking RFPTargets. r?tjr → Bug 1824222 - Make nsRFPService::IsRFPEnabledFor() to use the given RFPTarget mask for checking RFPTargets. r?tjr
Attachment #9346631 - Attachment description: Bug 1824222 - Add a RFPTargetMask attribute to nsILoadInfo. r?tjr!,#necko! → Bug 1824222 - Add a GranularFingerprintingProtections attribute to nsILoadInfo. r?tjr!,#necko!
Attachment #9346632 - Attachment description: Bug 1824222 - Implement nsRFPService::GetRFPTargetMaskForChannel() and nsRFPService::GetRFPTargetMaskForURI(). r?tjr → Bug 1824222 - Implement nsRFPService::GetGranularFingerprintingProtectionsForChannel() and nsRFPService::GetGranularFingerprintingProtectionsForURI(). r?tjr
Attachment #9346633 - Attachment description: Bug 1824222 - Populate the RFPTargetMask to the loadInfo when opening channels. r?tjr!,#anti-tracking! → Bug 1824222 - Populate the GranularFingerprintingProtections to the loadInfo when opening channels. r?tjr!,#anti-tracking!
Attachment #9346635 - Attachment description: Bug 1824222 - Add RFPTargetMask to worker loadInfo. r?tjr!,#dom-workers! → Bug 1824222 - Add GranularFingerprintingProtections to worker loadInfo. r?tjr!,#dom-workers!
Attachment #9346636 - Attachment description: Bug 1824222 - Add RFPTarget mask to worklet implementation. r?tjr!,#dom-workers! → Bug 1824222 - Add GranularFingerprintingProtections to worklet implementation. r?tjr!,#dom-workers!
Attachment #9354197 - Attachment description: Bug 1824222 - Add RFPTargetMask to WindowContex. r?nika → Bug 1824222 - Add GranularFingerprintingProtections to WindowContex. r?nika
Attachment #9346637 - Attachment description: Bug 1824222 - Make nsRFPService::IsRFPEnabledFor() to use the given RFPTarget mask for checking RFPTargets. r?tjr → Bug 1824222 - Make nsRFPService::IsRFPEnabledFor() to use the given GranularFingerprintingProtections for checking RFPTargets. r?tjr
Attachment #9354197 - Attachment description: Bug 1824222 - Add GranularFingerprintingProtections to WindowContex. r?nika → Bug 1824222 - Add GranularFingerprintingProtections to WindowContext. r?nika
Attachment #9346631 - Attachment description: Bug 1824222 - Add a GranularFingerprintingProtections attribute to nsILoadInfo. r?tjr!,#necko! → Bug 1824222 - Add an OverriddenFingerprintingSettings attribute to nsILoadInfo. r?tjr!,#necko!
Attachment #9346632 - Attachment description: Bug 1824222 - Implement nsRFPService::GetGranularFingerprintingProtectionsForChannel() and nsRFPService::GetGranularFingerprintingProtectionsForURI(). r?tjr → Bug 1824222 - Implement nsRFPService::GetOverriddenFingerprintingSettingsForChannel() and nsRFPService::GetOverriddenFingerprintingSettingsForURI(). r?tjr
Attachment #9346633 - Attachment description: Bug 1824222 - Populate the GranularFingerprintingProtections to the loadInfo when opening channels. r?tjr!,#anti-tracking! → Bug 1824222 - Populate the OverriddenFingerprintingSettings to the loadInfo when opening channels. r?tjr!,#anti-tracking!
Attachment #9346635 - Attachment description: Bug 1824222 - Add GranularFingerprintingProtections to worker loadInfo. r?tjr!,#dom-workers! → Bug 1824222 - Add OverriddenFingerprintingSettings to worker loadInfo. r?tjr!,#dom-workers!
Attachment #9346636 - Attachment description: Bug 1824222 - Add GranularFingerprintingProtections to worklet implementation. r?tjr!,#dom-workers! → Bug 1824222 - Add OverriddenFingerprintingSettings to worklet implementation. r?tjr!,#dom-workers!
Attachment #9354197 - Attachment description: Bug 1824222 - Add GranularFingerprintingProtections to WindowContext. r?nika → Bug 1824222 - Add OverriddenFingerprintingSettings to WindowContext. r?nika
Attachment #9346637 - Attachment description: Bug 1824222 - Make nsRFPService::IsRFPEnabledFor() to use the given GranularFingerprintingProtections for checking RFPTargets. r?tjr → Bug 1824222 - Make nsRFPService::IsRFPEnabledFor() to use the given OverriddenFingerprintingSettings for checking RFPTargets. r?tjr
Pushed by tihuang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/715544da3680 Add an OverriddenFingerprintingSettings attribute to nsILoadInfo. r=tjr,necko-reviewers,jesup https://hg.mozilla.org/integration/autoland/rev/5b8d471da06a Implement nsRFPService::GetOverriddenFingerprintingSettingsForChannel() and nsRFPService::GetOverriddenFingerprintingSettingsForURI(). r=tjr https://hg.mozilla.org/integration/autoland/rev/2fbe112ecfc5 Populate the OverriddenFingerprintingSettings to the loadInfo when opening channels. r=tjr,anti-tracking-reviewers,pbz,necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/20f6d83fc16e Add OverriddenFingerprintingSettings to worker loadInfo. r=tjr,dom-worker-reviewers,smaug https://hg.mozilla.org/integration/autoland/rev/cc0c3dfd4df6 Add OverriddenFingerprintingSettings to worklet implementation. r=tjr,dom-worker-reviewers,smaug https://hg.mozilla.org/integration/autoland/rev/39c8dd874538 Add OverriddenFingerprintingSettings to WindowContext. r=nika,tjr https://hg.mozilla.org/integration/autoland/rev/df86323db0a6 Make nsRFPService::IsRFPEnabledFor() to use the given OverriddenFingerprintingSettings for checking RFPTargets. r=tjr https://hg.mozilla.org/integration/autoland/rev/f7b4c2978169 Add tests to verify fingerprinting WebCompat. r=tjr,anti-tracking-reviewers,bvandersloot
Regressions: 1859682
Regressions: 1861553
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: