Skip to content
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-5693] Migrate SDK to CryptoService #1117

Closed

Conversation

dani-garcia
Copy link
Member

@dani-garcia dani-garcia commented Oct 7, 2024

🎟️ Tracking

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

📔 Objective

Migrate the codebase to the new CryptoService introduced in #979.

EncryptedSettings was removed from Client, though it is still used to initialize the CryptoService. Ideally we'd move that initialization code over directly into the service but this PR is big enough as it is.

There are still some things using keys directly and KeyEncryptable/KeyDecryptable, like MasterKey, PinKey, DeviceKey, private key fingerprint. Those would need to be migrated over on a separate PR.

We need to remove the rest of the uses of SymmetricCryptoKey from the client crates, then we can remove the internal boxing they are doing, as the keys would be protected by the KeyStore instead.

⏰ 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

Copy link
Contributor

github-actions bot commented Oct 7, 2024

Logo
Checkmarx One – Scan Summary & Details41c0a2c4-7ed5-4cb2-bcf5-145f51b80c51

No New Or Fixed Issues Found

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

Attention: Patch coverage is 59.19153% with 424 lines in your changes missing coverage. Please review.

Please upload report for BASE (ps/secure-crypto-service@f4ca816). Learn more about missing BASE report.

Files with missing lines Patch % Lines
crates/bitwarden-vault/src/cipher/login.rs 51.00% 49 Missing ⚠️
crates/bitwarden-vault/src/cipher/identity.rs 0.00% 46 Missing ⚠️
crates/bitwarden-vault/src/cipher/card.rs 0.00% 22 Missing ⚠️
crates/bitwarden-fido/src/authenticator.rs 0.00% 20 Missing ⚠️
crates/bitwarden-send/src/send.rs 79.38% 20 Missing ⚠️
crates/bitwarden-vault/src/folder.rs 0.00% 18 Missing ⚠️
crates/bitwarden-sm/src/secrets/create.rs 0.00% 17 Missing ⚠️
crates/bitwarden-sm/src/secrets/update.rs 0.00% 17 Missing ⚠️
crates/bitwarden-vault/src/cipher/cipher.rs 93.25% 17 Missing ⚠️
crates/bitwarden-send/src/client_sends.rs 0.00% 16 Missing ⚠️
... and 30 more
Additional details and impacted files
@@                     Coverage Diff                     @@
##             ps/secure-crypto-service    #1117   +/-   ##
===========================================================
  Coverage                            ?   59.88%           
===========================================================
  Files                               ?      201           
  Lines                               ?    14803           
  Branches                            ?        0           
===========================================================
  Hits                                ?     8865           
  Misses                              ?     5938           
  Partials                            ?        0           

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

@dani-garcia dani-garcia force-pushed the ps/secure-crypto-service-impl branch 2 times, most recently from 16774b6 to a77c69e Compare October 8, 2024 10:45
# Conflicts:
#	crates/bitwarden-crypto/src/error.rs
#	crates/bitwarden-crypto/src/service/context.rs
@dani-garcia dani-garcia changed the title Migrate SDK to CryptoService [PM-5693] Migrate SDK to CryptoService Oct 8, 2024
@dani-garcia dani-garcia marked this pull request as ready for review October 8, 2024 10:57
@dani-garcia dani-garcia requested a review from a team as a code owner October 8, 2024 10:57
@dani-garcia dani-garcia requested review from Hinton and removed request for a team October 8, 2024 11:01
@dani-garcia dani-garcia deleted the ps/secure-crypto-service-impl branch October 22, 2024 16:14
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