Skip to content

Commit 421254b

Browse files
martinthomsontorgojyasskin
authored
Device access permissions and fingerprinting (fixes #479)
* Device access permissions and fingerprinting This rewords some of the text from #470 to address a latent concern. It also switches from "id" to "identifier". Closes #479. * Broaden the device section to include capabilities Consider LLM access in much the same way. Closes #526. * to * Update index.bs Co-authored-by: Jeffrey Yasskin <[email protected]> --------- Co-authored-by: Daniel Appelquist <[email protected]> Co-authored-by: Jeffrey Yasskin <[email protected]>
1 parent 2a60543 commit 421254b

File tree

1 file changed

+36
-27
lines changed

1 file changed

+36
-27
lines changed

index.bs

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2570,7 +2570,7 @@ Represent errors in web APIs as ECMAScript error objects (e.g., {{Error}})
25702570
or as {{DOMException}}.
25712571
whether they are exceptions, promise rejection values, or properties.
25722572

2573-
<h2 id="device-apis">OS and Device Wrapper APIs</h2>
2573+
<h2 id="device-apis">APIs that wrap access to device or browser capabilities</h2>
25742574

25752575
New APIs are now being developed in the web platform for interacting with devices.
25762576
For example, authors wish to be able to use the web to connect with their
@@ -2581,22 +2581,28 @@ accelerometer),
25812581
<a href="https://wicg.github.io/webusb/">USB</a>-connected peripherals,
25822582
<a href="https://www.w3.org/community/autowebplatform/">automobiles</a>, etc.
25832583

2584-
These can be functionality provided by the underlying operating system,
2585-
or provided by a native third-party library
2586-
to interact with a device.
2587-
These are an abstraction which "wrap" the native functionality
2584+
The same applies to capabilities that might be optionally provided
2585+
by either the host system or an external service.
2586+
This includes capabilities that depend on users paying for access to the capability.
2587+
2588+
These capabilities can be functionality provided by the underlying operating system,
2589+
or provided by a native third-party library.
2590+
APIs can provide an abstraction which "wraps" the native functionality
25882591
without introducing significant complexity,
25892592
while securing the API surface to the browser.
25902593
So, these are called wrapper APIs.
25912594

2592-
This section contains principles for consideration when designing APIs for devices.
2595+
This section contains principles for consideration
2596+
when designing APIs for these capabilities.
25932597

2594-
<h3 id="device-ids">Don't expose unnecessary information about devices</h3>
2598+
<h3 id="device-ids">Don't expose unnecessary information about capabilities</h3>
25952599

2596-
In line with the [Data Minimization](#data-minimization) principle, if you need to give web sites access to information about a device, only expose the minimal amount of data necessary.
2600+
In line with the [Data Minimization](#data-minimization) principle,
2601+
if you need to give web sites access to information about capabilities,
2602+
only expose the minimal amount of data necessary.
25972603

25982604
Firstly, think carefully about whether it is really necessary
2599-
to expose identifying information about the device at all.
2605+
to expose information at all.
26002606
Consider whether your [user needs](#priority-of-constituencies) could be satisfied
26012607
by a less powerful API.
26022608

@@ -2605,8 +2611,11 @@ additional information about a device,
26052611
or device identifiers,
26062612
each increase the risk of harming the user's privacy.
26072613

2608-
A web app should not be able to distinguish between the user rejecting
2609-
permission to use a sensor/capability, and the sensor/capability not being present.
2614+
When a user makes a choice to deny access to a device or capability,
2615+
that should not reveal whether the capability exists.
2616+
Reducing information leakage in that scenario
2617+
is more important
2618+
than when the capability is granted.
26102619

26112620
As more specific information is shared,
26122621
the
@@ -2618,44 +2627,44 @@ to user privacy.
26182627
If there is no way to design a less powerful API,
26192628
use these guidelines when exposing device information:
26202629

2621-
: Limit information in the id
2630+
: Limit information in any identifier
26222631
:: Include as little identifiable information as possible
2623-
in device ids exposed to the web plaform.
2632+
in device identifiers exposed to the web plaform.
26242633
Identifiable information includes
26252634
branding, make and model numbers, etc
2626-
You can usually use a random number
2627-
or a unique id instead.
2628-
Make sure that your ids aren't guessable,
2635+
You can usually use a randomly generated identifier instead.
2636+
Make sure that your identifiers aren't guessable,
26292637
and aren't re-used.
26302638
: Keep the user in control
26312639
:: When the user chooses to clear browsing data,
2632-
make sure any stored device ids are cleared.
2633-
: Hide sensitive ids behind a user permission
2634-
:: If you can't create a device id in an anonymous way,
2640+
make sure any stored device identifiers are cleared.
2641+
: Hide sensitive information behind a user permission
2642+
:: If you can't create a device identifier in an anonymous way,
26352643
limit access to it.
26362644
Make sure the user can provide
26372645
[[#consent|meaningful consent]]
26382646
to a Web page accessing this information.
2639-
: Tie ids to the same-origin model
2640-
:: Create distinct unique ids for the same physical device
2647+
: Tie identifiers to the same-origin model
2648+
:: Create distinct identifiers for the same physical device
26412649
for each origin that has has access to it.
26422650
:: If the same device is requested more than once
2643-
by the same origin, return the same id for it
2651+
by the same origin, return the same identifier for it
26442652
(unless the user has cleared their browsing data).
26452653
This allows authors to avoid having
26462654
several copies of the same device.
26472655
: Persistable when necessary
2648-
:: If a device id is time consuming to obtain,
2649-
make sure authors can store an id generated in one session
2656+
:: If a device identifier is time consuming to obtain,
2657+
make sure authors can store an identifier generated in one session
26502658
for use in a later session.
26512659
You can do this by making sure that
2652-
the procedure to generate the id
2653-
consistently produces the same id
2660+
the procedure to generate the identifier
2661+
consistently produces the same value
26542662
for the same device,
26552663
for each origin.
26562664

26572665
See also:
26582666

2667+
* [[#consent]]
26592668
* [[LEAST-POWER]]
26602669
* [[FINGERPRINTING-GUIDANCE]]
26612670
* [[UNSANCTIONED-TRACKING]]
@@ -2729,7 +2738,7 @@ Note: While APIs should not
27292738
expose a full list of devices in an [=implementation-defined=] order,
27302739
they may need to for web compatibility reasons.
27312740

2732-
<h3 id="usecase-oriented-apis">Design based on user needs, not the underlying API or hardware</h3>
2741+
<h3 id="usecase-oriented-apis">Design based on user needs, not the underlying capability</h3>
27332742

27342743
Expose new native capabilities being brought to the web based on user needs.
27352744

0 commit comments

Comments
 (0)