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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>182638</bug_id>
          
          <creation_ts>2018-02-09 03:59:32 -0800</creation_ts>
          <short_desc>Iframe allow=&quot;geolocation; microphone; camera; midi; encrypted-media;&quot;</short_desc>
          <delta_ts>2018-04-05 11:08:59 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebRTC</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="iamtesting">shamun</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>kenma9123</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1397897</commentid>
    <comment_count>0</comment_count>
    <who name="iamtesting">shamun</who>
    <bug_when>2018-02-09 03:59:32 -0800</bug_when>
    <thetext>When i use &lt;iframe allow=&quot;geolocation; microphone; camera; midi; encrypted-media;&quot; &gt;&lt;/iframe&gt; it does not work
In Google chrome i can put that so that i can avoid same origin problem.

https://www.client.com
use iframe to use supplier services from https://supplier.supplier.com/webrtc

When will be the &quot;allow=&quot;geolocation; microphone; camera; midi; encrypted-media;&quot; options available?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1397900</commentid>
    <comment_count>1</comment_count>
    <who name="iamtesting">shamun</who>
    <bug_when>2018-02-09 04:22:31 -0800</bug_when>
    <thetext>Safari shows &quot;Trying to call getUserMedia from a document with a different security origin than its top-level frame.&quot; even &lt;iframe allow=&quot;geolocation; microphone; camera; midi; encrypted-media;&quot; &gt;&lt;/iframe&gt; is used

Here are the situation:

1. https://www.client.com use iframe services in there site
2. in the iframe they have following
&lt;iframe src=&quot;https://supplier.supplier.com/buy-service1&quot; allow=&quot;geolocation; microphone; camera; midi; encrypted-media;&quot;&gt;&lt;/iframe&gt;
3. Now in Google chrome it works, but not in Safari OSX,iOS.

