Skip to content

Conversation

@andrebispo5
Copy link
Contributor

🎟️ Tracking

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

📔 Objective

This pull request introduces support for the new masterPasswordUnlock property within the UserDecryptionOptionsJson model and ensures it is properly handled. The main changes focus on updating extension functions to correctly set this property, as well as updating test cases to reflect the new field.

  • Added handling of the masterPasswordUnlock field in the toUserStateJson, toRemovedPasswordUserStateJson, and toUserStateJsonWithPassword extension functions to ensure this property is set appropriately during user state transformations.
  • Updated the toUpdatedUserStateJson function to copy or set the masterPasswordUnlock property based on the latest sync response, ensuring user state remains consistent with backend data.

These changes ensure the codebase is ready to handle the new master password unlock data property.

⏰ 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

@github-actions
Copy link
Contributor

github-actions bot commented Sep 26, 2025

Logo
Checkmarx One – Scan Summary & Detailsb6e2be8e-84f5-4e24-9f26-6c409aafa282

Great job! No new security vulnerabilities introduced in this pull request

@codecov
Copy link

codecov bot commented Sep 29, 2025

Codecov Report

❌ Patch coverage is 84.21053% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.40%. Comparing base (fd555e9) to head (2cf0d5a).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
...ta/auth/repository/util/UserStateJsonExtensions.kt 88.88% 0 Missing and 2 partials ⚠️
...auth/manager/util/TrustDeviceResponseExtensions.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5944      +/-   ##
==========================================
+ Coverage   84.36%   84.40%   +0.03%     
==========================================
  Files         737      719      -18     
  Lines       54827    54809      -18     
  Branches     7487     7535      +48     
==========================================
+ Hits        46257    46263       +6     
+ Misses       5954     5905      -49     
- Partials     2616     2641      +25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

policies: List<SyncResponseJson.Policy> = listOf(createMockPolicy(number = number)),
domains: SyncResponseJson.Domains = createMockDomains(number = number),
sends: List<SyncResponseJson.Send> = listOf(createMockSend(number = number)),
userDecryption: UserDecryptionJson? = null,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we give this a nonnull default

val kdf: KdfJson,

@SerialName("MasterKeyWrappedUserKey")
val masterKeyWrappedUserKey: String,
Copy link
Collaborator

@david-livefront david-livefront Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you next PR has changes to this model. Can we get those in here and avoid the code churn

@andrebispo5 andrebispo5 added this pull request to the merge queue Oct 2, 2025
Merged via the queue into main with commit 1638a20 Oct 2, 2025
9 checks passed
@andrebispo5 andrebispo5 deleted the pm-23280/kdf_changes_logout branch October 2, 2025 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants