Add minimal migration support

Desktop / Chromium - Pavol Marko [chromium.org] - 31 August 2017 12:22 EDT

Add EcryptfsMigrationStrategy value MINIMAL_MIGRATE, which performs a minimal ext4 migration, with only few files (esp. auth tokens and channel binding information) whitelisted. This is similar to WIPE but ensures that the user won't have to enter their password twice.

We monitor how long the minimal migration takes, and if it is longer than 45 seconds, require a password re-entry for privacy reasons.

Depends on Chrome OS side CL: https://chromium-review.googlesource.com/c/612249.

BUG=747907 TEST=unit_tests --gtest_filter=EncryptionMigrationScreenHandlerTest* Manual test with pre-existing ecryptfs user profile and user policy EcryptfsMigrationStrategy set to MINIMAL_MIGRATE(4).

Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation Change-Id: I95f367b9219195936571da2af82dea38c91a1221 Reviewed-on: https://chromium-review.googlesource.com/612086 Commit-Queue: Pavol Marko

a9808a6 Add minimal migration support
chrome/browser/chromeos/BUILD.gn | 1 +
.../chromeos/login/existing_user_controller.cc | 37 ++-
.../chromeos/login/existing_user_controller.h | 5 +-
.../login/screens/encryption_migration_mode.h | 6 +-
.../login/screens/encryption_migration_screen.cc | 6 +
.../login/screens/encryption_migration_screen.h | 5 +
.../screens/encryption_migration_screen_view.h | 2 +
.../chromeos/login/session/user_session_manager.cc | 6 +-
.../chromeos/login/encryption_migration.html | 7 +
.../chromeos/login/encryption_migration.js | 12 +-
.../login/encryption_migration_screen_handler.cc | 102 +++++-
.../login/encryption_migration_screen_handler.h | 44 ++-
...encryption_migration_screen_handler_unittest.cc | 357 +++++++++++++++++++++
chromeos/cryptohome/homedir_methods.cc | 8 +-
chromeos/cryptohome/homedir_methods.h | 1 +
chromeos/cryptohome/mock_homedir_methods.h | 3 +-
chromeos/dbus/cryptohome_client.cc | 6 +-
chromeos/dbus/cryptohome_client.h | 4 +
chromeos/dbus/fake_cryptohome_client.cc | 1 +
chromeos/dbus/fake_cryptohome_client.h | 5 +
components/user_manager/known_user.cc | 22 ++
components/user_manager/known_user.h | 9 +
components/user_manager/user_manager.h | 3 +
components/user_manager/user_manager_base.cc | 12 +
components/user_manager/user_manager_base.h | 1 +
tools/metrics/histograms/enums.xml | 2 +
tools/metrics/histograms/histograms.xml | 32 +-
27 files changed, 667 insertions(+), 32 deletions(-)

Upstream: git.chromium.org


  • Share