Skip to content

Conversation

@mzieniukbw
Copy link
Contributor

@mzieniukbw mzieniukbw commented Dec 12, 2025

🎟️ Tracking

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

📔 Objective

Account registration V2 for key connector.
Added KeyConnectorKey, since we have to migrate from MasterKey for key connector at some point.

Added Key Connector API client crate, can set the key connector key for the user into the Key Connector server.

  • Since key connector url is not known during client creation, it can't be added into core's Client creation
  • Created to look almost as identical as the auto generated one.
  • Models will eventually be auto generated by openapi key connector schema, but this is outside of the scope for this PR for now.

🚨 Breaking Changes

No changes to account registration V1.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation
    team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@github-actions
Copy link
Contributor

github-actions bot commented Dec 12, 2025

Logo
Checkmarx One – Scan Summary & Detailsca924ffa-a2ba-4a5b-a2d2-8b3c69b1fb1d

Great job! No new security vulnerabilities introduced in this pull request

…ector

# Conflicts:
#	crates/bitwarden-core/src/key_management/crypto_client.rs
#	crates/bitwarden-crypto/src/keys/mod.rs
@github-actions
Copy link
Contributor

github-actions bot commented Dec 12, 2025

🔍 SDK Breaking Change Detection Results

SDK Version: km/pm-27231-account-registration-v2-key-connector (f7aee37)
Completed: 2025-12-21 07:51:45 UTC
Total Time: 245s

Client Status Details
typescript ✅ No breaking changes detected TypeScript compilation passed with new SDK version - View Details

Breaking change detection completed. View SDK workflow

@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

❌ Patch coverage is 85.43210% with 59 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.99%. Comparing base (b9cf7b7) to head (f7aee37).

Files with missing lines Patch % Lines
crates/bitwarden-auth/src/registration.rs 90.00% 23 Missing ⚠️
crates/bitwarden-core/src/client/internal.rs 0.00% 22 Missing ⚠️
...tes/bitwarden-crypto/src/keys/key_connector_key.rs 83.52% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #611      +/-   ##
==========================================
+ Coverage   78.84%   78.99%   +0.15%     
==========================================
  Files         283      284       +1     
  Lines       29660    30065     +405     
==========================================
+ Hits        23384    23750     +366     
- Misses       6276     6315      +39     

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

Copy link
Contributor

@quexten quexten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for your work on this. Some items that changed in the TDE request after responding to the feedback on it, and it seems like chacha rng was left over (from testing?) which would currently always generate the same key for all users.

…ector

# Conflicts:
#	Cargo.lock
#	crates/bitwarden-auth/Cargo.toml
#	crates/bitwarden-auth/src/registration.rs
#	crates/bitwarden-core/src/client/client.rs
#	crates/bitwarden-core/src/key_management/crypto_client.rs
@mzieniukbw mzieniukbw marked this pull request as ready for review December 21, 2025 07:44
@mzieniukbw mzieniukbw requested review from a team as code owners December 21, 2025 07:44
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.

4 participants