[PR #6073] [MERGED] [PM-27176] Switch to using SDK's init crypto with MasterPasswordUnlock #12433

Closed
opened 2026-04-11 03:42:35 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/6073
Author: @andrebispo5
Created: 10/23/2025
Status: Merged
Merged: 10/24/2025
Merged by: @andrebispo5

Base: mainHead: pm-27176/crypto-init-master-password-unlock


📝 Commits (5)

  • 942af62 [PM-27176] Fix serialName on sync response model.
  • 2aa89a4 [PM-27176] Use new initUserCryptoMethod MasterPasswordUnlock when available.
  • db03f72 [PM-27176] Use InitUserCryptoMethod.MasterPasswordUnlock on login.
  • 3c06910 [PM-27176] Update with PR suggestions
  • 49e6b4d [PM-27176] Remove no longer necessary test. Fix test. Remove log.

📊 Changes

11 files changed (+353 additions, -123 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryImpl.kt (+18 -16)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerImpl.kt (+43 -16)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryImpl.kt (+18 -8)
app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/util/MasterPasswordUnlockDataJsonExtensions.kt (+15 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt (+0 -73)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerTest.kt (+104 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryTest.kt (+136 -0)
📝 network/src/main/kotlin/com/bitwarden/network/model/KdfJson.kt (+11 -4)
📝 network/src/main/kotlin/com/bitwarden/network/model/MasterPasswordUnlockDataJson.kt (+6 -4)
📝 network/src/main/kotlin/com/bitwarden/network/model/SyncResponseJson.kt (+1 -1)
📝 network/src/main/kotlin/com/bitwarden/network/model/UserDecryptionJson.kt (+1 -1)

📄 Description

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-27176

📔 Objective

The SDK added InitUserCryptoMethod.masterPasswordUnlock for unlocking the vault with master password unlock data, which was introduced in https://github.com/bitwarden/android/pull/5944. This uses that method for vault unlocking if the user has master password unlock data.

This replaces the approach used in https://github.com/bitwarden/android/pull/6026.

📸 Screenshots

https://github.com/user-attachments/assets/f8c86f5e-b0ad-466c-8001-ae29f2386fbb

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

🔄 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/6073 **Author:** [@andrebispo5](https://github.com/andrebispo5) **Created:** 10/23/2025 **Status:** ✅ Merged **Merged:** 10/24/2025 **Merged by:** [@andrebispo5](https://github.com/andrebispo5) **Base:** `main` ← **Head:** `pm-27176/crypto-init-master-password-unlock` --- ### 📝 Commits (5) - [`942af62`](https://github.com/bitwarden/android/commit/942af62b66411f73d7deb27f712f0b064bf34192) [PM-27176] Fix serialName on sync response model. - [`2aa89a4`](https://github.com/bitwarden/android/commit/2aa89a4303c166fa9d49bf479d9dbc9c514c82b2) [PM-27176] Use new initUserCryptoMethod MasterPasswordUnlock when available. - [`db03f72`](https://github.com/bitwarden/android/commit/db03f72f7b525819ac5ac04014a4b9fc234974ed) [PM-27176] Use InitUserCryptoMethod.MasterPasswordUnlock on login. - [`3c06910`](https://github.com/bitwarden/android/commit/3c069101e36faffa6c436ffb425b20d73059d189) [PM-27176] Update with PR suggestions - [`49e6b4d`](https://github.com/bitwarden/android/commit/49e6b4d1f67c3e8501faca3cc768d2edc989b5e4) [PM-27176] Remove no longer necessary test. Fix test. Remove log. ### 📊 Changes **11 files changed** (+353 additions, -123 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryImpl.kt` (+18 -16) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerImpl.kt` (+43 -16) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryImpl.kt` (+18 -8) ➕ `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/util/MasterPasswordUnlockDataJsonExtensions.kt` (+15 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt` (+0 -73) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerTest.kt` (+104 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryTest.kt` (+136 -0) 📝 `network/src/main/kotlin/com/bitwarden/network/model/KdfJson.kt` (+11 -4) 📝 `network/src/main/kotlin/com/bitwarden/network/model/MasterPasswordUnlockDataJson.kt` (+6 -4) 📝 `network/src/main/kotlin/com/bitwarden/network/model/SyncResponseJson.kt` (+1 -1) 📝 `network/src/main/kotlin/com/bitwarden/network/model/UserDecryptionJson.kt` (+1 -1) </details> ### 📄 Description ## 🎟️ Tracking <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> https://bitwarden.atlassian.net/browse/PM-27176 ## 📔 Objective <!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. --> The SDK added InitUserCryptoMethod.masterPasswordUnlock for unlocking the vault with master password unlock data, which was introduced in https://github.com/bitwarden/android/pull/5944. This uses that method for vault unlocking if the user has master password unlock data. This replaces the approach used in https://github.com/bitwarden/android/pull/6026. ## 📸 Screenshots <!-- Required for any UI changes; delete if not applicable. Use fixed width images for better display. --> https://github.com/user-attachments/assets/f8c86f5e-b0ad-466c-8001-ae29f2386fbb ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes --- <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-04-11 03:42:35 -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#12433