Enable browser_permmgr_sync.js with Fission
Categories
(Core :: Permission Manager, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: mccr8, Assigned: johannh)
References
(Blocks 1 open bug)
Details
(Whiteboard: [domsecurity-backlog1])
Attachments
(1 file)
I think bug 1596834 is needed to make this test Fission-compatible, but my patch in that bug does not actually change the results with Fission. The test creates a new tab with about:blank (in a new process), runs some tests that pass, then loads example.com in an iframe by doing "content.document.body.appendChild(iframe)", then runs some tests. Then it sets some more permissions in the parent, then runs some more tests. Then it loads a subdomain of example.com with https, then runs some more tests.
The tests that fail seem to all be tests involving permissions for example.com that are expected to be ALLOW_ACTION.
My guess would be that the load of example.com creates a new process separate from the process about:blank is loaded in, but all of the scripts run in the about:blank process, and it looks like permissions for a domain only work in a process where the domain has been loaded, so these fail.
Reporter | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Ethan, could you please find an assignee for this?
Comment 2•5 years ago
|
||
Paul, are you able to help with this one? Not sure if your previous work with permissions stuff is relevant for fixing this test.
Comment 3•5 years ago
|
||
I'm afraid I'm not an expert at this. Maybe :ehsan can provide some input?
Comment 4•5 years ago
|
||
Not sure what question needs my input on. I'd appreciate if you could be more specific please. Thanks!
Comment 5•5 years ago
|
||
Thomas will look into this bug.
Comment 6•5 years ago
•
|
||
(In reply to Andrew McCreight [:mccr8] from comment #0)
My guess would be that the load of example.com creates a new process separate from the process about:blank is loaded in, but all of the scripts run in the about:blank process, and it looks like permissions for a domain only work in a process where the domain has been loaded, so these fail.
That's true, I could see the permissions model: a child process (A) starts without the knowledge about any permissions. When we start visit a site, asking parent to send out corresponding permission to A.
The problem is, we are loading a site from cross-process example.com iframe (B), then B asks parent permission about permissions of example.com, then store it in B process. We run script checking permission on A, A doesn't know anything about permission in B process, then the test fails.
The problem seems to be hard to me in the case we do another navigate in B, then B has to notify its permissions to all ancestor parents. I don't know if it's worth to try, it would be a pain to walking up to the ancestor chain in fission to do that.
:ehsan. In permission model, is it allowed for A to look at permission in B process in the above example? Or do you have any idea/suggestion?
If it is not allowed, we just move the check inside iframe's process to make the test pass
Updated•5 years ago
|
Reporter | ||
Comment 7•5 years ago
|
||
I don't know much about permissions, but in general I'd think that we wouldn't want A to ever know about the permissions that B has. Maybe what you want is to change things so that the test script asking about B's permissions runs in B's process? And you'd also like to check, if Fission is enabled, that B has no permissions in A's process, even after B loads (of course, with non-Fission this will not be true).
Comment 8•5 years ago
|
||
(In reply to Thomas Nguyen (:tnguyen) from comment #6)
The problem is, we are loading a site from cross-process example.com iframe (B), then B asks parent permission about permissions of example.com, then store it in B process. We run script checking permission on A, A doesn't know anything about permission in B process, then the test fails.
The problem seems to be hard to me in the case we do another navigate in B, then B has to notify its permissions to all ancestor parents. I don't know if it's worth to try, it would be a pain to walking up to the ancestor chain in fission to do that.
:ehsan. In permission model, is it allowed for A to look at permission in B process in the above example? Or do you have any idea/suggestion?
If it is not allowed, we just move the check inside iframe's process to make the test pass
I don't think we want B to notify its parent frame process about the permissions that it has. Quite the opposite in fact, we want to rewrite this test in order to make sure that it checks the permissions in the correct content process, IOW the code that checks the permissions should run in the content process for B. In fact the test should probably check if we're in Fission mode, and if so verify that the content process for about:blank never receives any of these permissions.
The basic idea behind the way the permission manager notifies the content processes is that each content process should only ever be told about the permissions it would need, and not about unrelated permissions that wouldn't make any difference to the way it would render web content.
Comment 9•5 years ago
|
||
Agree, that makes sense to me. Thanks
Assignee | ||
Updated•5 years ago
|
Comment 10•5 years ago
|
||
Temporarily reassigning these DOM Security Fission bugs to ckerschb for re-triage.
Updated•5 years ago
|
Comment 11•5 years ago
|
||
This bug is a blocker for Fission's current milestone (M4.1 aka "fix all the mochitests"), but it's currently unassigned. The Fission team is hoping teams will fix their mochitests for Fission before the end of Q1 (75 or 76 Nightly).
If you don't think this mochitest failure should block shipping Fission, just let me know.
Assignee | ||
Comment 13•5 years ago
|
||
Yup, I can take a look.
Comment 14•5 years ago
|
||
Johann, any updates on this test bug? It's still disabled for Fission. Fixing and re-enabling mochitests blocks enabling Fission in Nightly.
Comment 15•5 years ago
|
||
The Fission team hopes to roll out Fission to some Nightly users in Q3, so it would be good if all tests are passing and enabled for Fission by the end of Q2.
Assignee | ||
Comment 16•5 years ago
|
||
The test was updated to ensure that under Fission we're not syncing
all permission information to a "parent" content process, and instead
just to the specific iframe that needs it.
Assignee | ||
Updated•5 years ago
|
Comment 17•5 years ago
|
||
Comment 18•5 years ago
|
||
bugherder |
Description
•