Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate first party ephemeral storage with domain block functionality #19099

Closed
goodov opened this issue Oct 29, 2021 · 3 comments · Fixed by brave/brave-core#10339
Closed

Comments

@goodov
Copy link
Member

goodov commented Oct 29, 2021

Add logic to automatically enable first party ephemeral storage (1PES) for a domain when a user proceeds the blocked top level domain interstitial.

Related:
#14134
#15906

@stephendonner
Copy link

Hi @goodov; mind providing us with a test plan for this one? Thanks!

@goodov
Copy link
Member Author

goodov commented Dec 28, 2021

Hi @goodov; mind providing us with a test plan for this one? Thanks!

Sure! Some context first: currently if a user visits a first-party-blocked website, we show an interstitial in Aggressive blocking mode, however in Standard blocking the website is loaded as usual. The change we're adding here will enable 1PES for such websites in Standard blocking mode if no data (cookies, localStorage) was stored for a website previously.

Test cases

Prerequisites:

  1. Enable features on brave://flags: First Party Ephemeral Storage, Domain blocking using First Party Ephemeral Storage.

Case 1

  1. Open any website (that was not previously opened in a browser profile) from this list
  2. Expect the website is added in Sites that clear cookies when you close them section at brave://settings/cookies:
    image
  3. Expect no cookies or localStorage data is stored for a website.

Case 2

  1. Enable Aggressive blocking mode
  2. Open any website (that was not previously opened in a browser profile) from the list
  3. Expect a blocking interstitial is visible:
    image
  4. Expect the website is added in Sites that clear cookies when you close them section at brave://settings/cookies when Proceed is pressed without Don't warn me about this site again checkbox.
  5. Expect no cookies or localStorage data is stored for a website.
Case 3
  1. Enable Aggressive blocking mode
  2. Open any website (that was not previously opened in a browser profile) from the list
  3. Expect a blocking interstitial is visible
  4. Expect the website is not added in Sites that clear cookies when you close them section at brave://settings/cookies when Proceed is pressed with Don't warn me about this site again checkbox.
  5. Expect cookies or localStorage data is stored for a website (if a website does this).

Also a redirect test case can be performed. For example, perform a redirect from any website to a website mentioned in the list, expect it's added automatically in Sites that clear cookies when you close them section.

@stephendonner
Copy link

stephendonner commented Jan 12, 2022

Verification PASSED using

