Title: [292665] branches/safari-613-branch
Revision
292665
Author
[email protected]
Date
2022-04-08 17:14:36 -0700 (Fri, 08 Apr 2022)

Log Message

Cherry-pick r288622. rdar://problem/91446028

    [WebAuthn] Add authenticator attachment used during authentication to credential payload
    https://bugs.webkit.org/show_bug.cgi?id=235621
    rdar://86538235

    Reviewed by Dean Jackson.

    Source/WebCore:

    This patch adds the authenticator attachment used to the credential response in get/create
    webauthn calls as described in the merged PR to the spec: https://github.com/w3c/webauthn/pull/1668/files

    Modified layout tests to check for authenticator attachment = (cross-platform/platform) where appropriate
    and verified response in manual calls.

    * Modules/webauthn/PublicKeyCredential.cpp:
    (WebCore::PublicKeyCredential::authenticatorAttachment const):
    * Modules/webauthn/PublicKeyCredential.h:
    * Modules/webauthn/PublicKeyCredential.idl:

    LayoutTests:

    Modify webauthn layout tests to check for new authenticatorAttachment field.
    * http/wpt/webauthn/public-key-credential-get-success-local.https.html:
    * http/wpt/webauthn/resources/util.js:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288622 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-613-branch/LayoutTests/ChangeLog (292664 => 292665)


--- branches/safari-613-branch/LayoutTests/ChangeLog	2022-04-09 00:14:31 UTC (rev 292664)
+++ branches/safari-613-branch/LayoutTests/ChangeLog	2022-04-09 00:14:36 UTC (rev 292665)
@@ -1,5 +1,49 @@
 2022-04-07  Alan Coon  <[email protected]>
 
+        Cherry-pick r288622. rdar://problem/91446028
+
+    [WebAuthn] Add authenticator attachment used during authentication to credential payload
+    https://bugs.webkit.org/show_bug.cgi?id=235621
+    rdar://86538235
+    
+    Reviewed by Dean Jackson.
+    
+    Source/WebCore:
+    
+    This patch adds the authenticator attachment used to the credential response in get/create
+    webauthn calls as described in the merged PR to the spec: https://github.com/w3c/webauthn/pull/1668/files
+    
+    Modified layout tests to check for authenticator attachment = (cross-platform/platform) where appropriate
+    and verified response in manual calls.
+    
+    * Modules/webauthn/PublicKeyCredential.cpp:
+    (WebCore::PublicKeyCredential::authenticatorAttachment const):
+    * Modules/webauthn/PublicKeyCredential.h:
+    * Modules/webauthn/PublicKeyCredential.idl:
+    
+    LayoutTests:
+    
+    Modify webauthn layout tests to check for new authenticatorAttachment field.
+    * http/wpt/webauthn/public-key-credential-get-success-local.https.html:
+    * http/wpt/webauthn/resources/util.js:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-01-26  J Pascoe  <[email protected]>
+
+            [WebAuthn] Add authenticator attachment used during authentication to credential payload
+            https://bugs.webkit.org/show_bug.cgi?id=235621
+            rdar://86538235
+
+            Reviewed by Dean Jackson.
+
+            Modify webauthn layout tests to check for new authenticatorAttachment field.
+            * http/wpt/webauthn/public-key-credential-get-success-local.https.html:
+            * http/wpt/webauthn/resources/util.js:
+
+2022-04-07  Alan Coon  <[email protected]>
+
         Cherry-pick r292229. rdar://problem/90778752
 
     CSP: WASM fails to execute after window.open

Modified: branches/safari-613-branch/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-local.https.html (292664 => 292665)


--- branches/safari-613-branch/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-local.https.html	2022-04-09 00:14:31 UTC (rev 292664)
+++ branches/safari-613-branch/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-local.https.html	2022-04-09 00:14:36 UTC (rev 292665)
@@ -16,6 +16,7 @@
         assert_equals(bytesToASCIIString(credential.response.clientDataJSON), '{"type":"webauthn.get","challenge":"MTIzNDU2","origin":"https://localhost:9443"}');
         assert_array_equals(new Uint8Array(credential.response.userHandle), Base64URL.parse(testUserhandleBase64));
         assert_not_own_property(credential.getClientExtensionResults(), "appid");
+        assert_equals(credential.authenticatorAttachment, 'platform');
 
         // Check authData
         const authData = decodeAuthData(new Uint8Array(credential.response.authenticatorData));

Modified: branches/safari-613-branch/LayoutTests/http/wpt/webauthn/resources/util.js (292664 => 292665)


--- branches/safari-613-branch/LayoutTests/http/wpt/webauthn/resources/util.js	2022-04-09 00:14:31 UTC (rev 292664)
+++ branches/safari-613-branch/LayoutTests/http/wpt/webauthn/resources/util.js	2022-04-09 00:14:36 UTC (rev 292665)
@@ -425,6 +425,7 @@
     // Check respond
     assert_array_equals(Base64URL.parse(credential.id), Base64URL.parse(testHidCredentialIdBase64));
     assert_equals(credential.type, 'public-key');
+    assert_equals(credential.authenticatorAttachment, 'cross-platform')
     assert_array_equals(new Uint8Array(credential.rawId), Base64URL.parse(testHidCredentialIdBase64));
     assert_equals(bytesToASCIIString(credential.response.clientDataJSON), '{"type":"webauthn.get","challenge":"MTIzNDU2","origin":"https://localhost:9443"}');
     if (userHandleBase64 == null)

Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (292664 => 292665)


