Closed Bug 1635050 Opened 5 years ago Closed 5 years ago

Implement something similar to urlclassifier.trackingAnnotationSkipURLs pref for REJECT_FOREIGN with exceptions

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: baku, Assigned: baku)

References

Details

Attachments

(2 files, 1 obsolete file)

We need a way to whitelist 3rd-parties when cookieBehavior is set to REJECT_FOREIGN + exceptions. To achieve this result, we need to:

  1. whitelist any channel that matches at least 1 entry of urlclassifier.trackingAnnotationSkipURLs
  2. whitelist any window with a document matching the same list.
Assignee: nobody → amarchesini
Status: NEW → ASSIGNED
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/451a90be5f40 Implement a whitelist system for cookieBehavior REJECT_FOREIGN with exceptions, r=dimi https://hg.mozilla.org/integration/autoland/rev/fff7bc5ac710 Implement a whitelist system for cookieBehavior REJECT_FOREIGN with exceptions - tests, r=dimi
Regressions: 1635248
Flags: needinfo?(amarchesini)
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/68223def5ae0 Implement a whitelist system for cookieBehavior REJECT_FOREIGN with exceptions, r=dimi https://hg.mozilla.org/integration/autoland/rev/74460d65e93b Implement a whitelist system for cookieBehavior REJECT_FOREIGN with exceptions - tests, r=dimi
Regressions: 1635397
Flags: needinfo?(amarchesini)
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0e97bebb71cd Implement a whitelist system for cookieBehavior REJECT_FOREIGN with exceptions, r=dimi https://hg.mozilla.org/integration/autoland/rev/062b5f3c2b9d Implement a whitelist system for cookieBehavior REJECT_FOREIGN with exceptions - tests, r=dimi

Comment on attachment 9145919 [details]
Bug 1635050 - UrlClassifierSkipListService calls the observers even when RemoteSettings have not been received yet, r?johannh

Revision D73925 was moved to bug 1636371. Setting attachment 9145919 [details] to obsolete.

Attachment #9145919 - Attachment is obsolete: true
Flags: needinfo?(amarchesini)
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/62ac56e51fa7 Implement a whitelist system for cookieBehavior REJECT_FOREIGN with exceptions, r=dimi https://hg.mozilla.org/integration/autoland/rev/b8e4f5d65b71 Implement a whitelist system for cookieBehavior REJECT_FOREIGN with exceptions - tests, r=dimi

Backed out for failures on test_rejectForeignAllowList.js

backout: https://hg.mozilla.org/integration/autoland/rev/482cc7d0605c47687d89de9f371dd4f62e1b8080

push: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=b8e4f5d65b71fdd903a5d56ee8d53dddecf22774&group_state=expanded&selectedTaskRun=dHKzVE8ZTR2QMI7-5EqM8w-0

failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=301380384&repo=autoland&lineNumber=6409

