Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Closes #2229: Encrypted-at-rest FxA state storage support #5053

Merged
merged 1 commit into from Nov 19, 2019

Commits on Nov 19, 2019

  1. Closes mozilla-mobile#2229: Encrypted-at-rest FxA state storage support

    This patch adds a version of `AccountStorage` which is backed by an encrypted-at-rest shared-prefs implementation,
    `SecureAbove22Preferences`. As the name suggests, encryption at rest is enabled only for Android API levels 23+.
    Otherwise, plaintext storage is used. `SecureAbove22Preferences` will handle API level upgrades behind the scenes,
    if necessary.
    
    In order to support rolling this out, `SecureAbove22AccountStorage` automatically migrates account state if it was
    present in `SharedPrefAccountStorage`. And vice-versa, `SharedPrefAccountStorage` will automatically migrate account
    state if it was present in `SecureAbove22AccountStorage`. This allows applications to easily switch between two
    implementations, without any ill-effects.
    
    In order to monitor storage implementations for abnormalities (such as disappearing encryption keys), an optional
    `CrashReporter` instance may be configured now via FxaAccountManager.
    
    `DeviceConfig` gained a `secureStateAtRest` flag, which allows applications to specify if they'd like to encrypt
    account state. This config object isn't a perfect fit for this flag, but it's close enough conceptually.
    Grisha Kruglov committed Nov 19, 2019
    Configuration menu
    Copy the full SHA
    3061e01 View commit details
    Browse the repository at this point in the history