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

Update Privacy and Security Considerations to reflect spec. #897

Merged
merged 5 commits into from
Jan 12, 2023

Conversation

jan-ivar
Copy link
Member

@jan-ivar jan-ivar commented Aug 8, 2022

Update the non-normative Privacy and Security Considerations section to reflect the normative algorithms after #574.


Preview | Diff

@jan-ivar
Copy link
Member Author

jan-ivar commented Aug 8, 2022

I also s/document/specification/, s/authorization/permission/ and s/developer/web document/ to avoid confusion.

@eladalon1983
Copy link
Member

Apologies for the delay. I'm freshly back from a relatively extended vacation. I aim to review this by the next editors' meeting.

tell whether the user has a camera or a microphone (but not how many). The
identifiers for the devices are designed to not be useful for a fingerprint
that can track the user between origins, but the presence of camera or
microphone ability adds two bits to the fingerprint surface. It recommends to treat the
per-origin persistent identifier {{MediaDeviceInfo/deviceId}} as other persistent
storage (e.g. cookies) are treated.</p>
<p>When authorization is given, this document describes how to get access
<p>Once camera or microphone capture has begun, this specification describes how to get access
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Contrast

When authorization is given

with

Once camera or microphone capture has begun

This seems to change behavior a bit, not just language. Is that intended?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is non-normative, so I'm not changing behavior, just language.

The old behavior that is being described here no longer matches the spec as of #574, so this PR attempts to fix this.

origins that have also been granted authorization, and thus potentially
<p>Once capture of camera or microphone has begun, the web document gains the
ability to discover all available media capture devices and their labels. This
ability lasts until the web document is closed, and cannot be persisted.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, the ability to capture camera/microphone is itself persistent, which means the ability to discover all available devices is also persistent. Or what am I missing?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capture always stops when document is closed.
Capture permission might persist, this is UA decision.
Chrome has a bug in that enumerateDevices is tied to capture permission and not to the fact the document is actually capturing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is crbug 1101860.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chrome has a bug in that enumerateDevices is tied to capture permission and not to the fact the document is actually capturing.

...actually capturing or has actively captured since it was opened.

getusermedia.html Outdated Show resolved Hide resolved
<p>For origins to which permission has been granted, the
<a data-link-type=event>devicechange</a> event will be emitted across browsing
<p>For web documents where capture has taken place or for web documents in focus, the
<a data-link-type=event>devicechange</a> event may be emitted across browsing
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For web documents where capture has taken place or for web documents in focus, the devicechange event may be emitted across browsing contexts

Could you please help me understand this?

Copy link
Member Author

@jan-ivar jan-ivar Oct 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The full paragraph: "For open web documents where capture has begun or has taken place, or for web documents that have focus, the devicechange event can end up being fired at the same time across multiple browsing contexts and origins each time a new media device is added or removed; user agents can mitigate the risk of correlation of browsing activity across origins by fuzzing the timing of these events, or by deferring their firing until those web documents gain focus."

The "can" is the MAY from here:
image

...which is used here:
image

IOW, browsers may decide to fire devicechange events on background tabs that have accessed gUM since they were opened, but are not required to do so, and may instead defer firing those events until said tabs receive focus.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In short, device exposure in enumerateDevices is no longer tied to (persistent) permission, since #574.

@alvestrand alvestrand marked this pull request as draft October 27, 2022 14:29
@jan-ivar
Copy link
Member Author

To aid discussion and avoid confusion I'd like to merge this ahead of next interim and #912.

@jan-ivar jan-ivar marked this pull request as ready for review October 31, 2022 17:22
getusermedia.html Outdated Show resolved Hide resolved
Co-authored-by: youennf <[email protected]>
@alvestrand
Copy link
Contributor

Still worried about the deployability of the behavior change (from labels-before-capture when you have permission to labels-after-capture-only).

@jan-ivar
Copy link
Member Author

Still worried about the deployability of the behavior change (from labels-before-capture when you have permission to labels-after-capture-only).

Of #574 you mean? Safari has deployed it AFAIK. Chrome and Firefox have patches ready.

But questions of deployment seem separate from this PR. #574 merged in 2019, and this PR only updates non-normative language to match normative algorithms, to make the spec self-consistent and clear about what it says.

@alvestrand
Copy link
Contributor

I note that this makes the spec consistent, but we still don't know if it's deployable (for Chrome, the previous patch set was reverted due to too many issues).

Still, a consistent spec is better than an inconsistent spec.

@aboba aboba merged commit 9a249e7 into w3c:main Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants