chore: Use private key accessor#6808
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the refactor that introduces Code Review DetailsNo findings. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6808 +/- ##
==========================================
+ Coverage 85.55% 85.91% +0.35%
==========================================
Files 959 858 -101
Lines 61062 59599 -1463
Branches 8651 8560 -91
==========================================
- Hits 52242 51203 -1039
+ Misses 5813 5444 -369
+ Partials 3007 2952 -55
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Great job! No new security vulnerabilities introduced in this pull request |
01151eb to
c779c09
Compare
c779c09 to
501c503
Compare
| fakeAuthDiskSource.assertPrivateKey( | ||
| userId = USER_ID_1, | ||
| privateKey = "privateKey", | ||
| privateKey = "mockWrappedPrivateKey-1", |
There was a problem hiding this comment.
These test updates are because we now favor the private key from the AccountKeysJson instead of the private key directly on the login response.
|
Thanks @SaintPatrck |

🎟️ Tracking
NA
📔 Objective
This PR updates the way we access the private key from the login response to ensure we are always attempting to retrieve it from the
accountKeysbefore falling back to the legacyprivateKeyproperty. Additionally, a newAccountKeysJson.toAccountCryptographicStateextension was added to simplify the transformation to aWrappedAccountCryptographicState.