-
Notifications
You must be signed in to change notification settings - Fork 56
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
API for display-capturing the current tab #625
Comments
Why does this use browsing context in its name? Does this survive navigations somehow? cc @jan-ivar |
The capture does not survive navigation - the capturing app is unloaded on navigation. |
I'm not sure, but from the proposed UI this seems like an option (which would have a name related to viewport to stay consistent) you would pass to |
I did consider the option of an additional constraint to |
Note: this is a Google-only request, not a successor to #609 which is the request from the WebRTC WG. I've closed w3c/mediacapture-screen-share#148 (comment) to avoid confusion, and requested #609 be reopened. As the OP mentions, we are opposed to this "hybrid" API.
|
An application signal does not alleviate the "elevated security requirements" if the application is malicious, it defeats them. The getDisplayMedia API deters social engineering: "User Agents are encouraged to warn users against sharing browser display devices as well as monitor display devices where browser windows are visible, or otherwise try to discourage their selection on the basis that these represent a significantly higher risk when shared." ¹ Providing malicious applications with a method that does exactly what they need seems like a bad idea. I also worry it would undermine adoption of getViewportMedia which requires sites to isolate to have this ability, specifically to mitigate this threat, which Chrome Security agrees is significant. 1. See the questionaire.md and subsequent links for details of these unobvious treats on the same-origin policy from sharing web surfaces under attacker control. |
Since I was confused and created confusion in terms of the relationship with #609, I thought I would summarize what I understand about this particular design review (at the request of @LeaVerou and @kenchris I was chatting with this morning):
The motivation I understand behind the proposal in this issue is that getting the security model being developed for |
The Chrome decision on the "need for elevated permission" for getDisplayMedia (which presents all the capture surfaces without calling out special considerations about their risks) was based on the understanding that the most common use cases would be displaying a tab or displaying the screen, so it did not make much sense to increase the cognitive overload by calling out cases that had lower risk than the common ones. It is logical based on this standpoint that presenting the present tab as a capture option doesn't need any more elevated warning; the warning is already elevated. |
There is not going to be a consolidated proposal. |
Hi @eladalon1983 can you please clarify this. It's highly unlikely that the TAG is going to endorse a single proposal when there are multiple competing proposals from different vendors and lack of consensus. Happy to postpone until our next design review week - which will be the 14th of June. Hoping we can have better news by then. |
Glad to clarify.
I think the two proposals can be judged independently. |
I've updated the original comment to reflect our change from a method-based API to a new-dictionary-member-based API. |
|
@eladalon1983 What is the disagreement on
I'm glad to hear this. Mozilla is eager to engage on this. |
Thanks for the update @eladalon1983. We are going to review this at our "f2f" coming up on the 13th. I hope we can resolve and close the review by then. |
Just discussed in our virtual f2f breakout. Thank you for clarifying that |
Once the security measures Chrome has UMA tracking calls to getDisplayMedia with/without When we feel that adoption is sufficient, or that the challenges to it are no longer as significant, we can (a) communicate publicly that |
Ok this sounds good. We still have concerns about interoperability and strongly encourage convergence on one consensus-based solution as you have laid out above. |
Ya ya yawm TAG!
I'm requesting a TAG review of getCurrentBrowsingContextMedia.
Overview
Consider the existing navigator.mediaDevices.getDisplayMedia(). It allows a user unlimited choice of sources - any monitor, window or tabs.
We’re in the process of standardizing a new API - getViewportMedia - that will allow web-applications to present a simple confirmation-only prompt to the user. The security requirements of this API are under active discussion, but consensus is forming that both cross-origin isolation and a new opt-in header will be required.
Not all applications can accept these requirements - at least not in the short-term. However, by forcing such applications to use getDisplayMedia, the user is pushed towards the riskier option of sharing the entire monitor. Why is that the riskier option? Because at the moment capture starts, the entire current monitor includes the current tab. Note that the moment capture starts is sufficient for almost any attack, as all attacks we have thus far considered could be carried out using a single frame.
A hybrid API is deemed necessary in order to offer some of the benefits of getViewportMedia without its elevated security requirements. This hybrid API will allow the application to signal its preference for capturing the current tab by way of a new dictionary member parameter for getDisplayMedia. Namely, we will extend DisplayMediaStreamConstraints by adding another dictionary member called
preferCurrentTab
with a default value offalse
. When getDisplayMedia is invoked withpreferCurrentTab=true
, the browser will offer the current tab as the first option to the user, but will still offer unlimited choice of capture sources (see image below).The unlimited choice of sources makes this new API compliant with the requirements of getDisplayMedia. Since it complies with the requirements of getDisplayMedia, the security requirements placed on getDisplayMedia are sufficient for this new hybrid API.
Links and Details
Further details:
You should also know that...
A word of caution over a source of potential confusion:
getViewportMedia
is a later conclusion. Initially, that API was offered under the namegetCurrentBrowsingContextMedia
. Chrome has an active origin-trial forgetCurrentBrowsingContextMedia
which accomplishes the same thing aspreferCurrentTab
, but uses a new method instead of a new dictionary member. See the explainer.We'd prefer the TAG provide feedback as (please delete all but the desired option):
💬 leave review feedback as a comment in this issue and @-notify @eladalon1983
The text was updated successfully, but these errors were encountered: