[PM-39455] Let the organization rotate the account recovery key - #8174
Open
mzieniukbw wants to merge 1 commit into
Conversation
The organization holds the existing account recovery key and its own private key, so it can derive the new one from the V2 upgrade token without the member's client involved. Sending a new account recovery key during user key rotation would expose it, so the server leaves the stored value in place for the organization to replace.
mzieniukbw
requested review from
BTreston and
eligrubb
and removed request for
a team
August 8, 2026 16:05
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## km/pm-39455-set-upgrade-tokens-for-organizations #8174 +/- ##
=================================================================================
Coverage 67.53% 67.53%
=================================================================================
Files 2315 2317 +2
Lines 100520 100536 +16
Branches 9044 9047 +3
=================================================================================
+ Hits 67885 67902 +17
+ Misses 30350 30349 -1
Partials 2285 2285 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or 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
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.
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-39455
Depends on #8158
📔 Objective
The organization holds the existing account recovery key and its own private key, so it can derive the new one from the V2 upgrade token without the member's client involved (covered in later PRs). Sending a new account recovery key during user key rotation would expose it, so the server leaves the stored value in place for the organization to replace.
(Since malicious server could send public key of it's own choice to the user.)
📸 Screenshots