Skip to content
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

Move enumerateDevices behind permission #612

Closed
pes10k opened this issue Aug 21, 2019 · 10 comments
Closed

Move enumerateDevices behind permission #612

pes10k opened this issue Aug 21, 2019 · 10 comments
Assignees
Labels
November 2019 Interim privacy-needs-resolution Issue the Privacy Group has raised and looks for a response on.

Comments

@pes10k
Copy link

pes10k commented Aug 21, 2019

Currently websites can enumerate hardware capabilities with enumerateDevices(). Querying device capabilities is the kind of pseudo-identifier that allow users to be passively identified / fingerprinted. To prevent this, websites should, to the greatest degree possible, need user permission to query device capabilities. Websites should therefor need permission to access enumerateDevices().

Related: the Moz efforts discussed at the bottom of this comment : #607 (comment)

@aboba aboba added privacy-tracker Group bringing to attention of Privacy, or tracked by the Privacy Group but not needing response. and removed TPAC 2019 labels Aug 22, 2019
@vr000m
Copy link

vr000m commented Aug 24, 2019

@pallab-gain @karthikbr82 Please take a look

@youennf
Copy link
Contributor

youennf commented Aug 26, 2019

enumerateDevices has a "device-info" permission (https://w3c.github.io/permissions/#dom-permissionname-device-info). This permission is granted when getUserMedia is granted. This permission controls exposure of device labels currently, not exposure of devices.

Safari goes a bit further by obfuscating most information about devices if 'device-info' is not granted: it obfuscates most devices. This is probably somehow similar to what Mozilla is experimenting and @guido is mentioning (empty device IDs).

Another approach would be to prompt in case enumerateDevices is called and "device-info" permission is not granted. This seems harder to deploy given how enumerateDevices is used currently. The prompt user message might be also more difficult to understand than the getUserMedia message.

The additional use case to consider is for a webpage to monitor whether there is any camera/microphone at all, and update its UI accordingly.
A website can get this information through getUserMedia which seems more appropriate than enumerateDevices from a privacy perspective. ondevicechange is currently also available for that purpose.

@youennf
Copy link
Contributor

youennf commented Oct 9, 2019

One possibility discussed on the mailing list is:

  • Remove "device-info"permission
  • Allow unfiltered enumerateDevices results (and devicechange events) ONLY if getUserMedia was previously called successfully for the document.
    This would essentially put enumerateDevices behind the getUserMedia permission prompt.

@youennf
Copy link
Contributor

youennf commented Oct 24, 2019

Adding some more filtering in #632

@youennf
Copy link
Contributor

youennf commented Nov 13, 2019

Uploaded #641 to remove "device-info" permission.
Another possibility would be to keep "device-info" permission but also add this boolean so that a given browsing context can only get device info after at least one getUserMedia successful call.

@youennf
Copy link
Contributor

youennf commented Nov 28, 2019

Now that #641 is merged, enumerateDevices is effectively behind a camera/microphone permission.
I filed #645 and #646 to further tighten the model.

@snyderp, can we close this issue?

@pes10k
Copy link
Author

pes10k commented Nov 30, 2019

@youennf i'm trying to follow the implications of this. Does this mean that the site can enumerate all devices after the user gives access to any device? If so, that would seem to conflict hard with the reduce-label-exposure topics we're discussing elsewhere. (and if not, can you say a bit more about the flow here? I might just be being dense…)

@youennf
Copy link
Contributor

youennf commented Dec 5, 2019

Does this mean that the site can enumerate all devices after the user gives access to any device?

By default, a site page will not be able to enumerate any device even if the site has persistent access to the camera/microphone.
A page has to request capture and be granted access to one device. At that point, the page will potentially get access to all camera and microphone information.
This makes enumerateDevices leaking information after getUserMedia leaked information, thus making enumerateDevices behind the getUserMedia permission as requested by this issue.

The fact that all devices are leaked after one getUserMedia call should be/is already treated as a separate issue.

@youennf
Copy link
Contributor

youennf commented Dec 5, 2019

The fact that all devices are leaked after one getUserMedia call should be/is already treated as a separate issue.

Tracked at #640.

@youennf
Copy link
Contributor

youennf commented Dec 5, 2019

Closing this issue. @snyderp, please reopen if you think that would be useful.

@youennf youennf closed this as completed Dec 5, 2019
@w3cbot w3cbot added privacy-needs-resolution Issue the Privacy Group has raised and looks for a response on. and removed privacy-tracker Group bringing to attention of Privacy, or tracked by the Privacy Group but not needing response. labels May 22, 2020
@jan-ivar jan-ivar added the privacy-tracker Group bringing to attention of Privacy, or tracked by the Privacy Group but not needing response. label Oct 9, 2020
@w3cbot w3cbot removed the privacy-tracker Group bringing to attention of Privacy, or tracked by the Privacy Group but not needing response. label Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
November 2019 Interim privacy-needs-resolution Issue the Privacy Group has raised and looks for a response on.
Projects
None yet
Development

No branches or pull requests

6 participants