Bug 213934 - [WebAuthn] pinToken and uv option are mutually exclusive in CTAP2.0
Summary: [WebAuthn] pinToken and uv option are mutually exclusive in CTAP2.0
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: Safari Technology Preview
Hardware: iPhone / iPad Other
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-03 13:04 PDT by login Llama
Modified: 2021-03-30 17:10 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description login Llama 2020-07-03 13:04:55 PDT
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'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.
Comment 1 Radar WebKit Bug Importer 2020-07-03 17:10:03 PDT
<rdar://problem/65085265>
Comment 2 Jiewen Tan 2020-07-28 01:12:19 PDT
Let's revisit this once we start implementing CTAP 2.1.
Comment 3 login Llama 2021-03-03 10:21:47 PST
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