<?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>213934</bug_id>
          
          <creation_ts>2020-07-03 13:04:55 -0700</creation_ts>
          <short_desc>[WebAuthn] pinToken and uv option are mutually exclusive in CTAP2.0</short_desc>
          <delta_ts>2021-12-23 07:11:53 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>Safari Technology Preview</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>Other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=181943</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="login Llama">loginllama</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>jiewen_tan</cc>
    
    <cc>loginllama</cc>
    
    <cc>nuno.sung</cc>
    
    <cc>pascoe</cc>
    
    <cc>timcappalli</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1668626</commentid>
    <comment_count>0</comment_count>
    <who name="login Llama">loginllama</who>
    <bug_when>2020-07-03 13:04:55 -0700</bug_when>
    <thetext>iOS 14

Using a usb attached authenticator that has a getInfo options member that includes both clientPin=True and uv=True, causes the platform to first getPINToken then do makeCredential and getAssertion with both pinToken and the uv=1 option.   This is valid in CTAP 2.1 for a three factor authentication.  

In that flow the platform first prompts for clientPin then performs getPINToken.  
It then performs getAssertion with the pinToken and uv=True to force the authenticator to do uv (typically fingerprint) the authenticator must validate both before returning a assertion.

So while technically allowed it is probably not the intent to have iOS do a three factor authentication. 

I would expect for a authenticator that has a getInfo options member that includes both clientPin=True and uv=True in CTAP2.0. (The flow changes in CTAP2.1 but lets start with this.)
1) perform getAssertion or makeCredential with the uv option set to true.
2) If addassertion is returned then return to RP
3) If operation-denied  is returned then error
4) If pin-required is returned fall back to client PIN
5) If the getInfo options member doesn&apos;t include clientPin=True  Then error
6) prompt user for PIN
7) Negotiate shared secret
8) Do getPintoken
9) redo getAssertion with pinToken
10) joy

I skipped some steps depending on the size of the allow list. There is info on maximum credentialID size and max number of credentials in getInfo now that was added in FIDO_2_1_Pre that you should be using as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1668701</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-07-03 17:10:03 -0700</bug_when>
    <thetext>&lt;rdar://problem/65085265&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1675543</commentid>
    <comment_count>2</comment_count>
    <who name="Jiewen Tan">jiewen_tan</who>
    <bug_when>2020-07-28 01:12:19 -0700</bug_when>
    <thetext>Let&apos;s revisit this once we start implementing CTAP 2.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1735343</commentid>
    <comment_count>3</comment_count>
    <who name="login Llama">loginllama</who>
    <bug_when>2021-03-03 10:21:47 -0800</bug_when>
    <thetext>CTAP 2.1 RD was updated so that if the platform sends getAssertion with both pinToken and the uv=1 option, then the uv=1 option is ignored. 

We worked around the problem on the spec/authenticator side.

You should however still fix the problem</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1826352</commentid>
    <comment_count>4</comment_count>
    <who name="pascoe@apple.com">pascoe</who>
    <bug_when>2021-12-22 11:15:02 -0800</bug_when>
    <thetext>This was fixed in https://bugs.webkit.org/show_bug.cgi?id=232501 and https://bugs.webkit.org/show_bug.cgi?id=213903</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1826551</commentid>
    <comment_count>5</comment_count>
    <who name="login Llama">loginllama</who>
    <bug_when>2021-12-23 07:11:53 -0800</bug_when>
    <thetext>Thanks,  I am seeing the correct behavior now in Safari 15.2 on OSX and iOS 15.2</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>