-
Notifications
You must be signed in to change notification settings - Fork 62
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
A privacy concern of "Media Capture and Streams" #630
Comments
Is it fair to describe your concern as: user agents may decide to prompt the user once for microphone access and will store that permission indefinitely so that web sites could from time to time access the microphone without explicit user permission? |
hi @youennf
|
It is currently up to the user agent to decide for the user or provide the user a way to choose 1 or 2.
|
@youennf Thanks for the explanation!
On the other hand. Is it possible to add one-shot API or parameter to distinct 2 different activities explicitly? I think the final decision could be made by the WebApp author by choosing proper APIs wisely. Or maybe it's out of our reach? |
cc @snyderp |
@NalaGinrut thanks, I share your concerns. Thanks for raising them! This is why Firefox supports "single-use" (until stream is stopped), with opt-in to
That is one way to go. However, I worry how many sites would opt in voluntarily to prompting their users more often in practice, which is why Firefox leaves this privacy decision in the hands of users, not sites today. |
@jan-ivar @NalaGinrut thanks for the discussion and pulling me in. My feeling is the same as @jan-ivar 's, that its not sufficient to design web standards to allow well behaved sites to behave well, but to also prevent malicious sites from being malicious.
|
hi @jan-ivar
Yes, from the perspective of the behavior, it's exactly what I expect. ;-)
This description is a bit vague for me, what are the
Yes, I agree with you. My proposal is in the hope that people can still try to push/negotiate with the WebApp authors after we make rules explicitly. |
Good question. There does not appear to be a concrete example in code at the specification. Following the link to "stopped" "source" appears to be referring to the media source device. Attempting to reproduce the result described at the language of the specification in code, consider
when In this case without a cloned
|
A source is stopped when all its tracks are either stopped or garbage collected, e.g. when |
I believe Chrome grants to top-level origin, which delegates permission through feature policy. This is what Firefox plans to implement as well. The benefits are comparable to double-keying: no permissions are ever persisted to the iframe's origin, neither by itself nor across different top-level origins. |
@guest271314 Thanks for the code! |
The code attempts to reproduce the language of the specification, and is probably not the only means available to achieve that output.
Not sure what you mean. How and what exactly would a malicious script be hijacking? |
I understand your code attempts to reproduce the specification, and I have no question with how you write the code. My question is trying to figure out why the spec permits the other object to hook the object which has enabled MIC even temporarily. Usually, if a clone operation copied all the subtree of an object, then it's ought to be collected by GC without concerning the cloned object. But it seems not here.
If I understand it correctly, the first object which enabled MIC has been hanging by the cloned object. So that the first object can never be freed iff the cloned object is kept intendedly. In this situation, I think the MIC is still working, right? I'm not trying to be picky here, and I know the condition to hijack is extream. :-) |
The other object is kept alive by All clones are equal; there's no original. E.g. there's no functional difference between: const [track1] = (await navigator.mediaDevices.getUserMedia({audio:true})).getTracks();
const [track2] = (await navigator.mediaDevices.getUserMedia({audio:true})).getTracks(); and const [track1] = (await navigator.mediaDevices.getUserMedia({audio:true})).getTracks();
const track2 = track1.clone();
|
In fact, we're giving people this workaround to extend permission to the end of session in Firefox: keepalive = stream.clone();
for (const track of keepalive.getTracks()) track.enabled = false; The spec has strong privacy indicator requirements, so everything should work as before, except you'll see gray (not red) camera/mic indicators in the URL bar when everything is off, and they'll turn red again instead of re-prompting user when site requests access anew. Sadly, this depends on #642. |
@NalaGinrut, I am closing this issue. |
Hi folks!
The PING is trying to review the privacy issues of WebAudio, and I was told that one of my concerns should be asked in
media capture
.Here's the original discussion, it's appreciated if anyone could provide further information, thanks! cc @svgeesus
The text was updated successfully, but these errors were encountered: