-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[PM-5938] Prevent permanent vault coruption on key-rotation with desycned vault #4098
Merged
quexten
merged 4 commits into
main
from
auth/pm-5938/prevent-vault-coruption-on-desycned-vault
May 30, 2024
Merged
[PM-5938] Prevent permanent vault coruption on key-rotation with desycned vault #4098
quexten
merged 4 commits into
main
from
auth/pm-5938/prevent-vault-coruption-on-desycned-vault
May 30, 2024
+70
−25
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4098 +/- ##
==========================================
+ Coverage 38.66% 39.31% +0.65%
==========================================
Files 1209 1200 -9
Lines 58561 57973 -588
Branches 5594 5332 -262
==========================================
+ Hits 22643 22794 +151
+ Misses 34863 34127 -736
+ Partials 1055 1052 -3 ☔ View full report in Codecov by Sentry. |
No New Or Fixed Issues Found |
jlf0dev
approved these changes
May 17, 2024
r-tome
approved these changes
May 20, 2024
djsmith85
approved these changes
May 20, 2024
LRNcardozoWDF
approved these changes
May 21, 2024
Passed QA |
quexten
deleted the
auth/pm-5938/prevent-vault-coruption-on-desycned-vault
branch
May 30, 2024 09:08
cyprain-okeke
pushed a commit
that referenced
this pull request
May 31, 2024
…cned vault (#4098) * Add check to verify the vault state for rotation is not obviously desynced (empty) * Add unit test for key rotation guardrail * Move de-synced vault detection to validators * Add tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of change
Objective
Under specific circumstances, the local vault of the web client can be desynced (no full sync, or cipher decryption errors). Rotating keys in this state permanently corrupts the vault (Reproduction steps bitwarden/clients#7709). This PR adds a basic check to vault rotation that ensures if the update request has an obviously bad state (no ciphers at all in the request, but there are ciphers in the DB), the key rotation request is rejected.
Code changes
Before you submit
dotnet format --verify-no-changes
) (required)