[sync::test] Add single client integration test for custom passphrase
Add a Sync integration test which exercises custom passphrase flows, including the handling and proper functioning of the newly added key derivation method (scrypt). Add an integration test helper file for encryption-related tasks and modify FakeServer and LoopbackServer to allow easier modification of persistent entities such as Nigori. Add passphrase-related functionality to ProfileSyncServiceHarness to give tests better control over how and when passphrase-based encryption is enabled. The test uses a gray-box approach, where it tests the client at the ProfileSyncService granularity, but injects and inspects entities on the (fake) server to ensure that encryption is performed properly. This is necessary because, when it comes to encryption, we are not interested merely in that it does not hinder existing functionality (e.g. two clients are syncing data properly in the presence of a custom passphrase), but also that it provides the expected security to the user. For this reason, we use our knowledge of the encryption architecture internals to ensure that the data committed to the server is encrypted in the expected way. Bug: 894148 Change-Id: I728f7f18cc0db7b1da50f747a87a640877d0b023 Reviewed-on: https://chromium-review.googlesource.com/c/1274205 Commit-Queue: David Davidović <davidovic@google.com> Reviewed-by:vitaliii <vitaliii@chromium.org> Reviewed-by:
Marc Treib <treib@chromium.org> Cr-Commit-Position: refs/heads/master@{#598912}
Showing
This diff is collapsed.
Please register or sign in to comment