TEST-UNEXPECTED-FAIL | toolkit/components/antitracking/test/xpcshell/test_rejectForeignAllowList.js | xpcshell return code: 0
[..]
[task 2020-05-08T07:18:42.234Z] 07:18:42 INFO - TEST-PASS | toolkit/components/antitracking/test/xpcshell/test_rejectForeignAllowList.js | test_rejectForeignAllowList - [test_rejectForeignAllowList : 83] Cookies received? - "" == ""
[task 2020-05-08T07:18:42.234Z] 07:18:42 INFO - PID 12012 | [12012, Main Thread] WARNING: '!inner', file /builds/worker/checkouts/gecko/dom/ipc/JSWindowActorProtocol.cpp, line 172
[task 2020-05-08T07:18:42.234Z] 07:18:42 INFO - PID 12012 | [12012, Main Thread] WARNING: NS_ENSURE_TRUE(rootFrame) failed: file /builds/worker/checkouts/gecko/dom/base/nsGlobalWindowOuter.cpp, line 4324
[task 2020-05-08T07:18:42.235Z] 07:18:42 INFO - PID 12012 | [12012, Main Thread] WARNING: NS_ENSURE_TRUE(rootFrame) failed: file /builds/worker/checkouts/gecko/dom/base/nsGlobalWindowOuter.cpp, line 4324
[task 2020-05-08T07:18:42.235Z] 07:18:42 INFO - "CONSOLE_MESSAGE: (warn) [JavaScript Warning: "Request to access cookie or storage on “http://3rdparty.org/iframe” was blocked because we are blocking all third-party storage access requests and content blocking is enabled."]"
[task 2020-05-08T07:18:42.235Z] 07:18:42 WARNING - TEST-UNEXPECTED-FAIL | toolkit/components/antitracking/test/xpcshell/test_rejectForeignAllowList.js | test_rejectForeignAllowList - [test_rejectForeignAllowList : 52] Cookies received? - "" == "cookie=wow"
[task 2020-05-08T07:18:42.235Z] 07:18:42 INFO - Z:/task_1588921096/build/tests/xpcshell/tests/toolkit/components/antitracking/test/xpcshell/test_rejectForeignAllowList.js:testThings:52
[task 2020-05-08T07:18:42.235Z] 07:18:42 INFO - exiting test
[task 2020-05-08T07:18:42.235Z] 07:18:42 INFO - Unexpected exception NS_ERROR_ABORT:
[task 2020-05-08T07:18:42.235Z] 07:18:42 INFO - _abort_failed_test@Z:\task_1588921096\build\tests\xpcshell\head.js:805:20
[task 2020-05-08T07:18:42.235Z] 07:18:42 INFO - do_report_result@Z:\task_1588921096\build\tests\xpcshell\head.js:906:5
[task 2020-05-08T07:18:42.235Z] 07:18:42 INFO - Assert<@Z:\task_1588921096\build\tests\xpcshell\head.js:67:21
[task 2020-05-08T07:18:42.235Z] 07:18:42 INFO - proto.report@resource://testing-common/Assert.jsm:233:10
[task 2020-05-08T07:18:42.235Z] 07:18:42 INFO - equal@resource://testing-common/Assert.jsm:275:8
[task 2020-05-08T07:18:42.236Z] 07:18:42 INFO - testThings@Z:/task_1588921096/build/tests/xpcshell/tests/toolkit/components/antitracking/test/xpcshell/test_rejectForeignAllowList.js:52:10
[task 2020-05-08T07:18:42.236Z] 07:18:42 INFO - asynctest_rejectForeignAllowList@Z:/task_1588921096/build/tests/xpcshell/tests/toolkit/components/antitracking/test/xpcshell/test_rejectForeignAllowList.js:141:9
[task 2020-05-08T07:18:42.236Z] 07:18:42 INFO - async
_run_next_test/<@Z:\task_1588921096\build\tests\xpcshell\head.js:1582:22
[task 2020-05-08T07:18:42.236Z] 07:18:42 INFO - _run_next_test@Z:\task_1588921096\build\tests\xpcshell\head.js:1582:38
[task 2020-05-08T07:18:42.236Z] 07:18:42 INFO - run@Z:\task_1588921096\build\tests\xpcshell\head.js:749:9
[task 2020-05-08T07:18:42.236Z] 07:18:42 INFO - _do_main@Z:\task_1588921096\build\tests\xpcshell\head.js:242:6
[task 2020-05-08T07:18:42.236Z] 07:18:42 INFO - _execute_test@Z:\task_1588921096\build\tests\xpcshell\head.js:571:5
[task 2020-05-08T07:18:42.236Z] 07:18:42 INFO - @-e:1:1
[task 2020-05-08T07:18:42.236Z] 07:18:42 INFO - exiting test

Flags: needinfo?(amarchesini)

I forgot to set the dependency to bug 1635693 before landing the patches.

Flags: needinfo?(amarchesini)
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ca35e729ea3e Implement a whitelist system for cookieBehavior REJECT_FOREIGN with exceptions, r=dimi https://hg.mozilla.org/integration/autoland/rev/9ac5cff04d6c Implement a whitelist system for cookieBehavior REJECT_FOREIGN with exceptions - tests, r=dimi
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/194144d29492 Implement a whitelist system for cookieBehavior REJECT_FOREIGN with exceptions, r=dimi https://hg.mozilla.org/integration/autoland/rev/3fc14ac3b819 Implement a whitelist system for cookieBehavior REJECT_FOREIGN with exceptions - tests, r=dimi
Flags: needinfo?(amarchesini)
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78

Comment on attachment 9145403 [details]
Bug 1635050 - Implement a whitelist system for cookieBehavior REJECT_FOREIGN with exceptions, r?dimi

Beta/Release Uplift Approval Request

  • User impact if declined: We would like to run an experiment using REJECT_FOREIGN with exception in the next beta and this whitelist is needed.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This feature introduces a simple whitelist for hosts. It's low risk
  • String changes made/needed: none
Attachment #9145403 - Flags: approval-mozilla-beta?
Attachment #9145404 - Flags: approval-mozilla-beta?

There is no next beta, the next beta will be 78 beta 1 in a few days as we are in RC week for 77 and these patches landed in 78.

Flags: needinfo?(amarchesini)

I guess we cannot have these patches in 77. Is it OK for our experiments?

Flags: needinfo?(amarchesini) → needinfo?(senglehardt)

(In reply to Andrea Marchesini [:baku] from comment #20)

I guess we cannot have these patches in 77. Is it OK for our experiments?

That's okay, we can run the experiment during the 78 cycle. Thanks for trying to uplift!

Flags: needinfo?(senglehardt)
Attachment #9145403 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
Attachment #9145404 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: