<?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>241517</bug_id>
          
          <creation_ts>2022-06-10 13:00:38 -0700</creation_ts>
          <short_desc>[webauthn] Enums should be DOMStrings</short_desc>
          <delta_ts>2022-08-29 13:33:17 -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>WebKit Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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>
          
          <blocked>242960</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Nina Satragno">nsatragno</reporter>
          <assigned_to name="pascoe@apple.com">pascoe</assigned_to>
          <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>1875289</commentid>
    <comment_count>0</comment_count>
    <who name="Nina Satragno">nsatragno</who>
    <bug_when>2022-06-10 13:00:38 -0700</bug_when>
    <thetext>WebAuthn enums should be DOMStrings instead, see the discussion on the spec [1]. If a value is not valid, it should be treated as not present (which usually means it should be converted into the default). This applies to AuthenticatorAttachment, ResidentKeyRequirement, UserVerificationRequirement, and AttestationConveyancePreference.

The spec does not prescribe this, but it might be worth issuing a warning if an unknown value is detected to aid debugging.

Example code:

navigator.credentials.create({
    publicKey: {
        challenge: new Uint8Array(),
        authenticatorSelection: {
            authenticatorAttachment: &quot;not a valid member&quot;,
        },
        rp: { name: &quot;rp&quot; },
        user: { displayName: &quot;display&quot;, name: &quot;user&quot;, id: new Uint8Array() },
        pubKeyCredParams: [],
    }
})

This throws TypeError but it should instead be equivalent to having an empty authenticatorAttachment, and maybe issue a warning instead.

[1] https://github.com/w3c/webauthn/issues/1738</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1875290</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-06-10 13:04:45 -0700</bug_when>
    <thetext>&lt;rdar://problem/94835072&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1876344</commentid>
    <comment_count>2</comment_count>
    <who name="pascoe@apple.com">pascoe</who>
    <bug_when>2022-06-16 15:50:29 -0700</bug_when>
    <thetext>We can remove AuthenticatorTransport::Cable after this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1881190</commentid>
    <comment_count>3</comment_count>
    <who name="pascoe@apple.com">pascoe</who>
    <bug_when>2022-07-06 16:36:52 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/2143</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1881794</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-07-08 15:26:42 -0700</bug_when>
    <thetext>Committed 252298@main (0ed0c27171ac): &lt;https://commits.webkit.org/252298@main&gt;

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

    </bug>

</bugzilla>