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 #8

Open
wants to merge 1 commit into
base: ps/secure-crypto-service
Choose a base branch
from

Conversation

dani-garcia
Copy link
Member

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

๐ŸŽŸ๏ธ Tracking

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

๐Ÿ“” Objective

Migrated from bitwarden/sdk-sm#1117

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

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

# Conflicts:
#	crates/bitwarden-crypto/src/error.rs
#	crates/bitwarden-crypto/src/service/context.rs

# Conflicts:
#	crates/bitwarden-vault/src/cipher/cipher.rs
Copy link
Contributor

Logo
Checkmarx One โ€“ Scan Summary & Details โ€“ 997d50de-0ede-4ddf-a816-a2992d6a1537

No New Or Fixed Issues Found

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 58.87850% with 440 lines in your changes missing coverage. Please review.

Project coverage is 64.09%. Comparing base (748ba75) to head (c33be4c).

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.63% 17 Missing โš ๏ธ
crates/bitwarden-send/src/client_sends.rs 0.00% 16 Missing โš ๏ธ
... and 31 more
Additional details and impacted files
@@                     Coverage Diff                      @@
##           ps/secure-crypto-service       #8      +/-   ##
============================================================
+ Coverage                     62.23%   64.09%   +1.85%     
============================================================
  Files                           185      187       +2     
  Lines                         13742    13947     +205     
============================================================
+ Hits                           8553     8939     +386     
+ Misses                         5189     5008     -181     

โ˜” View full report in Codecov by Sentry.
๐Ÿ“ข Have feedback on the report? Share it here.

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