Skip to content

[PM-27278] add AccountKeysRequestModel to RegisterFinishRequestModel for account encryption v2 support#6798

Open
eligrubb wants to merge 59 commits intomainfrom
km/pm-27278/register-password-based-account-v2
Open

[PM-27278] add AccountKeysRequestModel to RegisterFinishRequestModel for account encryption v2 support#6798
eligrubb wants to merge 59 commits intomainfrom
km/pm-27278/register-password-based-account-v2

Conversation

@eligrubb
Copy link
Member

@eligrubb eligrubb commented Jan 5, 2026

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-27278
Stacks on top of #6855.

📔 Objective

Deprecating V1 User Asymmetric Key information in favor of new V2 User Asymmetric Account Keys structure.

This PR adds support for the new AccountKeys structure while maintaining support for the legacy UserAsymmetricKey-based flow. Validation is updated to check either AccountKeys or UserAsymmetricKeys are updated. Tests include modeling for both scenarios.

📸 Screenshots

⏰ 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

…d more comments and fixed up some long lines.
…tModel.cs

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
…t additions to make sure properties that were once required are still required.
…ted tests and added comments for the future.
…tModel.cs

Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
…d new checks for master password authentication data.
…fled around validation checks to the request model instead of the controller.
…Added comments to clarify how these data types should be used.
…Fixed error in register finish model validation.
mkincaid-bw
mkincaid-bw previously approved these changes Feb 10, 2026
Copy link
Contributor

@mkincaid-bw mkincaid-bw left a comment

Choose a reason for hiding this comment

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

LGTM

@eligrubb
Copy link
Member Author

Addressed @quexten's comment and merged main into branch. Had some issues with the merge, apologies for the force push, hopefully should be cleaned up now.

quexten
quexten previously approved these changes Feb 11, 2026
mkincaid-bw
mkincaid-bw previously approved these changes Feb 20, 2026
@eligrubb eligrubb dismissed stale reviews from mkincaid-bw and quexten via f6c1021 February 23, 2026 06:32
@eligrubb eligrubb force-pushed the km/pm-27278/register-password-based-account-v2 branch from cc33e95 to 66c3938 Compare February 23, 2026 07:05
quexten
quexten previously approved these changes Feb 23, 2026
@eligrubb
Copy link
Member Author

eligrubb commented Mar 5, 2026

@quexten @enmande @mkincaid-bw the changes have now passed QA. The only changes to the code since the last time you reviewed should be updating the date for the DB migration script.

@@ -0,0 +1,26 @@
CREATE PROCEDURE [dbo].[User_SetMasterPasswordUnlockUserData]
Copy link
Contributor

Choose a reason for hiding this comment

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

We've had some discussion about naming conventions recently and User_SetMasterPasswordUnlockUserData does not align with our current standards (I'm in the process of updating the Contributing Docs to try to clear some things up). The convention should be something like User_Update.... You can look at existing User_Update procs for examples.

My apologies for not mentioning this in my original review.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 6, 2026

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.

7 participants