Page MenuHomePhabricator

Bug 1638383 - Add a shim for the dFPI Microsoft login breakage. r=twisniewski!,#anti-tracking!
ClosedPublic

Authored by emz on Nov 19 2021, 4:51 PM.
Referenced Files
Unknown Object (File)
Apr 3 2025, 1:08 PM
Unknown Object (File)
Mar 26 2025, 8:36 PM
Unknown Object (File)
Mar 15 2025, 11:39 PM
Unknown Object (File)
Jan 18 2025, 9:10 PM
Unknown Object (File)
Jan 12 2025, 4:37 AM
Unknown Object (File)
Jan 9 2025, 8:50 PM
Unknown Object (File)
Jan 7 2025, 1:43 AM
Unknown Object (File)
Jan 4 2025, 8:23 PM

Diff Detail

Repository
rMOZILLACENTRAL mozilla-central
Lint
Lint Not Applicable
Unit
Tests Not Applicable
Build Status
Buildable 374887
Build 469647: arc lint + arc unit

Event Timeline

emz planned changes to this revision.Nov 19 2021, 4:51 PM
emz created this revision.
phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".Nov 19 2021, 4:51 PM
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
emz requested review of this revision.Nov 19 2021, 5:09 PM
emz updated this revision to Diff 510153.
emz retitled this revision from WIP: Bug 1638383 - Add a shim for the dFPI Microsoft login breakage. r=twisniewski!,#anti-tracking! to Bug 1638383 - Add a shim for the dFPI Microsoft login breakage. r=twisniewski!,#anti-tracking!.

Fixed invalid return value for onBeforeRequest handler

emz edited reviewers, added: anti-tracking-reviewers, twisniewski; removed: Restricted Project.Nov 19 2021, 5:09 PM

This still needs a warning logged to the console to make users / developers aware that we're shimming. Could be in both teams / powerva and login.microsoftonline.com.
Also, we don't really do anything useful if the user denies the rSA prompt. But I'm afraid there isn't much we can do if we don't want to edit web content.

But I'm afraid there isn't much we can do if we don't want to edit web content.

Would just issuing a window.alert be a reasonable compromise there, letting the user know login will fail and they may need to hit the back button?

But I'm afraid there isn't much we can do if we don't want to edit web content.

Would just issuing a window.alert be a reasonable compromise there, letting the user know login will fail and they may need to hit the back button?

This would work, but I'm afraid that content prompts are too closely associated with coming from the site. We could show a tab-prompt, which looks more like chrome UI. This would require extending the trackingProtection.js interface to support calls to Services.prompt.*. Maybe a nice follow-up.

timhuang added a subscriber: timhuang.

The part of changing privilege rSA looks good to me.

I am wondering if we could have some sort of test here for the redirect shimming mechanism. But maybe we don't have a test infrastructure for this I guess.

The part of changing privilege rSA looks good to me.

I am wondering if we could have some sort of test here for the redirect shimming mechanism. But maybe we don't have a test infrastructure for this I guess.

I agree that it would be great to have test coverage for this. This is challenging due to the nature of shims. I've added an agenda item for our next meeting.

Added web console warnings. Derive requestStorageAccessOrigin from redirect, instead of passing it explicitly.

r+ on the addon bits. lgtm!

This revision is now accepted and ready to land.Nov 22 2021, 6:23 PM

This revision requires a Testing Policy Project Tag to be set before landing. Please apply one of testing-approved, testing-exception-unchanged, testing-exception-ui, testing-exception-elsewhere, testing-exception-other. Tip: this Firefox add-on makes it easy!

Sorry to jump on this, but this is lacking a version-number bump in browser/extensions/webcompat/manifest.json before landing. Unfortunately, that's required to invalidate caches etc.

Also note that there currently is another patch, D131738, in-flight and that's already on autoland, but not yet in central. So this patch should set 28.6.0, and it's probably smart to rebase this on top of the other patch as soon as that's merged, to avoid conflicts. :)

This revision now requires changes to proceed.Nov 22 2021, 6:28 PM
emz requested review of this revision.Nov 22 2021, 6:58 PM
emz updated this revision to Diff 510836.

Rebased and bumped extension version.

This revision is now accepted and ready to land.Nov 22 2021, 7:06 PM

Fixed rSA autogrant regression

We consume user activation before entering the async bits of requestStorageAccessForOrigin. This ment the previous version would never auto-grant. Making the auto grant decision on the initial user activation state fixes this.
@timhuang could you please have another look?

This revision now requires review to proceed.Nov 22 2021, 7:34 PM

Added test case for requestStorageAccessForOrigin with aRequireUserActivation=false.

Ah, right. Sorry I didn't catch this in the first place. The change looks good to me. And thanks for adding the test.

This revision is now accepted and ready to land.Nov 22 2021, 8:43 PM

requestStorageAccessForOrigin has test coverage. For the shims we're still working on a test environment.

This revision now requires review to proceed.Nov 22 2021, 9:33 PM
NOTE: Tasks were added or removed in diff 510922.

The following parameter set has differences:


NOTE: Documentation was modified in diff 510922

It can be previewed here for one week.


If you see a problem in this automated review, please report it here.

smaug added a subscriber: smaug.

Seems to be modifying non-web exposed webidl only.

This revision is now accepted and ready to land.Nov 22 2021, 11:05 PM
emz added a commit: Restricted Diffusion Commit.Feb 18 2022, 7:10 PM