How to make this work in Safari?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1397934</commentid>
    <comment_count>2</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2018-02-09 07:35:39 -0800</bug_when>
    <thetext>(In reply to iamtesting from comment #0)
&gt; When i use &lt;iframe allow=&quot;geolocation; microphone; camera; midi;
&gt; encrypted-media;&quot; &gt;&lt;/iframe&gt; it does not work
&gt; In Google chrome i can put that so that i can avoid same origin problem.

Is that a request to support geolocation, midi and encrypted-media?
Have you tried microphone and camera in recent STP?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1397936</commentid>
    <comment_count>3</comment_count>
    <who name="iamtesting">shamun</who>
    <bug_when>2018-02-09 07:44:53 -0800</bug_when>
    <thetext>Its a request to support this &quot;Deprecating Permissions in Cross-Origin Iframes:&quot; -
 https://dev.chromium.org/Home/chromium-security/deprecating-permissions-in-cross-origin-iframes

In Google Chrome we can use &lt;iframe allow=&quot;geolocation; microphone; camera; midi; encrypted-media;&quot; &gt;&lt;/iframe&gt; to overcome the issue, but in Safari none of the flags are working

i have tried all of those combination but none worked in recent STP (Beta latest available versions of Safari)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1397937</commentid>
    <comment_count>4</comment_count>
    <who name="iamtesting">shamun</who>
    <bug_when>2018-02-09 07:51:34 -0800</bug_when>
    <thetext>FYI

Please note that this feature: 

&lt;iframe allow=&quot;geolocation; microphone; camera; midi; encrypted-media;&quot; &gt;&lt;/iframe&gt;

Works on:

- Chromium (latest code)
- Node-WebKit
- Google chrome (official), Canary 
- Firefox
- Opera
- IE Edge
- Android Google chrome

Not works on:

- Safari OSX, iOS</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1399469</commentid>
    <comment_count>5</comment_count>
    <who name="iamtesting">shamun</who>
    <bug_when>2018-02-15 08:43:56 -0800</bug_when>
    <thetext>BUG

https://server1.domain1.com = Chat software = 217.x.x.x
https://server2.domain1.com = WebRTC software = 37.x.x.x

Now https://server1.domain1.com using iframe src=&quot;https://server2.domain1.com&quot; 
Why Safari is telling &quot;trying to call getusermedia from a document with a different security origin then its top-level frame.&quot; ?


Can anyone please fix this BUG? even applying &quot;allow=&quot;geolocation; microphone; camera; midi; encrypted-media;&quot;  is not fixing Safari. it keeps refusing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1399486</commentid>
    <comment_count>6</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2018-02-15 09:40:26 -0800</bug_when>
    <thetext>Can you try setting allow in JavaScript?
Something like:
frame.allow = &quot;camera;microphone&quot;

Would you be able to provide a repro case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1399566</commentid>
    <comment_count>7</comment_count>
    <who name="iamtesting">shamun</who>
    <bug_when>2018-02-15 12:05:21 -0800</bug_when>
    <thetext>@youenn fablet: How to send you a private link which will not be visible in public? 
(i cant expose my domain in public because of security, privacy, company policies)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1405537</commentid>
    <comment_count>8</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2018-03-10 21:38:59 -0800</bug_when>
    <thetext>Closing at behaving correctly in latest STP.
iamtesting, please reopen if needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1412033</commentid>
    <comment_count>9</comment_count>
    <who name="kenma">kenma9123</who>
    <bug_when>2018-04-05 04:07:13 -0700</bug_when>
    <thetext>Hi, still doesn&apos;t work. We tested it using the latest STP(Safari 11.2, WebKit 13606.1.11.2) but now with a new error. &quot;Could not access microphone: SecurityError: The operation is insecure.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1412037</commentid>
    <comment_count>10</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2018-04-05 07:08:25 -0700</bug_when>
    <thetext>Latest stp has an unrelated bug in getUserMedia</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1412038</commentid>
    <comment_count>11</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2018-04-05 07:09:57 -0700</bug_when>
    <thetext>Latest stp has an unrelated bug in getUserMedia.
Geolocation access is not yet supported indeed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1412077</commentid>
    <comment_count>12</comment_count>
    <who name="kenma">kenma9123</who>
    <bug_when>2018-04-05 10:11:35 -0700</bug_when>
    <thetext>The new error is &quot;SecurityError: The operation is insecure.&quot; after the &quot;Trying to call getUserMedia from a document with a different security origin than its top-level frame.&quot;. So it isn&apos;t fixed yet even of stp?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1412079</commentid>
    <comment_count>13</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2018-04-05 10:13:08 -0700</bug_when>
    <thetext>(In reply to kenma from comment #12)
&gt; The new error is &quot;SecurityError: The operation is insecure.&quot; after the
&gt; &quot;Trying to call getUserMedia from a document with a different security
&gt; origin than its top-level frame.&quot;. So it isn&apos;t fixed yet even of stp?

Kenma,
can you send me a link to a page showing the &quot;Trying to call getUserMedia from a document with a different security origin than its top-level frame.&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1412101</commentid>
    <comment_count>14</comment_count>
    <who name="kenma">kenma9123</who>
    <bug_when>2018-04-05 10:55:16 -0700</bug_when>
    <thetext>Isn&apos;t that&apos;s the original thread creator was referring to? Anyway here&apos;s a sample from JotForm (https://www.jotform.com/80945014172957). They have widgets, and widgets are served from a different domain. That widget access the microphone to make a recording. On Safari 11 when you record, check the console it will log about &quot;Trying to call getUserMedia from a document with a different security origin than its top-level frame.&quot; and when you load this on STP the error is &quot;SecurityError: The operation is insecure.&quot;

This started happening when the webkit policy on iframe have been applied (https://dev.chromium.org/Home/chromium-security/deprecating-permissions-in-cross-origin-iframes) - just like the thread creator was referring to.

Other browsers like Chrome and Firefox has no problem just with Safari.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1412103</commentid>
    <comment_count>15</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2018-04-05 11:02:46 -0700</bug_when>
    <thetext>(In reply to kenma from comment #14)
&gt; Isn&apos;t that&apos;s the original thread creator was referring to? Anyway here&apos;s a
&gt; sample from JotForm (https://www.jotform.com/80945014172957). They have
&gt; widgets, and widgets are served from a different domain. That widget access
&gt; the microphone to make a recording. On Safari 11 when you record, check the
&gt; console it will log about &quot;Trying to call getUserMedia from a document with
&gt; a different security origin than its top-level frame.&quot; and when you load
&gt; this on STP the error is &quot;SecurityError: The operation is insecure.&quot;
&gt; 
&gt; This started happening when the webkit policy on iframe have been applied
&gt; (https://dev.chromium.org/Home/chromium-security/deprecating-permissions-in-
&gt; cross-origin-iframes) - just like the thread creator was referring to.
&gt; 
&gt; Other browsers like Chrome and Firefox has no problem just with Safari.

STP52 and latest WebKit nightlies should have it.
STP53 has a temporary issue that basically disabled getUserMedia.

Testing locally, getUserMedia part of jotform is working fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1412109</commentid>
    <comment_count>16</comment_count>
    <who name="kenma">kenma9123</who>
    <bug_when>2018-04-05 11:08:59 -0700</bug_when>
    <thetext>okay thanks thats great to hear. I&apos;m actually unsure how often you update it for stable releases but when do we exactly expect the fixes to be ship to the latest stable build? not all users use STP tho. Anyway appreciate the effort guys. Was really trying to figure out as well until I stumbled upon this thread. Hoping it will live soon.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>