Use this bug to track the implementation of the OOBE auto config from USB on the oobe_config service side.
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/fd40bd97dcbf119f40ca42e6c52610cdf0fc9bad commit fd40bd97dcbf119f40ca42e6c52610cdf0fc9bad Author: Amin Hassani <ahassani@chromium.org> Date: Fri Sep 28 02:45:25 2018 oobe_config: Add initial structure for USB enrollment config This patch adds the initial structure for implementing the loading of OOBE config file from USB when the service starts. It also adds the minimum test case to be expanded later. BUG=chromium:888043 TEST=unittests Change-Id: Ib9214971c6ed8c2d94480961243bc5329e094f5a Reviewed-on: https://chromium-review.googlesource.com/1239234 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org> Reviewed-by: Marton Hunyady <hunyadym@chromium.org> [add] https://crrev.com/fd40bd97dcbf119f40ca42e6c52610cdf0fc9bad/oobe_config/usb_common.h [add] https://crrev.com/fd40bd97dcbf119f40ca42e6c52610cdf0fc9bad/oobe_config/load_oobe_config_usb.h [add] https://crrev.com/fd40bd97dcbf119f40ca42e6c52610cdf0fc9bad/oobe_config/load_oobe_config_interface.h [add] https://crrev.com/fd40bd97dcbf119f40ca42e6c52610cdf0fc9bad/oobe_config/utils.h [modify] https://crrev.com/fd40bd97dcbf119f40ca42e6c52610cdf0fc9bad/oobe_config/oobe_config.gyp [add] https://crrev.com/fd40bd97dcbf119f40ca42e6c52610cdf0fc9bad/oobe_config/load_oobe_config_usb.cc [add] https://crrev.com/fd40bd97dcbf119f40ca42e6c52610cdf0fc9bad/oobe_config/load_oobe_config_usb_test.cc [add] https://crrev.com/fd40bd97dcbf119f40ca42e6c52610cdf0fc9bad/oobe_config/utils.cc [add] https://crrev.com/fd40bd97dcbf119f40ca42e6c52610cdf0fc9bad/oobe_config/usb_common.cc [modify] https://crrev.com/fd40bd97dcbf119f40ca42e6c52610cdf0fc9bad/oobe_config/finish_oobe_auto_config.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/6baacf16dad081d0be322e36a8bab634e9d41395 commit 6baacf16dad081d0be322e36a8bab634e9d41395 Author: Amin Hassani <ahassani@chromium.org> Date: Wed Oct 10 04:14:46 2018 oobe_config: Implement VerifySignature Adds implementation for VerifySignature along with its unittests. VerifySignature, verifies the signature of a given file using the verified public key. BUG=chromium:888043 TEST=unittests Change-Id: Ib576e0402ee7ebad8e00f0d4dae1b27240f1fda5 Reviewed-on: https://chromium-review.googlesource.com/1244175 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org> [modify] https://crrev.com/6baacf16dad081d0be322e36a8bab634e9d41395/oobe_config/load_oobe_config_usb_test.cc [modify] https://crrev.com/6baacf16dad081d0be322e36a8bab634e9d41395/oobe_config/load_oobe_config_usb.cc [modify] https://crrev.com/6baacf16dad081d0be322e36a8bab634e9d41395/oobe_config/load_oobe_config_usb.h [modify] https://crrev.com/6baacf16dad081d0be322e36a8bab634e9d41395/oobe_config/utils.cc [modify] https://crrev.com/6baacf16dad081d0be322e36a8bab634e9d41395/oobe_config/utils.h [modify] https://crrev.com/6baacf16dad081d0be322e36a8bab634e9d41395/oobe_config/BUILD.gn [modify] https://crrev.com/6baacf16dad081d0be322e36a8bab634e9d41395/oobe_config/finish_oobe_auto_config.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/f3da17e9dd1506941be40f2416af58fb08268100 commit f3da17e9dd1506941be40f2416af58fb08268100 Author: Amin Hassani <ahassani@chromium.org> Date: Wed Oct 10 12:19:47 2018 oobe_config: Implement LocateUsbDevice Adds the implementation and unittests for LocateUsbDevice() function which locates the USB partition which we where in the recovery by checking which one matches the signature we have. BUG=chromium:888043 TEST=unittests Change-Id: I5b5fdf28e4fb2913e552f04d71de62c9d5946cd3 Reviewed-on: https://chromium-review.googlesource.com/1246487 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org> Reviewed-by: Marton Hunyady <hunyadym@chromium.org> [modify] https://crrev.com/f3da17e9dd1506941be40f2416af58fb08268100/oobe_config/load_oobe_config_usb.cc [modify] https://crrev.com/f3da17e9dd1506941be40f2416af58fb08268100/oobe_config/load_oobe_config_usb_test.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/initramfs/+/dbab23e55b588bd9877d6f007f76de4724821f59 commit dbab23e55b588bd9877d6f007f76de4724821f59 Author: Amin Hassani <ahassani@chromium.org> Date: Thu Oct 11 04:33:37 2018 initramfs: init: disable setting up oobe_config keys Let's disable this until M71 is branched so we can make it more robust. BUG=chromium:888043 TEST=none Change-Id: I0f97bd7067d122725fa5576239d7faa8aa09ce0c Reviewed-on: https://chromium-review.googlesource.com/1268683 Commit-Ready: Amin Hassani <ahassani@chromium.org> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/dbab23e55b588bd9877d6f007f76de4724821f59/recovery/init
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/ba8bd67e0e4d81f0468fe4f259d8a7e79306dd6a commit ba8bd67e0e4d81f0468fe4f259d8a7e79306dd6a Author: Amin Hassani <ahassani@chromium.org> Date: Mon Oct 15 23:02:00 2018 oobe_config: Install mounting and unmounting USB Implements mounting and unmounting the discovered USB device's stateful partition. BUG=chromium:888043 TEST=unittests Change-Id: Ic9eb7c8652a7df4aa24689408c90a1800cdcbc07 Reviewed-on: https://chromium-review.googlesource.com/1256116 Commit-Ready: Amin Hassani <ahassani@chromium.org> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org> [modify] https://crrev.com/ba8bd67e0e4d81f0468fe4f259d8a7e79306dd6a/oobe_config/load_oobe_config_usb.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/d892e7aa9527c4091ea9c5e90c8a93e055423cb4 commit d892e7aa9527c4091ea9c5e90c8a93e055423cb4 Author: Amin Hassani <ahassani@chromium.org> Date: Fri Oct 19 02:01:21 2018 oobe_config: Rename finish_oobe_auto_config.cc Rename finish_oobe_auto_config.cc to save_oobe_config_usb.cc BUG=chromium:888043 TEST=sudo emerge oobe_config Change-Id: Ib76c502a4942b8ba93e4f95ddaaa640bdcab6184 Reviewed-on: https://chromium-review.googlesource.com/1279275 Commit-Ready: Amin Hassani <ahassani@chromium.org> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org> Reviewed-by: Marton Hunyady <hunyadym@chromium.org> [modify] https://crrev.com/d892e7aa9527c4091ea9c5e90c8a93e055423cb4/oobe_config/BUILD.gn [rename] https://crrev.com/d892e7aa9527c4091ea9c5e90c8a93e055423cb4/oobe_config/save_oobe_config_usb.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/5932084e8996ce8dc0377c658e86708ba713feb7 commit 5932084e8996ce8dc0377c658e86708ba713feb7 Author: Amin Hassani <ahassani@chromium.org> Date: Fri Oct 19 19:19:49 2018 oobe_config: Fix how load_oobe_config_usb.cc is compiled. It is currently in the liboobeconfig which is shared among all libraries, which is not a good idea. This patch moves it to its own static_library and add proper dependencies. BUG=chromium:888043 TEST=FEATURES=test emerge-amd64-generic oobe_config Change-Id: I8ccb95ce9127e5f4f50d5c41c15c0ca2488e437d Reviewed-on: https://chromium-review.googlesource.com/1287014 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org> [modify] https://crrev.com/5932084e8996ce8dc0377c658e86708ba713feb7/oobe_config/BUILD.gn
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/3bf1577528ef5299d2b63f2a33f0dca76b02775a commit 3bf1577528ef5299d2b63f2a33f0dca76b02775a Author: Amin Hassani <ahassani@chromium.org> Date: Wed Oct 24 20:02:57 2018 oobe_config: Add utility class for automatic unlinking Add ScopedPathUnlinker utility class to be used when we create a temporary file and we don't want to care for deleting after every error check, etc. BUG=chromium:888043 TEST=FEATURES=test emerge-amd64-generic oobe_config Change-Id: I8de82b1deed4fd69454da270894f4c01bbc70c31 Reviewed-on: https://chromium-review.googlesource.com/1279276 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Amin Hassani <ahassani@chromium.org> [modify] https://crrev.com/3bf1577528ef5299d2b63f2a33f0dca76b02775a/oobe_config/BUILD.gn [add] https://crrev.com/3bf1577528ef5299d2b63f2a33f0dca76b02775a/oobe_config/utils_test.cc [modify] https://crrev.com/3bf1577528ef5299d2b63f2a33f0dca76b02775a/oobe_config/usb_utils.h
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/b842fa49c1fd1cac55aabec3ec2507544d0b4efa commit b842fa49c1fd1cac55aabec3ec2507544d0b4efa Author: Amin Hassani <ahassani@chromium.org> Date: Wed Oct 24 20:02:57 2018 oobe_config: Sign using a passed string rather than a file Rename SignFile to Sign and Add a new Sign function that accepts a string content instead of a path to a source file. This way we don't have to write the device IDs into a file just to sign it. BUG=chromium:888043 TEST=FEATURES=test emerge-amd64-generic oobe_config Change-Id: I6e7b49ee07665419d524681070489a37431f884c Reviewed-on: https://chromium-review.googlesource.com/1279277 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org> [modify] https://crrev.com/b842fa49c1fd1cac55aabec3ec2507544d0b4efa/oobe_config/load_oobe_config_usb_test.cc [modify] https://crrev.com/b842fa49c1fd1cac55aabec3ec2507544d0b4efa/oobe_config/save_oobe_config_usb.cc [modify] https://crrev.com/b842fa49c1fd1cac55aabec3ec2507544d0b4efa/oobe_config/usb_utils.h [modify] https://crrev.com/b842fa49c1fd1cac55aabec3ec2507544d0b4efa/oobe_config/usb_utils.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/795cd4301b23cc3acff5f5be9abf4e2fb5bfb32e commit 795cd4301b23cc3acff5f5be9abf4e2fb5bfb32e Author: Amin Hassani <ahassani@chromium.org> Date: Wed Oct 24 20:02:57 2018 oobe_config: Shuffle usb source files around. Remove usb_common.* which seems not really necessary and move its few content to utils.* Rename utils.* to usb_utils.*. The original idea was that rollback also uses the utils in here, but it seems these utils will be more specialized toward the USB use case, so just keep it for USB for now. BUG=chromium:888043 TEST=FEATURES=test emerge-amd64-generic oobe_config Change-Id: If10c38cb1b48d871800974b1a295c2e748980b34 Reviewed-on: https://chromium-review.googlesource.com/1287015 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org> Reviewed-by: Marton Hunyady <hunyadym@chromium.org> [delete] https://crrev.com/a14582f5b2ae17da4bbc7b5d887d601dbb407a26/oobe_config/usb_common.h [rename] https://crrev.com/795cd4301b23cc3acff5f5be9abf4e2fb5bfb32e/oobe_config/usb_utils.h [modify] https://crrev.com/795cd4301b23cc3acff5f5be9abf4e2fb5bfb32e/oobe_config/load_oobe_config_usb.cc [modify] https://crrev.com/795cd4301b23cc3acff5f5be9abf4e2fb5bfb32e/oobe_config/save_oobe_config_usb.cc [delete] https://crrev.com/a14582f5b2ae17da4bbc7b5d887d601dbb407a26/oobe_config/usb_common.cc [modify] https://crrev.com/795cd4301b23cc3acff5f5be9abf4e2fb5bfb32e/oobe_config/load_oobe_config_usb_test.cc [rename] https://crrev.com/795cd4301b23cc3acff5f5be9abf4e2fb5bfb32e/oobe_config/usb_utils.cc [modify] https://crrev.com/795cd4301b23cc3acff5f5be9abf4e2fb5bfb32e/oobe_config/BUILD.gn
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/c519cc5cf4483223de7b34e8bffa1c18efa3a963 commit c519cc5cf4483223de7b34e8bffa1c18efa3a963 Author: Amin Hassani <ahassani@chromium.org> Date: Fri Nov 16 02:49:31 2018 installer: Pass stateful device to finish_oobe_auto_config Currently we are passing the USB device path to finish_oobe_auto_config, but the path itself is useless and need the stateful block device anyway. So just pass the path to the stateful device. Also rename the flags of finish_oobe_auto_config to better informing names. BUG=chromium:888043 TEST=manual test Change-Id: I34601078b534c526a20cd3d5e545b6fc0a92eb54 Reviewed-on: https://chromium-review.googlesource.com/1308689 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/c519cc5cf4483223de7b34e8bffa1c18efa3a963/installer/chromeos-install
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/bea9ab176741d257990f0b1ef30f30169a55c3e0 commit bea9ab176741d257990f0b1ef30f30169a55c3e0 Author: Amin Hassani <ahassani@chromium.org> Date: Fri Nov 16 13:01:39 2018 oobe_config: Move Sign and Verify Functions to usb_utils.* This allows us to test sign and verify properly and later we can mock them out for easier testing. Also move the private and public keys used in tests to their own file so we don't have to write them into a file for each test fixture. BUG=chromium:888043 TEST=FEATURES=test emerge-amd64-generic oobe_config Change-Id: I5fa6dbe9ae86893dfc4d9ed0f5a365d007504203 Reviewed-on: https://chromium-review.googlesource.com/1279278 Commit-Ready: Amin Hassani <ahassani@chromium.org> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Amin Hassani <ahassani@chromium.org> [add] https://crrev.com/bea9ab176741d257990f0b1ef30f30169a55c3e0/oobe_config/test.inv.pub.key [add] https://crrev.com/bea9ab176741d257990f0b1ef30f30169a55c3e0/oobe_config/test.inv.pri.key [modify] https://crrev.com/bea9ab176741d257990f0b1ef30f30169a55c3e0/oobe_config/usb_utils.h [add] https://crrev.com/bea9ab176741d257990f0b1ef30f30169a55c3e0/oobe_config/usb_utils_test.cc [modify] https://crrev.com/bea9ab176741d257990f0b1ef30f30169a55c3e0/oobe_config/load_oobe_config_usb.cc [modify] https://crrev.com/bea9ab176741d257990f0b1ef30f30169a55c3e0/oobe_config/load_oobe_config_usb.h [modify] https://crrev.com/bea9ab176741d257990f0b1ef30f30169a55c3e0/oobe_config/load_oobe_config_usb_test.cc [modify] https://crrev.com/bea9ab176741d257990f0b1ef30f30169a55c3e0/oobe_config/usb_utils.cc [add] https://crrev.com/bea9ab176741d257990f0b1ef30f30169a55c3e0/oobe_config/test.pri.key [modify] https://crrev.com/bea9ab176741d257990f0b1ef30f30169a55c3e0/oobe_config/BUILD.gn [delete] https://crrev.com/124b652b3dd865469844242f96f04d2d340e23c0/oobe_config/utils_test.cc [add] https://crrev.com/bea9ab176741d257990f0b1ef30f30169a55c3e0/oobe_config/test.pub.key
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/3d804e728baeb86395b0793e2a82ff2a1b52346f commit 3d804e728baeb86395b0793e2a82ff2a1b52346f Author: Amin Hassani <ahassani@chromium.org> Date: Fri Nov 16 13:01:39 2018 oobe_config: Add unittests for finish_oobe_auto_config The program that signs config files, et al. has not test. Move the functions used in save_oobe_config_usb.* into a class and add proper unittests for it so at least we would have some way of testing it. Also rename the finish_oobe_auto_config flags to reflect the caller in chromeos-install. BUG=chromium:888043 TEST=FEATURES=test emerge-amd64-generic oobe_config TEST=installed a recovery image and signed files were created correclty. TEST=sudo /usr/sbin/finish_oobe_auto_config --private_key=test.pri.key \ --public_key=test.pub.key --usb_stateful_dev=/dev/sdb1 \ --usb_stateful=test/usb_stateful --device_stateful=test/device_stateful Change-Id: I3b4164ddbb0e072738bcf590ffc3c38770167700 Reviewed-on: https://chromium-review.googlesource.com/1287016 Commit-Ready: Amin Hassani <ahassani@chromium.org> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org> [add] https://crrev.com/3d804e728baeb86395b0793e2a82ff2a1b52346f/oobe_config/save_oobe_config_usb.h [modify] https://crrev.com/3d804e728baeb86395b0793e2a82ff2a1b52346f/oobe_config/save_oobe_config_usb.cc [add] https://crrev.com/3d804e728baeb86395b0793e2a82ff2a1b52346f/oobe_config/save_oobe_config_usb_main.cc [modify] https://crrev.com/3d804e728baeb86395b0793e2a82ff2a1b52346f/oobe_config/BUILD.gn [add] https://crrev.com/3d804e728baeb86395b0793e2a82ff2a1b52346f/oobe_config/mock_save_oobe_config_usb.h [add] https://crrev.com/3d804e728baeb86395b0793e2a82ff2a1b52346f/oobe_config/save_oobe_config_usb_test.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/1ef8abb4fb2a55d7e6ea100f4dd63ef58a2ea6a1 commit 1ef8abb4fb2a55d7e6ea100f4dd63ef58a2ea6a1 Author: Amin Hassani <ahassani@chromium.org> Date: Fri Nov 16 13:01:40 2018 oobe_config: Add end-to-end unittest for LoadOobeConfigUsb Add proper end to end unittests for the LoadOobeConfigUsb. Remove ignore_errors which were added for passing unittests. Not needed anymore. Change RunCommand mount calls to mount and umount syscalls. Fix the problem with how we find the USB device by checking signatures. BUG=chromium:888043 TEST=FEATURES=test emerge-amd64-generic oobe_config Change-Id: I501ce136cac33b68bd8672f61585b9c21c489338 Reviewed-on: https://chromium-review.googlesource.com/1297169 Commit-Ready: Amin Hassani <ahassani@chromium.org> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org> [modify] https://crrev.com/1ef8abb4fb2a55d7e6ea100f4dd63ef58a2ea6a1/oobe_config/load_oobe_config_usb.cc [modify] https://crrev.com/1ef8abb4fb2a55d7e6ea100f4dd63ef58a2ea6a1/oobe_config/load_oobe_config_usb.h [add] https://crrev.com/1ef8abb4fb2a55d7e6ea100f4dd63ef58a2ea6a1/oobe_config/mock_load_oobe_config_usb.h [modify] https://crrev.com/1ef8abb4fb2a55d7e6ea100f4dd63ef58a2ea6a1/oobe_config/load_oobe_config_usb_test.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/3ee8c80047e92235eb2fb4abfc36d7ace365e697 commit 3ee8c80047e92235eb2fb4abfc36d7ace365e697 Author: Amin Hassani <ahassani@chromium.org> Date: Sat Dec 01 13:19:28 2018 oobe_config: Add VerifyPublicKey implementation This patch reads the public key hash value from TPM using: - TPM1: tspi library - TPM2: trunks library (implemented in libtpmcrypto) and compares it agains the hash of the public key file itself. BUG=chromium:888043 TEST=FEATURES=test emerge-amd64-generic oobe_config TEST=manually. unitests. CQ-DEPEND=CL:1312253 Change-Id: Ie472c8d9583e6bbdc468a2d832f897cedd11f353 Reviewed-on: https://chromium-review.googlesource.com/1308690 Commit-Ready: Amin Hassani <ahassani@chromium.org> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> [modify] https://crrev.com/3ee8c80047e92235eb2fb4abfc36d7ace365e697/oobe_config/usb_utils.h [modify] https://crrev.com/3ee8c80047e92235eb2fb4abfc36d7ace365e697/oobe_config/load_oobe_config_usb.cc [modify] https://crrev.com/3ee8c80047e92235eb2fb4abfc36d7ace365e697/libtpmcrypto/tpm1_impl.h [modify] https://crrev.com/3ee8c80047e92235eb2fb4abfc36d7ace365e697/libtpmcrypto/tpm_crypto_impl_test.cc [modify] https://crrev.com/3ee8c80047e92235eb2fb4abfc36d7ace365e697/libtpmcrypto/tpm.h [modify] https://crrev.com/3ee8c80047e92235eb2fb4abfc36d7ace365e697/libtpmcrypto/tpm2_impl.h [modify] https://crrev.com/3ee8c80047e92235eb2fb4abfc36d7ace365e697/oobe_config/usb_utils.cc [modify] https://crrev.com/3ee8c80047e92235eb2fb4abfc36d7ace365e697/oobe_config/BUILD.gn [modify] https://crrev.com/3ee8c80047e92235eb2fb4abfc36d7ace365e697/libtpmcrypto/tpm1_impl.cc [modify] https://crrev.com/3ee8c80047e92235eb2fb4abfc36d7ace365e697/libtpmcrypto/tpm2_impl.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/dfc9276aba34839de995e6fb266a693c6b4bfa15 commit dfc9276aba34839de995e6fb266a693c6b4bfa15 Author: Amin Hassani <ahassani@chromium.org> Date: Sat Dec 01 13:19:28 2018 oobe_config: Add dependecies libtpmcrypto libtpmcrypto is used for TPM verification on OOBE config from USB. Also add dependency to dev-libs/openssl as needed for signature verification stuff. BUG=chromium:888043 TEST=precq TEST=sudo -u oobe_config_restore /usr/sbin/oobe_config_restore Change-Id: I6473502814162fde35e78238124c3367627cb427 Reviewed-on: https://chromium-review.googlesource.com/1312253 Commit-Ready: Amin Hassani <ahassani@chromium.org> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org> [modify] https://crrev.com/dfc9276aba34839de995e6fb266a693c6b4bfa15/chromeos-base/libtpmcrypto/libtpmcrypto-9999.ebuild [modify] https://crrev.com/dfc9276aba34839de995e6fb266a693c6b4bfa15/chromeos-base/oobe_config/oobe_config-9999.ebuild
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/eec38f3b4bf76ba6bdb544ea232d5da449eeeee3 commit eec38f3b4bf76ba6bdb544ea232d5da449eeeee3 Author: Amin Hassani <ahassani@chromium.org> Date: Wed Dec 05 09:13:27 2018 oobe_config: Enable getting oobe config file from USB Enables getting oobe config json file from USB. This also adds moves most of the USB config load into store_usb_oobe_config to be called by priviledged user before oobe_config is loaded. It removes VerifyEnrollmentDomainInConfig() since it will be easier to allow chrome to verify this enrolment domain when it parses it. Also it cleansup the /mnt/stateful/unencrypted/preserve/oobe_auto_config after a success or failed attempt to load the config and enrollment files. BUG=chromium:888043 TEST=FEATURES=test emerge-reef oobe_config TEST=manuall recovery + oobe_config creation + testing Change-Id: I3c97a405e8b3b852d257a89cf6a1d9df044b3043 Reviewed-on: https://chromium-review.googlesource.com/1308691 Commit-Ready: Amin Hassani <ahassani@chromium.org> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org> [add] https://crrev.com/eec38f3b4bf76ba6bdb544ea232d5da449eeeee3/oobe_config/store_usb_oobe_config.cc [modify] https://crrev.com/eec38f3b4bf76ba6bdb544ea232d5da449eeeee3/oobe_config/usb_utils.h [modify] https://crrev.com/eec38f3b4bf76ba6bdb544ea232d5da449eeeee3/oobe_config/save_oobe_config_usb.h [modify] https://crrev.com/eec38f3b4bf76ba6bdb544ea232d5da449eeeee3/oobe_config/load_oobe_config_usb.cc [modify] https://crrev.com/eec38f3b4bf76ba6bdb544ea232d5da449eeeee3/oobe_config/oobe_config_restore_service.cc [modify] https://crrev.com/eec38f3b4bf76ba6bdb544ea232d5da449eeeee3/oobe_config/save_oobe_config_usb.cc [modify] https://crrev.com/eec38f3b4bf76ba6bdb544ea232d5da449eeeee3/oobe_config/load_oobe_config_usb.h [modify] https://crrev.com/eec38f3b4bf76ba6bdb544ea232d5da449eeeee3/oobe_config/mock_load_oobe_config_usb.h [modify] https://crrev.com/eec38f3b4bf76ba6bdb544ea232d5da449eeeee3/oobe_config/load_oobe_config_usb_test.cc [modify] https://crrev.com/eec38f3b4bf76ba6bdb544ea232d5da449eeeee3/oobe_config/usb_utils.cc [modify] https://crrev.com/eec38f3b4bf76ba6bdb544ea232d5da449eeeee3/oobe_config/BUILD.gn [modify] https://crrev.com/eec38f3b4bf76ba6bdb544ea232d5da449eeeee3/oobe_config/mock_save_oobe_config_usb.h [modify] https://crrev.com/eec38f3b4bf76ba6bdb544ea232d5da449eeeee3/oobe_config/save_oobe_config_usb_test.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/902c7e1bffbced9d81c9f948e08b858461fe1fe0 commit 902c7e1bffbced9d81c9f948e08b858461fe1fe0 Author: Amin Hassani <ahassani@chromium.org> Date: Wed Dec 05 09:13:28 2018 oobe_config: start store_usb_oobe_config pre-start script Run the store_usb_oobe_config in the prestart init script to gather the oobe_config.json from USB and dump it in /var/lib/oobe_config_restore BUG=chromium:888043 TEST=manuall recovery + oobe_config creation + testing CQ-DEPEND=CL:1352565 Change-Id: I987a1c6dffb5fdede9d98fade78e4ef080e45310 Reviewed-on: https://chromium-review.googlesource.com/1358714 Commit-Ready: Amin Hassani <ahassani@chromium.org> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org> [modify] https://crrev.com/902c7e1bffbced9d81c9f948e08b858461fe1fe0/oobe_config/etc/init/oobe_config_restore.conf
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/a3931a5a050407c87002b8dd0273adb36f34cbcc commit a3931a5a050407c87002b8dd0273adb36f34cbcc Author: Amin Hassani <ahassani@chromium.org> Date: Wed Dec 05 09:13:28 2018 oobe_config: Output store_usb_oobe_config executable store_usb_oobe_config is needed to for loading USB OOBE config. Also set the TPM and TPM2 flags in the ebuild which was missed in the previous CL. BUG=chromium:888043 TEST=precq TEST=manual testing CQ-DEPEND=CL:1308691 Change-Id: I23d65659df73d5854160f6bf38c9c76ec0a92d68 Reviewed-on: https://chromium-review.googlesource.com/1352565 Commit-Ready: Amin Hassani <ahassani@chromium.org> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org> [modify] https://crrev.com/a3931a5a050407c87002b8dd0273adb36f34cbcc/chromeos-base/oobe_config/oobe_config-9999.ebuild
Comment 1 by bugdroid1@chromium.org
, Sep 28