[PR #7030] [MERGED] PM-38625: Chore: Store the WrappedAccountCryptographicState #120973

Closed
opened 2026-06-09 19:28:13 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/7030
Author: @david-livefront
Created: 6/5/2026
Status: Merged
Merged: 6/8/2026
Merged by: @david-livefront

Base: mainHead: PM-38625-store-account-crypto-state


📝 Commits (1)

  • e3afa6c PM-38625: Store the WrappedAccountCryptographicState

📊 Changes

21 files changed (+871 additions, -1398 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/data/auth/datasource/disk/AuthDiskSource.kt (+6 -24)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/auth/datasource/disk/AuthDiskSourceImpl.kt (+50 -21)
app/src/main/kotlin/com/x8bit/bitwarden/data/auth/datasource/disk/serializer/WrappedAccountCryptographicStateSerializer.kt (+85 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryImpl.kt (+32 -64)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/auth/repository/util/AccountKeysJsonExtensions.kt (+17 -7)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/platform/repository/AuthenticatorBridgeRepositoryImpl.kt (+4 -8)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerImpl.kt (+4 -8)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/VaultSyncManagerImpl.kt (+16 -2)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryImpl.kt (+4 -10)
app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/util/WrappedAccountCryptographicStateExtensions.kt (+0 -34)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/auth/datasource/disk/AuthDiskSourceTest.kt (+26 -55)
app/src/test/kotlin/com/x8bit/bitwarden/data/auth/datasource/disk/serializer/WrappedAccountCryptographicStateSerializerTest.kt (+163 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/auth/datasource/disk/util/FakeAuthDiskSource.kt (+16 -28)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt (+198 -623)
app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/model/AccountCryptographicStateUtil.kt (+20 -0)
app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/util/AccountKeysExtensionsTest.kt (+98 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/platform/repository/AuthenticatorBridgeRepositoryTest.kt (+23 -51)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerTest.kt (+45 -221)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/VaultSyncManagerTest.kt (+5 -1)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryTest.kt (+59 -130)

...and 1 more files

📄 Description

🎟️ Tracking

PM-38625

📔 Objective

This PR removes the privateKey and accountKeys from our persistence layer and migrates everything we need to a new WrappedAccountCryptographicState object.

  • Migration logic has been added to the initialization of the AuthDiskSource
    • All old data stored to disk should be removed
  • Any places that previously stored the privateKey and/or accountKeys should now store the appropriate WrappedAccountCryptographicState
  • Any places retrieving the privateKey and/or accountKeys should now retrieve the WrappedAccountCryptographicState

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/7030 **Author:** [@david-livefront](https://github.com/david-livefront) **Created:** 6/5/2026 **Status:** ✅ Merged **Merged:** 6/8/2026 **Merged by:** [@david-livefront](https://github.com/david-livefront) **Base:** `main` ← **Head:** `PM-38625-store-account-crypto-state` --- ### 📝 Commits (1) - [`e3afa6c`](https://github.com/bitwarden/android/commit/e3afa6cba23285f60b710de2a5353d77c912806c) PM-38625: Store the WrappedAccountCryptographicState ### 📊 Changes **21 files changed** (+871 additions, -1398 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/auth/datasource/disk/AuthDiskSource.kt` (+6 -24) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/auth/datasource/disk/AuthDiskSourceImpl.kt` (+50 -21) ➕ `app/src/main/kotlin/com/x8bit/bitwarden/data/auth/datasource/disk/serializer/WrappedAccountCryptographicStateSerializer.kt` (+85 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryImpl.kt` (+32 -64) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/auth/repository/util/AccountKeysJsonExtensions.kt` (+17 -7) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/platform/repository/AuthenticatorBridgeRepositoryImpl.kt` (+4 -8) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerImpl.kt` (+4 -8) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/VaultSyncManagerImpl.kt` (+16 -2) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryImpl.kt` (+4 -10) ➖ `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/util/WrappedAccountCryptographicStateExtensions.kt` (+0 -34) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/auth/datasource/disk/AuthDiskSourceTest.kt` (+26 -55) ➕ `app/src/test/kotlin/com/x8bit/bitwarden/data/auth/datasource/disk/serializer/WrappedAccountCryptographicStateSerializerTest.kt` (+163 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/auth/datasource/disk/util/FakeAuthDiskSource.kt` (+16 -28) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt` (+198 -623) ➕ `app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/model/AccountCryptographicStateUtil.kt` (+20 -0) ➕ `app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/util/AccountKeysExtensionsTest.kt` (+98 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/platform/repository/AuthenticatorBridgeRepositoryTest.kt` (+23 -51) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerTest.kt` (+45 -221) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/VaultSyncManagerTest.kt` (+5 -1) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryTest.kt` (+59 -130) _...and 1 more files_ </details> ### 📄 Description ## 🎟️ Tracking [PM-38625](https://bitwarden.atlassian.net/browse/PM-38625) ## 📔 Objective This PR removes the `privateKey` and `accountKeys` from our persistence layer and migrates everything we need to a new `WrappedAccountCryptographicState` object. * Migration logic has been added to the initialization of the `AuthDiskSource` * All old data stored to disk should be removed * Any places that previously stored the `privateKey` and/or `accountKeys` should now store the appropriate `WrappedAccountCryptographicState` * Any places retrieving the `privateKey` and/or `accountKeys` should now retrieve the `WrappedAccountCryptographicState` [PM-38625]: https://bitwarden.atlassian.net/browse/PM-38625?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-09 19:28:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#120973