--- branches/safari-613-branch/Source/WebCore/ChangeLog	2022-04-09 00:14:31 UTC (rev 292664)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog	2022-04-09 00:14:36 UTC (rev 292665)
@@ -1,5 +1,56 @@
 2022-04-07  Alan Coon  <[email protected]>
 
+        Cherry-pick r288622. rdar://problem/91446028
+
+    [WebAuthn] Add authenticator attachment used during authentication to credential payload
+    https://bugs.webkit.org/show_bug.cgi?id=235621
+    rdar://86538235
+    
+    Reviewed by Dean Jackson.
+    
+    Source/WebCore:
+    
+    This patch adds the authenticator attachment used to the credential response in get/create
+    webauthn calls as described in the merged PR to the spec: https://github.com/w3c/webauthn/pull/1668/files
+    
+    Modified layout tests to check for authenticator attachment = (cross-platform/platform) where appropriate
+    and verified response in manual calls.
+    
+    * Modules/webauthn/PublicKeyCredential.cpp:
+    (WebCore::PublicKeyCredential::authenticatorAttachment const):
+    * Modules/webauthn/PublicKeyCredential.h:
+    * Modules/webauthn/PublicKeyCredential.idl:
+    
+    LayoutTests:
+    
+    Modify webauthn layout tests to check for new authenticatorAttachment field.
+    * http/wpt/webauthn/public-key-credential-get-success-local.https.html:
+    * http/wpt/webauthn/resources/util.js:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-01-26  J Pascoe  <[email protected]>
+
+            [WebAuthn] Add authenticator attachment used during authentication to credential payload
+            https://bugs.webkit.org/show_bug.cgi?id=235621
+            rdar://86538235
+
+            Reviewed by Dean Jackson.
+
+            This patch adds the authenticator attachment used to the credential response in get/create
+            webauthn calls as described in the merged PR to the spec: https://github.com/w3c/webauthn/pull/1668/files
+
+            Modified layout tests to check for authenticator attachment = (cross-platform/platform) where appropriate
+            and verified response in manual calls.
+
+            * Modules/webauthn/PublicKeyCredential.cpp:
+            (WebCore::PublicKeyCredential::authenticatorAttachment const):
+            * Modules/webauthn/PublicKeyCredential.h:
+            * Modules/webauthn/PublicKeyCredential.idl:
+
+2022-04-07  Alan Coon  <[email protected]>
+
         Cherry-pick r292229. rdar://problem/90778752
 
     CSP: WASM fails to execute after window.open

Modified: branches/safari-613-branch/Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp (292664 => 292665)


--- branches/safari-613-branch/Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp	2022-04-09 00:14:31 UTC (rev 292664)
+++ branches/safari-613-branch/Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp	2022-04-09 00:14:36 UTC (rev 292665)
@@ -53,6 +53,11 @@
     return m_response->extensions();
 }
 
+AuthenticatorAttachment PublicKeyCredential::authenticatorAttachment() const
+{
+    return m_response->attachment();
+}
+
 PublicKeyCredential::PublicKeyCredential(Ref<AuthenticatorResponse>&& response)
     : BasicCredential(base64URLEncodeToString(response->rawId()->data(), response->rawId()->byteLength()), Type::PublicKey, Discovery::Remote)
     , m_response(WTFMove(response))

Modified: branches/safari-613-branch/Source/WebCore/Modules/webauthn/PublicKeyCredential.h (292664 => 292665)


--- branches/safari-613-branch/Source/WebCore/Modules/webauthn/PublicKeyCredential.h	2022-04-09 00:14:31 UTC (rev 292664)
+++ branches/safari-613-branch/Source/WebCore/Modules/webauthn/PublicKeyCredential.h	2022-04-09 00:14:36 UTC (rev 292665)
@@ -33,6 +33,7 @@
 
 namespace WebCore {
 
+enum class AuthenticatorAttachment;
 class AuthenticatorResponse;
 class Document;
 
@@ -46,6 +47,7 @@
 
     ArrayBuffer* rawId() const;
     AuthenticatorResponse* response() const { return m_response.ptr(); }
+    AuthenticatorAttachment authenticatorAttachment() const;
     AuthenticationExtensionsClientOutputs getClientExtensionResults() const;
 
     static void isUserVerifyingPlatformAuthenticatorAvailable(Document&, DOMPromiseDeferred<IDLBoolean>&&);

Modified: branches/safari-613-branch/Source/WebCore/Modules/webauthn/PublicKeyCredential.idl (292664 => 292665)


--- branches/safari-613-branch/Source/WebCore/Modules/webauthn/PublicKeyCredential.idl	2022-04-09 00:14:31 UTC (rev 292664)
+++ branches/safari-613-branch/Source/WebCore/Modules/webauthn/PublicKeyCredential.idl	2022-04-09 00:14:36 UTC (rev 292665)
@@ -31,6 +31,7 @@
 ] interface PublicKeyCredential : BasicCredential {
     [SameObject] readonly attribute ArrayBuffer rawId;
     [SameObject] readonly attribute AuthenticatorResponse response;
+    [SameObject] readonly attribute AuthenticatorAttachment? authenticatorAttachment;
     AuthenticationExtensionsClientOutputs getClientExtensionResults();
 
     [CallWith=Document] static Promise<boolean> isUserVerifyingPlatformAuthenticatorAvailable();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to