-
Notifications
You must be signed in to change notification settings - Fork 25
[PM-24051] MasterPasswordUnlockData model with response mapping and adds it to identity success response model #376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Great job! No new security vulnerabilities introduced in this pull request |
Codecov Reportโ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #376 +/- ##
==========================================
+ Coverage 76.41% 76.53% +0.12%
==========================================
Files 265 267 +2
Lines 24433 24651 +218
==========================================
+ Hits 18670 18867 +197
- Misses 5763 5784 +21 โ View full report in Codecov by Sentry. ๐ New features to boost your workflow:
|
quexten
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some initial comments, some of these are required, some are idiomatic (but probably required since the quality bar for SDK seems to be set much higher).
I'd like a review from someone with more rust experience such as @Hinton or @dani-garcia too. I believe specifically the request parsing is something that has not existed in the SDK so far, and there may be a better way to do this that we're unaware of.
crates/bitwarden-wasm-internal/src/key_management/master_password.rs
Outdated
Show resolved
Hide resolved
โฆption-options-to-identity-sync-response
|
โฆdds it to identity success response model (#376) https://bitwarden.atlassian.net/browse/PM-24051 Adds `MasterPasswordUnlockData` model with `MasterPasswordUnlockResponseModel` mapping. This wi Adds `UserDecryptionOptionsResponseModel` into the identity success token response. This model includes the master password unlock field. The `/sync` response model is autogenerated by OpenApi and already includes user decryption option and the master password unlock fields. Includes Uniffi and WASM bindings for `MasterPasswordUnlock`. In further PR's we plan to use the `MasterPasswordUnlock` in `InitUserCryptoMethod` enum - this is still in discussion. - 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 <!-- 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
## ๐๏ธ Tracking https://bitwarden.atlassian.net/browse/PM-24051 ## ๐ Objective - Initialise user crypto with `MasterPasswordUnlock` - added `initialize_user_crypto_master_password_unlock` function into `InternalClient`'s crypto. - Auth's login methods (password, and api_key specifically) use `MasterPasswordUnlockData` when present in response and uses new function. - KM team have decided that the double KDF derivation issue is something we are ok with for login. - Moved `set_login_method` to be the after the `initialize_user_crypto` function in execution order, since the latter overrides the `set_login_method`. Move everywhere (all login methods) for consistency. - Removed `kdf` as init arg of `password.rs`, consistently use `prelogin` now. - Update user's KDF settings with `MasterPasswordUnlock` via `update_user_master_password_unlock` in `InternalClient`, triggered in sync. Continuation of #376 ## โฐ 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




๐๏ธ Tracking
https://bitwarden.atlassian.net/browse/PM-24051
๐ Objective
Adds
MasterPasswordUnlockDatamodel withMasterPasswordUnlockResponseModelmapping. This wiAdds
UserDecryptionOptionsResponseModelinto the identity success token response. This model includes the master password unlock field.The
/syncresponse model is autogenerated by OpenApi and already includes user decryption option and the master password unlock fields.Includes Uniffi and WASM bindings for
MasterPasswordUnlock.In further PR's we plan to use the
MasterPasswordUnlockinInitUserCryptoMethodenum - this is still in discussion.โฐ Reminders before review
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 confirmedissue 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