Security/Tracking protection
< Security
Description
Tracking Protection is a new platform-level technology that blocks HTTP loads at the network level. It is based on the Safe Browsing technology that powers our phishing and malware protection.
This feature is part of the Polaris initiative.
Prefs
- privacy.trackingprotection.enabled: to enable TP globally
- privacy.trackingprotection.pbmode.enabled: to enable TP in Private Browsing mode (not needed if the global pref is enabled)
- privacy.trackingprotection.ui.enabled: show a checkbox to toggle privacy.trackingprotection.enabled in the Preferences (Nightly only)
- privacy.trackingprotection.introCount
- privacy.trackingprotection.introURL: URL that kicks off the UI tour (target of the "See how this works" button in about:privatebrowsing)
- urlclassifier.disallow_completions: list of tables for which we never call gethash
- urlclassifier.trackingTable: list of tables to use when looking for trackers (they need to be named *-track-*)
- urlclassifier.trackingWhitelistTable: list of tables to use when checking whether or not a tracker is part of the same entity as the page (they need to be named *-trackwhite-*)
Firefox 42 and earlier:
- browser.trackingprotection.updateURL: server endpoint for downloading list updates
- browser.trackingprotection.gethashURL: server endpoint for completions
Firefox 43 and later:
- browser.safebrowsing.provider.mozilla.lists: list of tables coming from the Mozilla shavar service
- browser.safebrowsing.provider.mozilla.updateURL: server endpoint for downloading list updates
- browser.safebrowsing.provider.mozilla.gethashURL: server endpoint for completions
- browser.safebrowsing.provider.mozilla.lastupdatetime: timestamp (in ms) of when the last list update happened.
- browser.safebrowsing.provider.mozilla.nextupdatetime: timestamp (in ms) of when the list should next be downloaded.
Engineering
Lists
- Blacklist (mozstd-track-digest256)
- Upstream source
- Our copy (i.e. what we ship to clients in binary form)
- Submit feedback and track changes
- Excludes the Content and Legacy categories.
- "Strict" blacklist (mozfull-track-digest256) -- Firefox 43 and later
- Same as the default blacklist except that we also include the Content category.
- Entity whitelist (mozstd-trackwhite-digest256)
- Upstream source
- Our copy (i.e. what we ship to clients in binary form)
- Implemented in bug 1141352
- Legacy blacklist (mozpub-track-digest256) -- Firefox 41 and earlier
- Upstream source
- Exceptions (entries we remove from the upstream list)
- Final list (i.e. what we ship to clients in binary form)
- List creation script
- The script which generates all of the tracking protection lists in binary format.
- Prod/stage list configuration for the script
- The lists are stored in these files:
- ~/.cache/mozilla/firefox/XXXX/safebrowsing/mozstd-track* on Linux
- ~/Library/Caches/Firefox/Profiles/XXXX/safebrowsing/mozstd-track* on Mac
- C:\Users\XXXX\AppData\Local\mozilla\firefox\profiles\XXXX\safebrowsing\mozstd-track* on Windows
QA
- Bugzilla:
- Firefox::Tracking Protection for UI and general feature requests/bugs
- Toolkit::Safe Browsing for list updates and the actual blocking in necko
- Cloud Services::Server: Shavar for server-side bugs
- Breakage bugs
- Test pages
- Blacklist and whitelist using hardcoded values (start here)
- Standard blacklist (`mozstd-track-digest256` and `mozpub-track-digest256`)
- Strict blacklist (`mozfull-track-digest256`)
- Test URLS
- itisatrap.org and trackertest.org: blocked by test-track-simple
- itisatrap.com: blocked by mozstd-track-digest256 and mozfull-track-digest256
- itisatrap.org/?resource=itisatracker.org: whitelisted in test-trackwhite-simple
- Test plan for Fx42
- Shavar test plan (includes end-to-end tests)
- One and Done task
- Script to dump the contents of mozpub-track-digest256* files
To turn on debugging output, export the following environment variable:
NSPR_LOG_MODULES="UrlClassifierDbService:5,nsChannelClassifier:5"
To produce the "digest256" hash that sbdbdump -v will contain for example.com:
echo -n "example.com/" | sha256sum 7fc983ea552f7c8d153fc308d621eb4f52e84aa63ecccf3a735698a11a2a4a8d
Telemetry
- TRACKING_PROTECTION_ENABLED: sessions with tracking protection enabled globally
- TRACKING_PROTECTION_EVENTS
- TRACKING_PROTECTION_PBM_DISABLED: whether or not tracking protection in private browsing mode is disabled
- TRACKING_PROTECTION_SHIELD: whether the shield is shown (crossed-out or not) on a page load