Brave 1.35.79 Chromium: 97.0.4692.71 (Official Build) beta (64-bit)
Revision adefa7837d02a07a604c1e6eff0b3a09422ab88d-refs/branch-heads/4692@{#1247}
OS Windows 10 Version 20H2 (Build 19042.1415)
Prerequisite
  1. installed Brave 1.35.79
  2. launched Brave
  3. loaded brave://flags
  4. set both First Party Ephemeral Storage and Domain blocking using First Party Ephemeral Storage to Enabled
  5. relaunch Brave

19099-1

Case 1: standard mode
  1. loaded absurdwater.com (❤️ that domain name!)
  2. opened brave://settings/cookies
  • Confirmed that absurdwater.com is present under Sites that clear cookies when you close them
  • Confirmed that there were no cookies or local storage for absurdwater.com
example example example example
19099-2 19099-3 absurd-water-no-cookies absurd-water
Case 2: aggressive mode
  1. enabled Trackers & ads blocked (aggressive) from the Shields dropdown
  2. loaded aaxdetect.com
  3. confirmed I saw the blocking interstitial
  4. clicked the Proceed button
  5. opened brave://settings/cookies
  • Confirmed aaxdetect.com is added to Sites that clear cookies when you close them in brave://settings/cookies
  • Confirmed there were no cookies or local storage for aaxdetect.com
example example example example
aaxdetect 19099-5 19099-6 19099-7
Case 3: aggressive mode w/checkbox
  1. enabled Trackers & ads blocked (aggressive) from the Shields dropdown
  2. loaded aniview.com
  3. confirmed I got a blocking interstitial
  4. clicked the checkbox for Don't warn me about this site again
  5. clicked on Proceed
  6. opened brave://settings/cookies
  • Confirmed aniview.com is not listed in Sites that clear cookies when you close them
  • Confirmed there were cookies stored
  • Confirmed a page-view count entry in local storage
example example example example example example
aniview-1 aniview-2 aniview-3 aniview-4 19099-2 19099-4
Case 4: Redirect
  1. loaded stephendonner.github.io (https://github.com/stephendonner/stephendonner.github.io/blob/ede14759e08c9f2f20ad69301ce7717ac113800f/index.html) which has a redirect after 3 seconds to 33across.com
  2. confirmed 33across.com was added to Sites that clear cookies when you close them in brave://settings/cookies
example example example example example
windows-0 windows-2 windows-6 windows-3 windows-5

Verification PASSED using

Brave 1.35.82 Chromium: 97.0.4692.71 (Official Build) beta (64-bit)
Revision adefa7837d02a07a604c1e6eff0b3a09422ab88d-refs/branch-heads/4692@{#1247}
OS Linux
Prerequisite
  1. installed Brave 1.35.79
  2. launched Brave
  3. loaded brave://flags
  4. set both First Party Ephemeral Storage and Domain blocking using First Party Ephemeral Storage to Enabled
  5. relaunch Brave
Screen Shot 2022-01-12 at 2 13 41 PM
Case 1: standard mode
  1. loaded 123freeavatars.com
  2. opened brave://settings/cookies
  • Confirmed that 123freeavatars.com is present under Sites that clear cookies when you close them
  • Confirmed that there were no cookies or local storage for 123freeavatars.com
example example example example
Screen Shot 2022-01-12 at 2 06 54 PM Screen Shot 2022-01-12 at 2 07 14 PM Screen Shot 2022-01-12 at 2 07 23 PM Screen Shot 2022-01-12 at 2 07 52 PM
Case 2: aggressive mode
  1. enabled Trackers & ads blocked (aggressive) from the Shields dropdown
  2. loaded 123freeavatars.com
  3. confirmed I saw the blocking interstitial
  4. clicked the Proceed button
  5. opened brave://settings/cookies
  • Confirmed 123freeavatars.com is added to Sites that clear cookies when you close them in brave://settings/cookies
  • Confirmed there were no cookies or local storage for 123freeavatars.com
example example example example example
Screen Shot 2022-01-12 at 2 18 26 PM Screen Shot 2022-01-12 at 2 18 38 PM Screen Shot 2022-01-12 at 2 19 02 PM Screen Shot 2022-01-12 at 2 19 10 PM Screen Shot 2022-01-12 at 2 19 30 PM
Case 3: aggressive mode w/checkbox
  1. enabled Trackers & ads blocked (aggressive) from the Shields dropdown
  2. loaded abtasty.com
  3. confirmed I got a blocking interstitial
  4. clicked the checkbox for Don't warn me about this site again
  5. clicked on Proceed
  6. opened brave://settings/cookies
  • Confirmed abtasty.com is not listed in Sites that clear cookies when you close them
  • Confirmed there were cookies stored
  • Confirmed a few entries in local storage
example example example example example example example
Screen Shot 2022-01-12 at 2 31 29 PM Screen Shot 2022-01-12 at 2 32 50 PM Screen Shot 2022-01-12 at 2 32 55 PM Screen Shot 2022-01-12 at 2 33 02 PM Screen Shot 2022-01-12 at 2 33 23 PM Screen Shot 2022-01-12 at 2 33 29 PM Screen Shot 2022-01-12 at 2 33 57 PM
Case 4: Redirect
  1. loaded stephendonner.github.io (https://github.com/stephendonner/stephendonner.github.io/blob/ede14759e08c9f2f20ad69301ce7717ac113800f/index.html) which has a redirect after 3 seconds to 33across.com
  2. confirmed 33across.com was added to Sites that clear cookies when you close them in brave://settings/cookies
example example example example example
Screen Shot 2022-01-12 at 2 43 48 PM Screen Shot 2022-01-12 at 2 49 52 PM Screen Shot 2022-01-12 at 2 45 09 PM Screen Shot 2022-01-12 at 2 44 17 PM Screen Shot 2022-01-12 at 2 45 26 PM

Verification in progress with

Brave | 1.35.83 Chromium: 97.0.4692.71 (Official Build) beta (x86_64)
-- | --
Revision | adefa7837d02a07a604c1e6eff0b3a09422ab88d-refs/branch-heads/4692@{#1247}
OS | macOS Version 11.6.1 (Build 20G224)
Prerequisite
  1. installed Brave 1.35.83
  2. launched Brave
  3. loaded brave://flags
  4. set both First Party Ephemeral Storage and Domain blocking using First Party Ephemeral Storage to Enabled
  5. relaunch Brave
pre-req
Case 1: standard mode
  1. loaded unusualtitle.com (from this list)
  2. opened brave://settings/cookies
  • Confirmed that unusualtitle.com is present under Sites that clear cookies when you close them
  • Confirmed that there were no cookies or local storage for unusualtitle.com
example example example example
1 2 3 4
Case 2: aggressive mode
  1. set Trackers & ads blocking to Aggressive from the brave://settings/shields dropdown
  2. loaded https://quizzicalzephyr.com
  3. confirmed I saw the blocking interstitial
  4. clicked the Proceed button
  5. opened brave://settings/cookies
  • Confirmed https://quizzicalzephyr.com is added to Sites that clear cookies when you close them in brave://settings/cookies
  • Confirmed there were no cookies or local storage for https://quizzicalzephyr.com
example example example example example example
1 2 3 4 5 6
Case 3: aggressive mode w/checkbox
  1. set Trackers & ads blocking to Aggressive from brave://shields
  2. loaded abtasty.com
  3. confirmed I got a blocking interstitial
  4. clicked the checkbox for Don't warn me about this site again
  5. clicked on Proceed
  6. opened brave://settings/cookies
  • Confirmed abtasty.com is not listed in Sites that clear cookies when you close them
  • Confirmed there were cookies stored
  • Confirmed a few entries in local storage
example example example example example example
1 2 3 4 7 8
Case 4: Redirect
  1. loaded stephendonner.github.io (https://github.com/stephendonner/stephendonner.github.io/blob/ede14759e08c9f2f20ad69301ce7717ac113800f/index.html) which has a redirect after 3 seconds to 33across.com
  2. confirmed 33across.com was added to Sites that clear cookies when you close them in brave://settings/cookies
example example example example example
1 2 3 4 5

@stephendonner stephendonner added QA/In-Progress Indicates that QA is currently in progress for that particular issue QA Pass-Win64 QA Pass-Linux and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment