<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>25245</bug_id>
          
          <creation_ts>2014-04-03 07:41:01 +0000</creation_ts>
          <short_desc>Specify &quot;access&quot; in the context of getMediaDevices</short_desc>
          <delta_ts>2014-09-25 13:36:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebRTC Working Group</product>
          <component>Media Capture and Streams</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Harald Alvestrand">harald</reporter>
          <assigned_to name="Stefan Hakansson LK">stefan.lk.hakansson</assigned_to>
          <cc>anssi.kostiainen</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>fischman</cc>
    
    <cc>ian</cc>
    
    <cc>jib</cc>
    
    <cc>martin.thomson</cc>
    
    <cc>public-media-capture</cc>
    
    <cc>stefan.lk.hakansson</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103314</commentid>
    <comment_count>0</comment_count>
    <who name="Harald Alvestrand">harald</who>
    <bug_when>2014-04-03 07:41:01 +0000</bug_when>
    <thetext>The description of getMediaDevices says:

Collects information about the user agents available media input and output devices; for example a web camera or a headset. The method must only return information that the script is authorized to access (TODO expand authorized).

Expansion is needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103315</commentid>
    <comment_count>1</comment_count>
    <who name="Harald Alvestrand">harald</who>
    <bug_when>2014-04-03 07:46:41 +0000</bug_when>
    <thetext>My understanding of previous discussions:

- All Web pages may enumerate devices; in the deviceInfoList returned, the &quot;id&quot; and &quot;kind&quot; fields are populated. I think this category also includes the &quot;group&quot;.

- For any device where the JS would get access without an user prompt (&quot;trusted&quot; script, stored permissions or previously granted access), the &quot;label&quot; field will be populated.

I also believe we have decided that &quot;deviceId&quot; should be different for pages from different origins, so that one page cannot tell another page about devices (information leakage). This also hasn&apos;t been captured in the spec, as far as I can tell.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103482</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-04-07 15:57:56 +0000</bug_when>
    <thetext>This is a fingerprinting vulnerability (it provides previously-unavailable unique bits to identify the user), and thus should be considered in a privacy context.

This is a potential abuse vulnerability (combined with other APIs, it allows the author to send content to remote speakers without the user&apos;s consent).

As a user, I would not want a Web page to be able to enumerate any devices I have without my explicit opt-in.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103486</commentid>
    <comment_count>3</comment_count>
    <who name="Martin Thomson">martin.thomson</who>
    <bug_when>2014-04-07 17:08:27 +0000</bug_when>
    <thetext>(In reply to Ian &apos;Hixie&apos; Hickson from comment #2)
&gt; This is a fingerprinting vulnerability (it provides previously-unavailable
&gt; unique bits to identify the user), and thus should be considered in a
&gt; privacy context.

There has been a lot of thought put into this from a privacy perspective.  The actual exposure is limited to a count of devices of each type, plus, if we include &quot;group&quot; correlation of matched devices.

There&apos;s a tension here between usability and privacy.  I expect browsers to include controls that allow a user to control this exposure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103596</commentid>
    <comment_count>4</comment_count>
    <who name="Jan-Ivar Bruaroey [:jib]">jib</who>
    <bug_when>2014-04-09 15:49:15 +0000</bug_when>
    <thetext>(In reply to Martin Thomson from comment #3)
&gt; There&apos;s a tension here between usability and privacy.

Perhaps a refresh of the usability would be helpful?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103600</commentid>
    <comment_count>5</comment_count>
    <who name="Martin Thomson">martin.thomson</who>
    <bug_when>2014-04-09 16:48:10 +0000</bug_when>
    <thetext>The best usability argument I have to hand is this:

A user frequents a site that uses gUM, but does not provide persistent permissions (maybe because they use the peerIdentity constraint exclusively).  The site is able to use the device identifier, which is stable, to ensure that the same device is used every time.

The site is able to detect when that device is not available and use the device identifiers to provide predictable fallback behaviour.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103608</commentid>
    <comment_count>6</comment_count>
    <who name="Jan-Ivar Bruaroey [:jib]">jib</who>
    <bug_when>2014-04-09 17:35:44 +0000</bug_when>
    <thetext>(In reply to Martin Thomson from comment #5)

That seems doable without this feature. gUM({sourceId:x}) fails == n/a detected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103610</commentid>
    <comment_count>7</comment_count>
    <who name="Martin Thomson">martin.thomson</who>
    <bug_when>2014-04-09 17:57:20 +0000</bug_when>
    <thetext>(In reply to Jan-Ivar Bruaroey [:jib] from comment #6)
&gt; (In reply to Martin Thomson from comment #5)
&gt; 
&gt; That seems doable without this feature. gUM({sourceId:x}) fails == n/a
&gt; detected.

True, for this case.  As long as you make it fail hard, gUM won&apos;t trigger the user prompt.  That&apos;s not true of some of the other use cases.  I know that I shouldn&apos;t have trouble summoning the details, but I am.  I&apos;ll have to get back to this.

&quot;group&quot; allows an application to select a paired camera and microphone.  It also prevents cases where audio output is directed to one set of headphones, and input is derived from the same.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108487</commentid>
    <comment_count>8</comment_count>
    <who name="Harald Alvestrand">harald</who>
    <bug_when>2014-06-30 13:18:14 +0000</bug_when>
    <thetext>Suggested resolution:

Add a new section under 9.2 MediaDevices, called &quot;Access control model&quot;.
Content:

The access to media device information depends on whether or not permission has been granted to the page&apos;s origin for use of any media devices.

If no such access has been granted, the MediaDeviceInfo dictionary will contain the deviceId, the kind and the groupId.

If access has been granted for any media device, the MediaDeviceInfo dictionary will contain the deviceId, the kind, the label and the groupId.

Add to the definition of &quot;deviceId&quot;:

The unique id is valid for the page&apos;s origin only.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110618</commentid>
    <comment_count>9</comment_count>
    <who name="Jan-Ivar Bruaroey [:jib]">jib</who>
    <bug_when>2014-08-26 17:04:34 +0000</bug_when>
    <thetext>Are we supposed to take it on faith that there are use-cases that require this feature?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111587</commentid>
    <comment_count>10</comment_count>
    <who name="Stefan Hakansson LK">stefan.lk.hakansson</who>
    <bug_when>2014-09-16 14:12:59 +0000</bug_when>
    <thetext>Pull request #8 addresses part of this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111599</commentid>
    <comment_count>11</comment_count>
    <who name="Dominique Hazael-Massieux">dom</who>
    <bug_when>2014-09-16 15:41:38 +0000</bug_when>
    <thetext>(In reply to Stefan Hakansson LK from comment #10)
&gt; Pull request #8 addresses part of this.

I&apos;ve updated PR 8 to add the missing bits, and fixing an incorrect understanding of when mediadeviceinfo gets exposed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112171</commentid>
    <comment_count>12</comment_count>
    <who name="Stefan Hakansson LK">stefan.lk.hakansson</who>
    <bug_when>2014-09-25 13:36:02 +0000</bug_when>
    <thetext>Fixed in http://w3c.github.io/mediacapture-main/archives/20140924/getusermedia.html</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>