Implement a Fake CTAP2 device so that MockFidoDevice are not used in browser tests.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8dab8cfefbdc92721e825a466b1b249ef9842443 commit 8dab8cfefbdc92721e825a466b1b249ef9842443 Author: Jun Choi <hongjunchoi@chromium.org> Date: Mon Apr 23 17:32:38 2018 Separate U2F specific logic in VirtualFidoDevice Change VirtualFidoDevice class to be abstract interface and create VirtualU2fDevice class which implements the interface. This CL prepares for implementation of VirtualCtap2Device. Bug: 829413 Change-Id: I2cc618492c1626f8dfb50a821e4ed62533ad0975 Reviewed-on: https://chromium-review.googlesource.com/1009103 Commit-Queue: Jun Choi <hongjunchoi@chromium.org> Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org> Reviewed-by: Balazs Engedy <engedy@chromium.org> Cr-Commit-Position: refs/heads/master@{#552742} [modify] https://crrev.com/8dab8cfefbdc92721e825a466b1b249ef9842443/content/browser/webauth/virtual_authenticator.cc [modify] https://crrev.com/8dab8cfefbdc92721e825a466b1b249ef9842443/device/fido/BUILD.gn [modify] https://crrev.com/8dab8cfefbdc92721e825a466b1b249ef9842443/device/fido/scoped_virtual_fido_device.cc [modify] https://crrev.com/8dab8cfefbdc92721e825a466b1b249ef9842443/device/fido/u2f_register_unittest.cc [modify] https://crrev.com/8dab8cfefbdc92721e825a466b1b249ef9842443/device/fido/u2f_sign_unittest.cc [modify] https://crrev.com/8dab8cfefbdc92721e825a466b1b249ef9842443/device/fido/virtual_fido_device.cc [modify] https://crrev.com/8dab8cfefbdc92721e825a466b1b249ef9842443/device/fido/virtual_fido_device.h [add] https://crrev.com/8dab8cfefbdc92721e825a466b1b249ef9842443/device/fido/virtual_u2f_device.cc [add] https://crrev.com/8dab8cfefbdc92721e825a466b1b249ef9842443/device/fido/virtual_u2f_device.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f61ecf92e8bd6e414ecd0086dfe477c034449631 commit f61ecf92e8bd6e414ecd0086dfe477c034449631 Author: jdoerrie <jdoerrie@chromium.org> Date: Tue Apr 24 14:44:42 2018 [fido] Add SpanLess to Parsing Utils This change introduces SpanLess to //device/fido's parsing utils. This is a function object similarly to std::less<>, converting its arguments to base::spans before comparing them. Example use cases include ordered collections of std::vectors, that wish to support lookup using a base::span. Bug: 829413 Change-Id: Ic74bdf67012e5cc698f3c24b7956ab739b6ff9cd Reviewed-on: https://chromium-review.googlesource.com/1025650 Reviewed-by: Balazs Engedy <engedy@chromium.org> Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org> Cr-Commit-Position: refs/heads/master@{#553099} [modify] https://crrev.com/f61ecf92e8bd6e414ecd0086dfe477c034449631/device/fido/fido_parsing_utils.h [modify] https://crrev.com/f61ecf92e8bd6e414ecd0086dfe477c034449631/device/fido/fido_parsing_utils_unittest.cc [modify] https://crrev.com/f61ecf92e8bd6e414ecd0086dfe477c034449631/device/fido/virtual_fido_device.h [modify] https://crrev.com/f61ecf92e8bd6e414ecd0086dfe477c034449631/device/fido/virtual_u2f_device.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/09664c0351aa4a4c6f8e3c04357ff3862f4b82b4 commit 09664c0351aa4a4c6f8e3c04357ff3862f4b82b4 Author: Jun Choi <hongjunchoi@chromium.org> Date: Sat Jun 23 01:37:00 2018 Implement parsing logic for MakeCredentialRequest In order to implement virtual CTAP2 security key, we need to be able to parse and validate serialized MakeCredential request bytes that the client sends to the device. Add the corresponding parsing/validation logic. Bug: 829413 Change-Id: Ibbb2800a444d844b01ce7a35eba50a4541b0da02 Reviewed-on: https://chromium-review.googlesource.com/1104956 Commit-Queue: Jun Choi <hongjunchoi@chromium.org> Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org> Cr-Commit-Position: refs/heads/master@{#569871} [modify] https://crrev.com/09664c0351aa4a4c6f8e3c04357ff3862f4b82b4/device/fido/ctap_make_credential_request.cc [modify] https://crrev.com/09664c0351aa4a4c6f8e3c04357ff3862f4b82b4/device/fido/ctap_make_credential_request.h [modify] https://crrev.com/09664c0351aa4a4c6f8e3c04357ff3862f4b82b4/device/fido/ctap_request_unittest.cc [modify] https://crrev.com/09664c0351aa4a4c6f8e3c04357ff3862f4b82b4/device/fido/fido_constants.cc [modify] https://crrev.com/09664c0351aa4a4c6f8e3c04357ff3862f4b82b4/device/fido/fido_constants.h [modify] https://crrev.com/09664c0351aa4a4c6f8e3c04357ff3862f4b82b4/device/fido/fido_test_data.h [modify] https://crrev.com/09664c0351aa4a4c6f8e3c04357ff3862f4b82b4/device/fido/public_key_credential_params.cc [modify] https://crrev.com/09664c0351aa4a4c6f8e3c04357ff3862f4b82b4/device/fido/public_key_credential_params.h [modify] https://crrev.com/09664c0351aa4a4c6f8e3c04357ff3862f4b82b4/device/fido/public_key_credential_rp_entity.cc [modify] https://crrev.com/09664c0351aa4a4c6f8e3c04357ff3862f4b82b4/device/fido/public_key_credential_rp_entity.h [modify] https://crrev.com/09664c0351aa4a4c6f8e3c04357ff3862f4b82b4/device/fido/public_key_credential_user_entity.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0fdaa394fd0a57872a189ca3b4bfefb91e70e033 commit 0fdaa394fd0a57872a189ca3b4bfefb91e70e033 Author: Jun Choi <hongjunchoi@chromium.org> Date: Tue Jun 26 19:57:35 2018 Implement serialization logic for GetInfo response In order to implement virtual CTAP2 security key, we need to be able to serialize response data for MakeCredential GetAssertion, and GetInfo request. Add logic for serializing GetInfo response. Bug: 829413 Change-Id: Iaeff50b8352be01f2ebb71d597cdfb66fab9407c Reviewed-on: https://chromium-review.googlesource.com/1109265 Commit-Queue: Jun Choi <hongjunchoi@chromium.org> Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org> Cr-Commit-Position: refs/heads/master@{#570504} [modify] https://crrev.com/0fdaa394fd0a57872a189ca3b4bfefb91e70e033/device/fido/authenticator_get_info_response.cc [modify] https://crrev.com/0fdaa394fd0a57872a189ca3b4bfefb91e70e033/device/fido/authenticator_get_info_response.h [modify] https://crrev.com/0fdaa394fd0a57872a189ca3b4bfefb91e70e033/device/fido/authenticator_supported_options.cc [modify] https://crrev.com/0fdaa394fd0a57872a189ca3b4bfefb91e70e033/device/fido/authenticator_supported_options.h [modify] https://crrev.com/0fdaa394fd0a57872a189ca3b4bfefb91e70e033/device/fido/ctap_response_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3f7386613b91543a0bd258970ceb0ef7e8ec6692 commit 3f7386613b91543a0bd258970ceb0ef7e8ec6692 Author: Jun Choi <hongjunchoi@chromium.org> Date: Wed Jun 27 02:01:25 2018 Add parsing logic for GetAssertion request In order to implement virtual CTAP2 security key we need to parse and validate serialized GetAssertion request that the client sends to the device. Add corresponding parsing logic. Bug: 829413 Change-Id: Idd20a7b138ebaeda39b412824519750eccd7c673 Reviewed-on: https://chromium-review.googlesource.com/1110447 Commit-Queue: Jun Choi <hongjunchoi@chromium.org> Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org> Cr-Commit-Position: refs/heads/master@{#570629} [modify] https://crrev.com/3f7386613b91543a0bd258970ceb0ef7e8ec6692/device/fido/ctap_get_assertion_request.cc [modify] https://crrev.com/3f7386613b91543a0bd258970ceb0ef7e8ec6692/device/fido/ctap_get_assertion_request.h [modify] https://crrev.com/3f7386613b91543a0bd258970ceb0ef7e8ec6692/device/fido/ctap_request_unittest.cc [modify] https://crrev.com/3f7386613b91543a0bd258970ceb0ef7e8ec6692/device/fido/fido_test_data.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/acf468d3845f091e1cf8e0757b7ef2cf077043e9 commit acf468d3845f091e1cf8e0757b7ef2cf077043e9 Author: Jun Choi <hongjunchoi@chromium.org> Date: Wed Jun 27 07:09:49 2018 Add serialization logic for MakeCredential response Serialization for MakeCredential response is required to implement virtual CTAP2 security key. Bug: 829413 Change-Id: I268c1f11f03e23a2d0713de3de0b53694a3fc31a Reviewed-on: https://chromium-review.googlesource.com/1111337 Commit-Queue: Jun Choi <hongjunchoi@chromium.org> Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org> Cr-Commit-Position: refs/heads/master@{#570683} [modify] https://crrev.com/acf468d3845f091e1cf8e0757b7ef2cf077043e9/device/fido/attestation_object.cc [modify] https://crrev.com/acf468d3845f091e1cf8e0757b7ef2cf077043e9/device/fido/attestation_object.h [modify] https://crrev.com/acf468d3845f091e1cf8e0757b7ef2cf077043e9/device/fido/attestation_statement.h [modify] https://crrev.com/acf468d3845f091e1cf8e0757b7ef2cf077043e9/device/fido/authenticator_make_credential_response.cc [modify] https://crrev.com/acf468d3845f091e1cf8e0757b7ef2cf077043e9/device/fido/authenticator_make_credential_response.h [modify] https://crrev.com/acf468d3845f091e1cf8e0757b7ef2cf077043e9/device/fido/ctap_response_unittest.cc [modify] https://crrev.com/acf468d3845f091e1cf8e0757b7ef2cf077043e9/device/fido/fido_test_data.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0080859a36cbca670155d0f5bc894c0bc8ddb80c commit 0080859a36cbca670155d0f5bc894c0bc8ddb80c Author: Jun Choi <hongjunchoi@chromium.org> Date: Wed Jun 27 07:45:01 2018 Add serialization logic for GetAssertion response Add serialization logic for GetAsserion response needed to implement virtual CTAP2 device. Bug: 829413 Change-Id: I144a48bd99be2fa09231d76718ecf97bb9ad75b4 Reviewed-on: https://chromium-review.googlesource.com/1114286 Commit-Queue: Jun Choi <hongjunchoi@chromium.org> Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org> Cr-Commit-Position: refs/heads/master@{#570689} [modify] https://crrev.com/0080859a36cbca670155d0f5bc894c0bc8ddb80c/device/fido/authenticator_get_assertion_response.cc [modify] https://crrev.com/0080859a36cbca670155d0f5bc894c0bc8ddb80c/device/fido/authenticator_get_assertion_response.h [modify] https://crrev.com/0080859a36cbca670155d0f5bc894c0bc8ddb80c/device/fido/ctap_response_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/66761161a74bfafc800e902aba75b91e5c36db23 commit 66761161a74bfafc800e902aba75b91e5c36db23 Author: Jun Choi <hongjunchoi@chromium.org> Date: Mon Jul 02 23:03:08 2018 Implement MakeCredential operation for softkey Add MakeCredential operation to VirtualCtap2Device. VirtualCtap2Device only supports ES256 algorithm and provides packed attestation statement during registration. Bug: 829413 Change-Id: I70782952bdbb2f9f749bb27756a84a6bd37af46d Reviewed-on: https://chromium-review.googlesource.com/1115900 Commit-Queue: Jun Choi <hongjunchoi@chromium.org> Reviewed-by: Kim Paulhamus <kpaulhamus@chromium.org> Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org> Cr-Commit-Position: refs/heads/master@{#572032} [modify] https://crrev.com/66761161a74bfafc800e902aba75b91e5c36db23/device/fido/BUILD.gn [modify] https://crrev.com/66761161a74bfafc800e902aba75b91e5c36db23/device/fido/authenticator_get_info_response.cc [modify] https://crrev.com/66761161a74bfafc800e902aba75b91e5c36db23/device/fido/authenticator_get_info_response.h [modify] https://crrev.com/66761161a74bfafc800e902aba75b91e5c36db23/device/fido/ctap_make_credential_request.h [modify] https://crrev.com/66761161a74bfafc800e902aba75b91e5c36db23/device/fido/ctap_response_unittest.cc [modify] https://crrev.com/66761161a74bfafc800e902aba75b91e5c36db23/device/fido/make_credential_task_unittest.cc [add] https://crrev.com/66761161a74bfafc800e902aba75b91e5c36db23/device/fido/virtual_ctap2_device.cc [add] https://crrev.com/66761161a74bfafc800e902aba75b91e5c36db23/device/fido/virtual_ctap2_device.h [modify] https://crrev.com/66761161a74bfafc800e902aba75b91e5c36db23/device/fido/virtual_fido_device.cc [modify] https://crrev.com/66761161a74bfafc800e902aba75b91e5c36db23/device/fido/virtual_fido_device.h [modify] https://crrev.com/66761161a74bfafc800e902aba75b91e5c36db23/device/fido/virtual_u2f_device.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3106cc62b09c9dfeb2dd754bb40a1a220b17b54b commit 3106cc62b09c9dfeb2dd754bb40a1a220b17b54b Author: Jun Choi <hongjunchoi@chromium.org> Date: Tue Jul 03 18:22:58 2018 Implement sign for VirtualCtap2Device Implement GetAssertion operation for CTAP2 software key. The implement GetAssertionOperation does not support multiple accounts per device and never returns UserEntity as a response. Bug: 829413 Change-Id: I58a43a032fc520494ea8fdbfb1c64959a04c6b82 Reviewed-on: https://chromium-review.googlesource.com/1117369 Commit-Queue: Jun Choi <hongjunchoi@chromium.org> Reviewed-by: Kim Paulhamus <kpaulhamus@chromium.org> Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org> Cr-Commit-Position: refs/heads/master@{#572296} [modify] https://crrev.com/3106cc62b09c9dfeb2dd754bb40a1a220b17b54b/device/fido/get_assertion_task_unittest.cc [modify] https://crrev.com/3106cc62b09c9dfeb2dd754bb40a1a220b17b54b/device/fido/virtual_ctap2_device.cc [modify] https://crrev.com/3106cc62b09c9dfeb2dd754bb40a1a220b17b54b/device/fido/virtual_ctap2_device.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4b57df03f3976e0c2d0c9044505753f6b9004cf6 commit 4b57df03f3976e0c2d0c9044505753f6b9004cf6 Author: Jun Choi <hongjunchoi@chromium.org> Date: Tue Jul 03 21:06:28 2018 Apply VirtualCtap2Device to browser tests Add end to end tests using VirtualCtap2Device and replace all use of MockFidoDevice in integration tests. Bug: 829413 Change-Id: If483308eda2502efd93ab9996c75f976e89bfd2b Reviewed-on: https://chromium-review.googlesource.com/1117838 Commit-Queue: Jun Choi <hongjunchoi@chromium.org> Reviewed-by: Balazs Engedy <engedy@chromium.org> Reviewed-by: Kim Paulhamus <kpaulhamus@chromium.org> Cr-Commit-Position: refs/heads/master@{#572352} [modify] https://crrev.com/4b57df03f3976e0c2d0c9044505753f6b9004cf6/content/browser/webauth/webauth_browsertest.cc [modify] https://crrev.com/4b57df03f3976e0c2d0c9044505753f6b9004cf6/device/fido/scoped_virtual_fido_device.cc [modify] https://crrev.com/4b57df03f3976e0c2d0c9044505753f6b9004cf6/device/fido/scoped_virtual_fido_device.h
Comment 1 by kpaulhamus@chromium.org
, Apr 5 2018