Closed Bug 1654064 Opened 4 years ago Closed 4 years ago

Unable to sign in with Google on app.plex.tv with ETP Standard

Categories

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

80 Branch
Desktop
macOS
defect

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox80 --- wontfix
firefox81 --- fixed

People

(Reporter: ksenia, Assigned: dlee)

References

(Blocks 1 open bug, )

Details

Attachments

(3 files)

Steps to reproduce:

  1. Open https://app.plex.tv/desktop in recent Nightly desktop
  2. Click "Sign in" on the top right.
  3. After "Sign in" page is displayed, click on "Continue with Google".
  4. Sign in to your Google account and after returning to the site observe the behaviour

Expected Behavior:
Signed in to the site

Actual Behavior:
Button is stuck in loading state

The issue is not reproducible if I turn off ETP. Also reproducible on mobile.

I can reproduce the breakage with cookieBehavior 4 and 5. The breakage seems to be related to cookie blocking on accounts.google.com. You see a message similar to: Request to access cookie or storage on “https://accounts.google.com/o/oauth2/iframe#origin=https%3A%2F%2Fapp.plex.tv&rpcToken=486012004.5689947” was blocked because it came from a tracker and content blocking is enabled. which prints a few times a second. This likely means the Google script is repeatedly trying to access storage.

When the "Continue with Google" button is clicked, a google window with the host accounts.google.com is opened, and the popup has opener access back to the plex document. However, accounts.google.com is not granted storage access by our opener heuristic. I noticed that the button is embedded in a first-party iframe, the opener points to https://app.plex.tv/auth-form/#!?clientID=.

Gary, would you mind to dig a bit further into this? Is the reason accounts.google.com isn't automatically granted storage access due to the fact that it's embedded in an iframe rather than the main context? If so, do you see any reason to prefer that restriction?

Blocks: etp-level-2-list, dfpi-breakage
No longer blocks: tp-breakage
Flags: needinfo?(xeonchen)

OK!

Assignee: nobody → xeonchen
Flags: needinfo?(xeonchen)
Severity: -- → S3
Status: NEW → ASSIGNED
Priority: P3 → P1

(In reply to Steven Englehardt [:englehardt] from comment #1)

I can reproduce the breakage with cookieBehavior 4 and 5. The breakage seems to be related to cookie blocking on accounts.google.com. You see a message similar to: Request to access cookie or storage on “https://accounts.google.com/o/oauth2/iframe#origin=https%3A%2F%2Fapp.plex.tv&rpcToken=486012004.5689947” was blocked because it came from a tracker and content blocking is enabled. which prints a few times a second. This likely means the Google script is repeatedly trying to access storage.

When the "Continue with Google" button is clicked, a google window with the host accounts.google.com is opened, and the popup has opener access back to the plex document. However, accounts.google.com is not granted storage access by our opener heuristic. I noticed that the button is embedded in a first-party iframe, the opener points to https://app.plex.tv/auth-form/#!?clientID=.

Gary, would you mind to dig a bit further into this? Is the reason accounts.google.com isn't automatically granted storage access due to the fact that it's embedded in an iframe rather than the main context? If so, do you see any reason to prefer that restriction?

[Child 91055: Main Thread]: D/AntiTracking Adding a first-party storage exception for https://accounts.google.com, triggered by opener
[Child 91055: Main Thread]: D/AntiTracking The current resource is third-party
[Child 91055: Main Thread]: D/AntiTracking Our window isn't a third-party window

According to the AntiTracking log, it shows the permission was not saved because the parent window context is not a 3rd-party window.

Dimi or Baku may have some comments?

Flags: needinfo?(dlee)
Flags: needinfo?(amarchesini)

(In reply to Gary Chen [:xeonchen] from comment #3)

According to the AntiTracking log, it shows the permission was not saved because the parent window context is not a 3rd-party window.

Dimi or Baku may have some comments?

Right, I think this is because window.open is called in a first-party iframe, but our heuristic uses 3rd-party logic code path because the parent context is not a top-level.
I guess the solution could be replacing top-level check here with first-party check.

Flags: needinfo?(dlee)

I'm OK with it. Maybe we should check if this is related to what we discussed yesterday about the 3rd-party check window vs channel.
Do you have time to work on it?

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

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

I'm OK with it. Maybe we should check if this is related to what we discussed yesterday about the 3rd-party check window vs channel.
Do you have time to work on it?

I'll talk PTO next week, if we can wait, I can work on this when I get back.

Flags: needinfo?(dlee)
Assignee: xeonchen → dlee
Pushed by dlee@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/90bf9f23c414
P1. Use first-party check instead of top-level check while applying storage access heuristic r=baku
https://hg.mozilla.org/integration/autoland/rev/23e5e026f179
P2. Add a testcase for applying window.open heuristic on a first-party iframe. r=baku
Pushed by dlee@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/db37f6df1877
P1. Use first-party check instead of top-level check while applying storage access heuristic r=baku
https://hg.mozilla.org/integration/autoland/rev/cfeb2f1cae26
P2. Add a testcase for applying window.open heuristic on a first-party iframe. r=baku
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
Flags: needinfo?(dlee)
Regressions: 1658010
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: