<?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>226345</bug_id>
          
          <creation_ts>2021-05-27 10:40:29 -0700</creation_ts>
          <short_desc>Support Apple Pay in cross-origin iframes with allow=payment attribute</short_desc>
          <delta_ts>2024-04-04 08:02:20 -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>WebCore Misc.</component>
          <version>Safari 14</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=167417</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=258217</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=259667</see_also>
          <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="Brad">brad.girardeau</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aestes</cc>
    
    <cc>anthony</cc>
    
    <cc>hi</cc>
    
    <cc>javier</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1764403</commentid>
    <comment_count>0</comment_count>
    <who name="Brad">brad.girardeau</who>
    <bug_when>2021-05-27 10:40:29 -0700</bug_when>
    <thetext>Web pages that use a third party payment vendor for a checkout flow may integrate the vendor in a cross-origin iframe to prevent the vendor from accessing non-payment data on the top level/main origin. However, this integration does not allow using Apple Pay due to this error: https://github.com/WebKit/WebKit/blob/Safari-612.1.11/Source/WebCore/Modules/applepay/PaymentSession.cpp#L63

The Payment Request spec supports this use case by allowing the top level/main origin to delegate payments permission to an iframe using the allow attribute: https://www.w3.org/TR/payment-request/#using-with-cross-origin-iframes. This opt-in mechanism prevents abuse by untrusted iframes because the top origin determines which of its children it intends to provide payments.

Safari/WebKit should support this attribute/use case in the Payment Request and Apple Pay APIs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1764672</commentid>
    <comment_count>1</comment_count>
    <who name="Devin Rousso">hi</who>
    <bug_when>2021-05-27 22:14:26 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 167417 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1799667</commentid>
    <comment_count>2</comment_count>
    <who name="Brad">brad.girardeau</who>
    <bug_when>2021-10-01 17:49:34 -0700</bug_when>
    <thetext>The duplicate ticket didn&apos;t end up addressing this issue: https://bugs.webkit.org/show_bug.cgi?id=229406#c15

Could we get input from someone on Apple Pay on resolving this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1841750</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-02-15 09:28:37 -0800</bug_when>
    <thetext>&lt;rdar://problem/88969594&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1941158</commentid>
    <comment_count>4</comment_count>
    <who name="Javier López Navarro">javier</who>
    <bug_when>2023-03-14 02:39:12 -0700</bug_when>
    <thetext>I have created a Pull Request on the WebKit repository with the changes suggested by Brad solving this issue.
https://github.com/WebKit/WebKit/pull/11485</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1946718</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-04-05 06:01:33 -0700</bug_when>
    <thetext>Committed 262616@main (fead01e13ad2): &lt;https://commits.webkit.org/262616@main&gt;

Reviewed commits have been landed. Closing PR #11485 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>