<?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>189901</bug_id>
          
          <creation_ts>2018-09-23 17:36:04 -0700</creation_ts>
          <short_desc>Implement support for allowlist for the features named in the &quot;allow&quot; attribute</short_desc>
          <delta_ts>2020-03-26 06:47:12 -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>Frames</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Subhojeet Sinha">subhojeet.sinha3</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>dbates</cc>
    
    <cc>jib</cc>
    
    <cc>john.irby</cc>
    
    <cc>subhojeet.sinha3</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1462583</commentid>
    <comment_count>0</comment_count>
    <who name="Subhojeet Sinha">subhojeet.sinha3</who>
    <bug_when>2018-09-23 17:36:04 -0700</bug_when>
    <thetext>As per https://wicg.github.io/feature-policy/#iframe-allow-attribute the allow attribute should support an allowlist(https://wicg.github.io/feature-policy/#allowlist)

A feature policy allowlist is conceptually a set of origins. An allowlist may be either the special value *, which represents every origin, or An ordered set of origins.

However, the current implementation doesn&apos;t support adding allowlist and the default value for the allowlist i.e. &apos;src&apos; is used, which represents the origin of the URL in the iframe’s src attribute.

&lt;iframe src=&quot;https://abc.com&quot; allow=&quot;geolocation; microphone; camera&quot;&gt;&lt;/iframe&gt;

With the current implementation, the above change will grant geolocation, microphone and camera access to the origin specified in the &quot;src&quot; attribute, i.e. in this case it would be https://abc.com. 

&lt;iframe src=&quot;https://abc.com&quot; allow=&quot;geolocation https://abc.com https://foo.com;&quot;&gt;&lt;/iframe&gt;

Adding the origins to the allow attribute as in the change above doesn&apos;t work currently and fails with the following error:
&quot;The top-level frame has prevented a document with a different security origin to call getUserMedia.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1463636</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-09-26 09:51:16 -0700</bug_when>
    <thetext>&lt;rdar://problem/44798874&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1505727</commentid>
    <comment_count>2</comment_count>
    <who name="">john.irby</who>
    <bug_when>2019-02-13 08:49:11 -0800</bug_when>
    <thetext>I am seeing this same issue on Safari version 12.0.3 (13606.4.5.3.1) - removing the allowlist from the attribute prompts for microphone access as specified in the original description

Is there any update on the status of this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1634301</commentid>
    <comment_count>3</comment_count>
    <who name="">jib</who>
    <bug_when>2020-03-26 06:47:12 -0700</bug_when>
    <thetext>Note this is affecting JSFiddle now due to https://github.com/jsfiddle/jsfiddle-issues/issues/1557#issuecomment-603689064

Example: https://jsfiddle.net/jib1/pz5pynyf/</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>