• David Davidović's avatar
    [sync::test] Add single client integration test for custom passphrase · 475bfe9d
    David Davidović authored
    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: default avatarvitaliii <vitaliii@chromium.org>
    Reviewed-by: default avatarMarc Treib <treib@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#598912}
    475bfe9d
BUILD.gn 287 KB