Skip to content

[PM-30584] Add support for key-connector-migration setting key#7136

Open
quexten wants to merge 3 commits intomainfrom
km/key-connector-set-key
Open

[PM-30584] Add support for key-connector-migration setting key#7136
quexten wants to merge 3 commits intomainfrom
km/key-connector-set-key

Conversation

@quexten
Copy link
Contributor

@quexten quexten commented Mar 4, 2026

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-30584
#7136
bitwarden/sdk-internal#809
bitwarden/clients#19360

📔 Objective

We do not want to keep the same master-key that was used during password derivation, but use a separately sampled key - named "key-connector-key". This means that the conversion flow now requires:

  • Posting the key to key-connector
  • Setting the "key" field on the user to "key-connector-key-wrapped-user-key"

To keep backwards compatibility, we make the request body optional, but if present, the request body contains the key-connector-key-wrapped-user-key. This is subsequently set to the user object.

This will unblock setting the master-key to state during unlock and login, which will improve unlock time, since we can remove double-kdf-derivation.

📸 Screenshots

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Logo
Checkmarx One – Scan Summary & Detailsaa27fffa-5f51-4bba-be01-6211dfb1ba65


New Issues (1) 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: 202
detailsMethod at line 202 of /src/Api/KeyManagement/Controllers/AccountsKeyManagementController.cs gets a parameter from a user request from model. Thi...
Attack Vector

@quexten quexten changed the title Add support for key-connector-migration setting key [PM-30584] Add support for key-connector-migration setting key Mar 4, 2026
@quexten quexten force-pushed the km/key-connector-set-key branch from 03a81f1 to 23aaddb Compare March 4, 2026 14:07
@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.69%. Comparing base (996f479) to head (d5c4ab4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7136      +/-   ##
==========================================
+ Coverage   56.68%   56.69%   +0.01%     
==========================================
  Files        2026     2027       +1     
  Lines       88681    88704      +23     
  Branches     7905     7910       +5     
==========================================
+ Hits        50272    50294      +22     
- Misses      36585    36586       +1     
  Partials     1824     1824              

☔ 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.

@quexten quexten marked this pull request as ready for review March 5, 2026 11:25
@quexten quexten requested a review from a team as a code owner March 5, 2026 11:25
@quexten quexten requested a review from Thomas-Avery March 5, 2026 11:25
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 5, 2026

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.

1 participant