Tools/pm 31067/move sends api calls to sdk 2#756
Conversation
|
Great job! No new security vulnerabilities introduced in this pull request |
harr1424
left a comment
There was a problem hiding this comment.
Looks good overall! I've added some suggestions to update comments and also the return type you noticed on the call earlier.
Co-authored-by: Daniel García <dani-garcia@users.noreply.github.com>
Co-authored-by: John Harrington <84741727+harr1424@users.noreply.github.com>
Co-authored-by: John Harrington <84741727+harr1424@users.noreply.github.com>
coroiu
left a comment
There was a problem hiding this comment.
I haven't had a change to review the whole PR yet but I wanted to post my response regarding Oscars comments
….com:bitwarden/sdk-internal into tools/pm-31067/move-sends-api-calls-to-sdk-2
| edit_send( | ||
| key_store, | ||
| &config.api_client, | ||
| repository.as_ref(), | ||
| send_id, | ||
| request, | ||
| ) |
There was a problem hiding this comment.
suggestion: don't split out implementation into separate functions like this. If you need to organize the code into multiple files then you can create multiple impl SendClient { blocks (on in each file)
|
There are still outstanding comments... |
| let text_value = "2.2VPyLzk1tMLug0X3x7RkaQ==|mrMt9vbZsCJhJIj4eebKyg==|aZ7JeyndytEMR1+uEBupEvaZuUE69D/ejhfdJL8oKq0="; | ||
|
|
||
| let send = Send { | ||
| id: Some(SendId::new(send_id)), |
There was a problem hiding this comment.
issue: The UUID's implement FromStr.
let send_id = "3d80dd72-2d14-4f26-812c-b0f0018aa144".parse().unwrap();There was a problem hiding this comment.
Remove the SendId::new, it's still being cast into a Uuid.
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
|
Still at least one pending comment. |
|
@claude evaluate all review comments and identify which are remaining. |
|
Claude finished @Hinton's task in 1m 44s —— View job Evaluating Review Comments
Remaining (Unresolved) Comments
Summary of What's Been AddressedThe following items from earlier reviews have been resolved:
Remaining Items Requiring Action
|
|
@claude evaluate all review comments and identify which are remaining. |
|
Claude finished @adudek-bw's task in 1m 31s —— View job Evaluating Review Comments
Resolved CommentsThese items from prior reviews have been addressed in the current code:
Remaining (Unresolved) Comments
SummaryThe vast majority of review comments have been addressed. The major issues that were previously flagged (password hashing bug, Remaining actionable items:
Non-blocking items (could be follow-up tickets):
|
|
| expected: Uuid, | ||
| returned: Option<Uuid>, |
There was a problem hiding this comment.
question: Should these be Uuid or SendId?
| .to_vec(); | ||
|
|
||
| // Derive the shareable send key for encrypting content | ||
| let send_key = Send::derive_shareable_key(ctx, &k)?; |
There was a problem hiding this comment.
These comments are pretty bad.
k is the key, while send_key is the stretched key through a key derivation function.
| let text_value = "2.2VPyLzk1tMLug0X3x7RkaQ==|mrMt9vbZsCJhJIj4eebKyg==|aZ7JeyndytEMR1+uEBupEvaZuUE69D/ejhfdJL8oKq0="; | ||
|
|
||
| let send = Send { | ||
| id: Some(SendId::new(send_id)), |
There was a problem hiding this comment.
Remove the SendId::new, it's still being cast into a Uuid.




🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-31067
📔 Objective
Add calls to the SendClient that adds/edits/gets/lists sends via API calls.
🚨 Breaking Changes