-
Notifications
You must be signed in to change notification settings - Fork 10
Support workers in privacy algos #238
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
Conversation
index.html
Outdated
Assert: |owner| is {{Document}}. | ||
</li> | ||
<li> | ||
If the result of running [=passes window privacy test=] with |observer| and |owner|'s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This algorithm is returning true if "passes window privacy test" is true for any owner, so I'd like to confirm if this is indeed the intention.
This means that if I have, for instance:
- Window W1 showing https://foo.com/a.html that spawns a shared worker
- Window W2 showing https://bar.com/b.html which has an iframe containing https://foo.com/a.html which uses the same shared worker spawned above.
- I have window W1 open and showing in my screen.
- I have window W2 open and next to W1, but the focus is on the top-level frame, which is not same origin with the iframe.
This means that the iframe in W2 can potentially have access to updates and readings from the shared worker that would not be available if it had been using the API directly rather than via a shared worker.
I don't have a lot of experience with shared workers to know if this is common or OK, but it'd be good to mention this in https://w3c.github.io/compute-pressure/#security-and-privacy-considerations (perhaps in https://w3c.github.io/compute-pressure/#same-origin-restriction but maybe elsewhere).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that is OK. We want to enable usage in iframes and that additionally depends on the embedder allowing the feature policy for the frame. The only way the W2 would have access is if it collaborates with the iframe to get that info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This brings up an interesting topic in that the permissions policy API does not apply to workers at the moment IIRC, so this means that not-same origin iframe can use the Compute Pressure API in a worker/shared worker but would not be able to do so if it was using it directly from its code, right?
Also, my concern wasn't about W2 specifically but rather if it's OK that the iframe in W2 would receive updates from its worker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think it is OK. It was one of the core use-cases we had from Zoom: it's going to be used from iframes and they want to share the worker across instances.
Also we are not showing a permissions prompt for the feature which is what Google wanted. Users won't understand what it means to use computer pressure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But yeah, it would also be weird if the shared worker cannot get data because one embedder didn't allow it.
I really don't know what to do in this situation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we could check them all and the app code would have to make sure to check policy before deciding to use a shared worker, and then document that in an example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it dangerous if it's up to the app as well?
My concern here is that apps could work around the privacy checks being defined for windows -- that is, if a page uses the API directly and the privacy checks would fail under certain circumstances, all it takes is using the API from a shared worker and having another tab/window loading the same shared worker and passing the privacy checks for the first page to bypass the mitigations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah so let's require that all in 'owner set' have appropriate permissions policy
Looks good to me. The discussion about workers are intersting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new version looks nice.
I think I've managed to resolve all the discussion points that have been addressed, and the only one that's left is the choice of whether one document passing the "may receive data" check being enough for a worker or not. In the comments you mentioned wanting to change this, but the PR does the opposite, so it's not clear to me what the approach is going to be.
I think there is a difference between the implicit focus check for data delivery or whether a worker should be allowed access at all via permission policy. I think we can make the permission policy check separately from this PR |
Doesn't this (i.e. doing a permissions policy check or something else entirely separately) leave the privacy checks in windows open to being bypassed? |
Permission policy checks (set by site and embedder and rarely changed at runtimw) would normally be checked at start of observation, and unless we want to adjust at runtime, this should be fine. We could always stop observation if these are changed at runtime, but probably not worth the effort |
Yeah, I usually see those checks when an object is constructed or a resource will be acquired. Before lgtm'ing this PR, I just want to make sure that it's not a problem that a window which would normally fail to receive new data because of a failed "may receive data" check can receive said data given the conditions described in #238 (comment). |
I don't consider that a problem, but see it as implicit focus. There is an iframe with implicit focus relaying that to the shared worker |
OK then. Let's go! |
@himorin build is failing as https://respec.org/w3c/groups/ isn't loading! |
some other colleagues has reported on that, and someone in W3C is contacting them. so, please wait a bit for further update. |
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs, because we use MockPressureService in WPTs so these WPTs are no longer valid. TODO: add privacy test related unittests in content/browser. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: none Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs, because we use MockPressureService in WPTs so these WPTs are no longer valid. TODO: add privacy test related unittests in content/browser. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: none Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs, because we use MockPressureService in WPTs so these WPTs are no longer valid. TODO: add privacy test related unittests in content/browser. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: none Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding unit tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: none Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding unit tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: none Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding unit tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: none Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding unit tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: none Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding unit tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1425053 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1425053 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1425053 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4956687 Commit-Queue: Wei4 Wang <wei4.wang@intel.com> Reviewed-by: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/main@{#1237389}
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4956687 Commit-Queue: Wei4 Wang <wei4.wang@intel.com> Reviewed-by: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/main@{#1237389}
Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4956687 Commit-Queue: Wei4 Wang <wei4.wang@intel.com> Reviewed-by: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/main@{#1237389}
…m Blink to content/browser., a=testonly Automatic update from web-platform-tests [ComputePressure] Move privacy tests from Blink to content/browser. Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4956687 Commit-Queue: Wei4 Wang <wei4.wang@intel.com> Reviewed-by: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/main@{#1237389} -- wpt-commits: 985dd254555907cabf68224a7db1d5a62e4b989e wpt-pr: 42653
…m Blink to content/browser., a=testonly Automatic update from web-platform-tests [ComputePressure] Move privacy tests from Blink to content/browser. Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4956687 Commit-Queue: Wei4 Wang <wei4.wangintel.com> Reviewed-by: Reilly Grant <reillygchromium.org> Cr-Commit-Position: refs/heads/main{#1237389} -- wpt-commits: 985dd254555907cabf68224a7db1d5a62e4b989e wpt-pr: 42653 UltraBlame original commit: 182628bdd37a61f67c7575788276650441985494
…m Blink to content/browser., a=testonly Automatic update from web-platform-tests [ComputePressure] Move privacy tests from Blink to content/browser. Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4956687 Commit-Queue: Wei4 Wang <wei4.wangintel.com> Reviewed-by: Reilly Grant <reillygchromium.org> Cr-Commit-Position: refs/heads/main{#1237389} -- wpt-commits: 985dd254555907cabf68224a7db1d5a62e4b989e wpt-pr: 42653 UltraBlame original commit: 182628bdd37a61f67c7575788276650441985494
…m Blink to content/browser., a=testonly Automatic update from web-platform-tests [ComputePressure] Move privacy tests from Blink to content/browser. Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4956687 Commit-Queue: Wei4 Wang <wei4.wangintel.com> Reviewed-by: Reilly Grant <reillygchromium.org> Cr-Commit-Position: refs/heads/main{#1237389} -- wpt-commits: 985dd254555907cabf68224a7db1d5a62e4b989e wpt-pr: 42653 UltraBlame original commit: 182628bdd37a61f67c7575788276650441985494
…m Blink to content/browser., a=testonly Automatic update from web-platform-tests [ComputePressure] Move privacy tests from Blink to content/browser. Privacy test is done in Blink currently. However, we can not get enough information in Blink to implement the improved privacy test [1]. This CL moves privacy test from Blink to content/browser. This CL also deletes privacy test related WPTs and adds corresponding browser tests, because we use MockPressureService in WPTs so these WPTs are no longer valid. This CL also renames PassesPrivacyTest() to HasImplicitFocus() according to the spec change [1]. [1] w3c/compute-pressure#238 Bug: 1500467, 1396177 Change-Id: I8c087951f5b804235a2dde4fa4e315159f400cc7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4956687 Commit-Queue: Wei4 Wang <wei4.wang@intel.com> Reviewed-by: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/main@{#1237389} -- wpt-commits: 985dd254555907cabf68224a7db1d5a62e4b989e wpt-pr: 42653
Preview | Diff