Skip to content

[PM-33435] Add new user key rotation endpoint with MP support#7216

Merged
Thomas-Avery merged 19 commits intomainfrom
km/pm-33435/new-endpoint
Mar 20, 2026
Merged

[PM-33435] Add new user key rotation endpoint with MP support#7216
Thomas-Avery merged 19 commits intomainfrom
km/pm-33435/new-endpoint

Conversation

@Thomas-Avery
Copy link
Contributor

@Thomas-Avery Thomas-Avery commented Mar 13, 2026

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-33435

📔 Objective

Adds a new endpoint for user key rotation without a password change. This implements the rotation for master password users and setups things for future implementation of key connector and TDE users.

This builds off the refactor done in #7201.

@Thomas-Avery Thomas-Avery self-assigned this Mar 13, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 2026

Logo
Checkmarx One – Scan Summary & Detailsc6f960d3-463d-4670-a309-e24dd7d8dfe2


New Issues (6) Checkmarx found the following issues in this Pull Request
# Severity Issue Source File / Package Checkmarx Insight
1 MEDIUM CSRF /src/Api/KeyManagement/Controllers/AccountsKeyManagementController.cs: 145
detailsMethod at line 145 of /src/Api/KeyManagement/Controllers/AccountsKeyManagementController.cs gets a parameter from a user request from request. T...
Attack Vector
2 MEDIUM CSRF /src/Api/KeyManagement/Controllers/AccountsKeyManagementController.cs: 145
detailsMethod at line 145 of /src/Api/KeyManagement/Controllers/AccountsKeyManagementController.cs gets a parameter from a user request from request. T...
Attack Vector
3 MEDIUM CSRF /src/Api/KeyManagement/Controllers/AccountsKeyManagementController.cs: 97
detailsMethod at line 97 of /src/Api/KeyManagement/Controllers/AccountsKeyManagementController.cs gets a parameter from a user request from model. This...
Attack Vector
4 MEDIUM CSRF /src/Api/KeyManagement/Controllers/AccountsKeyManagementController.cs: 97
detailsMethod at line 97 of /src/Api/KeyManagement/Controllers/AccountsKeyManagementController.cs gets a parameter from a user request from model. This...
Attack Vector
5 MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 1592
detailsMethod at line 1592 of /src/Api/Vault/Controllers/CiphersController.cs gets a parameter from a user request from id. This parameter value flows ...
Attack Vector
6 MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 1419
detailsMethod at line 1419 of /src/Api/Vault/Controllers/CiphersController.cs gets a parameter from a user request from id. This parameter value flows ...
Attack Vector

Fixed Issues (3) Great job! The following issues were fixed in this Pull Request
Severity Issue Source File / Package
MEDIUM CSRF /src/Api/KeyManagement/Controllers/AccountsKeyManagementController.cs: 96
MEDIUM CSRF /src/Api/KeyManagement/Controllers/AccountsKeyManagementController.cs: 96
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 293

@Thomas-Avery Thomas-Avery changed the title Add new user key rotation endpoint with MP support [PM-33435] Add new user key rotation endpoint with MP support Mar 16, 2026
@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 94.89796% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.72%. Comparing base (53907c2) to head (6709a78).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...gement/Models/Requests/UnlockMethodRequestModel.cs 86.95% 2 Missing and 1 partial ⚠️
...ent/Controllers/AccountsKeyManagementController.cs 94.28% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7216      +/-   ##
==========================================
+ Coverage   57.68%   57.72%   +0.04%     
==========================================
  Files        2037     2042       +5     
  Lines       89719    89817      +98     
  Branches     7976     7985       +9     
==========================================
+ Hits        51751    51845      +94     
- Misses      36112    36114       +2     
- Partials     1856     1858       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Thomas-Avery Thomas-Avery marked this pull request as ready for review March 16, 2026 19:13
@Thomas-Avery Thomas-Avery requested a review from a team as a code owner March 16, 2026 19:14
@Thomas-Avery Thomas-Avery requested review from eligrubb and removed request for a team March 16, 2026 19:14
@Thomas-Avery Thomas-Avery requested a review from mzieniukbw March 18, 2026 16:09
mzieniukbw
mzieniukbw previously approved these changes Mar 18, 2026
Base automatically changed from km/pm-33162 to main March 20, 2026 15:31
@Thomas-Avery Thomas-Avery dismissed mzieniukbw’s stale review March 20, 2026 15:31

The base branch was changed.

@Thomas-Avery Thomas-Avery requested a review from a team as a code owner March 20, 2026 15:31
@sonarqubecloud
Copy link

@Thomas-Avery Thomas-Avery merged commit 005c744 into main Mar 20, 2026
40 of 41 checks passed
@Thomas-Avery Thomas-Avery deleted the km/pm-33435/new-endpoint branch March 20, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants