-
Notifications
You must be signed in to change notification settings - Fork 17
[PM-24683] Add updateKdf function #383
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
base: main
Are you sure you want to change the base?
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 #383 +/- ##
==========================================
+ Coverage 76.75% 76.91% +0.15%
==========================================
Files 270 270
Lines 25664 25873 +209
==========================================
+ Hits 19698 19899 +201
- Misses 5966 5974 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ption-options-to-identity-sync-response
…r and docs improvements
…ption-options-to-identity-sync-response # Conflicts: # crates/bitwarden-core/src/key_management/mod.rs
…ption-options-to-identity-sync-response
Co-authored-by: Oscar Hinton <[email protected]>
… into km/update-kdf-sdk
…ns-to-identity-sync-response' into km/update-kdf-sdk
… into km/update-kdf-sdk
The base branch was changed.
|
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.
LGTM, just two small non-blocking nits
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Serialize, Deserialize, Debug, PartialEq)] | ||
pub struct IdentityUserDecryptionOptionsResponseModel { |
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.
Question: Why not use #[serde(rename_all = "camelCase")]
rather than renaming the field?
@@ -78,7 +78,7 @@ fn build_secret_verification_request( | |||
let master_password_hash = input | |||
.master_password | |||
.as_ref() | |||
.map(|p| { | |||
.map(|p| -> Result<String, CryptoError> { |
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.
Is this need here? We're already typing Ok::<String, CryptoError>(
below, seems like the compiler should be able to infer it.
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.
If we keep it we should remove the type hint for Ok
.
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.
A couple of minor things and we should be good. Only the two API comments are blocking.
/// re-encrypted with the new password. This returns the new encrypted user key and the new | ||
/// password hash but does not update sdk state. | ||
/// | ||
/// Note: This is deprecated and `make_update_password` should be used instead |
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.
Do. we have a task for tracking the removal? And ideally a task to assign to mobile to clean up their implementation?
@@ -78,7 +78,7 @@ fn build_secret_verification_request( | |||
let master_password_hash = input | |||
.master_password | |||
.as_ref() | |||
.map(|p| { | |||
.map(|p| -> Result<String, CryptoError> { |
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.
If we keep it we should remove the type hint for Ok
.
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Serialize, Deserialize, Debug, PartialEq)] | ||
pub struct IdentityUserDecryptionOptionsResponseModel { |
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.
question: Can we use pub(crate)
here? Most API request/responses were updated to only be create public.
pub struct IdentityUserDecryptionOptionsResponseModel { | |
pub(crate) struct IdentityUserDecryptionOptionsResponseModel { |
@@ -4,6 +4,7 @@ mod identity_success_response; | |||
mod identity_token_fail_response; | |||
mod identity_token_response; | |||
mod identity_two_factor_response; | |||
pub(crate) mod identity_user_decryption_options_response; |
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.
question: Could we just make this mod and use use
below?
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-24683
📔 Objective
Exposes functionality to update the KDF, with the new masterpassword unlock data, and masterpassword authentication data models. These can be directly passed to the server models.
⏰ 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