-
Notifications
You must be signed in to change notification settings - Fork 46
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
Discourage device enumeration, prefer less powerful alternatives #152
Comments
I think this is great, and echos a bunch of ongoing issues with Media Capture group. I’m very supportive |
+1, this is excellent. Is it in-scope to describe alternative patterns that could be followed? It occurs to me that it would be even better for privacy to prompt the user as to whether they want to expose a device, and which one. Of course, that's only viable for use-cases where it's acceptable to add an extra click, and for which the user can reasonably be expected to understand the question. Edit to add: Oh, sorry, I see that you mentioned that. |
Hi @hober, interesting (thanks)!
Similar to the current Bluetooth scan-like
While of course to actually pair the API has a "picker", the initial scanning can be filtered, for example based on device name (i.e. look for all starting with 'a*'). So not quite exactly the same as 'filtered device enumeration'. |
I think that's a picker-style API in the nomenclature I used in the OP. |
Is it only for devices? I can see that for font lists and in general all API that list "all available ..." should have a lesser alternative, which can be far more efficient as well. |
No, but those are many of the obvious cases. One non-device case I listed is
Yes, for sure. |
Since the subject matter here overlaps a lot with what PING discusses, and similar concerns are being worked on for the PING threat model document, how would the TAG like to coordinate? Should PING "upstream" our the parts of the threat model that are explicitly design-principal-y? Or better to push these things "down" into PING, and have the TAG design principles point to the PING doc w/ a note that the TAG considers them equally significant? Other? |
@snyderp wrote:
(Speaking only for myself) The TAG's Client-side API Design Principles document is "a small-but-growing set of design principles collected by the W3C TAG while reviewing specifications." This issue is an example of that: this kind of thing has come up in several of our design reviews, so I think it's time to try to distill our observations and learnings into a new principle. That said, I certainly think that the Privacy Threat Model can (and should) inform design reviews, and it seems totally reasonable for me to have links from specific threats in the model to specific design principles that help mitigate the threats, and vice versa, of course—design principles should link to other models, thinking, findings, etc. that inform them. |
Specifying sorting also has a privacy benefit in mitigating fingerprinting based on the sort order revealing some other information about the user or their device (as the order of fonts did in some cases), see this best practice. I was thinking that the |
Other things to emphasize / points for consideration.
|
Also maybe worth considering how permissions factor in here. In general PING has been pushing that idea that any APIs that leak hardware identifiers (hard or soft) need to be behind permissions and restrictions. Presumably a permission would be redundant or implied with the picker option. Depending on the size of the space of the possible answers, it might be a requirement for the others. |
@hober numbers-wise, we put it in the context of more or less 5.1 or more or less 6.1? (inside/after/separate/etc). |
IIRC another example is Web Bluetooth Scanning, which has a filter-style API ("give me all the nearby bluetooth devices that meet these criteria"). |
@hober to draft a PR. |
I mentioned Bluetooth already (scanning is close!) |
I'll be happy to review as needed. |
@lknik @hober I just want to make sure #152 (comment) is being considered. In many cases an availability-approach will not prevent fingerprinting, where a picker would |
This came up in our review of WebHID API, when we were discussing unique identifiers that come from the system. Minutes. |
As mentioned in the PING call today, WebXR is preferring exposing capabilities rather than specific device identifiers. That might be a good pattern/principle to recommend. |
I see a possible link with #137 if capabilities becomes a way to identify devices (based on npdoty's comment) |
Another one: w3ctag/design-reviews#399 (comment) |
Consider an API which exposes a certain kind of attached device to websites. For instance, an API which can vend one or more monitor objects that represents one or more of the monitors attached to the computer.
Common approaches
Examples
<input type=file>
Observations
Only some of these approaches center the user's device preferences.
Merely exposing the presence of devices is itself a fingerprinting concern.
Exposing device data grows the fingerprinting surface per exposed device, which can get very bad very quickly if the API exposes a large amount of per-device information.
The Rule of Least Power suggests that we should go with the least powerful API which meets its use cases.
Conclusion
Therefore, we should recommend that, when API designers need to expose devices in some manner, that they consider these in reverse order.
An availability-style API is best: it allows the site to use the device the user wants to use without exposing device information. It is the least powerful option.
A picker-style API also respects user preferences. It exposes device information, but only of one device. This minimizes the fingerprinting data exposed.
A filtered device enumeration API exposes a subset of devices, so is potentially better re: fingerprinting than the next possibilities
A sorted device enumeration API exposes too much information, but at least it does so in a way that makes the site's job easier
A device enumeration API is to be resorted to only when the other options are infeasible for some reason (compat, perhaps).
The text was updated successfully, but these errors were encountered: