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-17665] Move cryptofunction service to km #13285

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

quexten
Copy link
Contributor

@quexten quexten commented Feb 6, 2025

🎟️ Tracking

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

📔 Objective

Moves cryptofunctionservice to KM ownership.

📸 Screenshots

⏰ 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

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 25.80645% with 23 lines in your changes missing coverage. Please review.

Project coverage is 35.05%. Comparing base (59da991) to head (6bdc6dc).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
apps/browser/src/popup/services/services.module.ts 0.00% 2 Missing ⚠️
libs/angular/src/services/jslib-services.module.ts 0.00% 2 Missing ⚠️
apps/browser/src/auth/popup/login-v1.component.ts 0.00% 1 Missing ⚠️
.../auth/popup/login-via-auth-request-v1.component.ts 0.00% 1 Missing ⚠️
apps/browser/src/auth/popup/sso-v1.component.ts 0.00% 1 Missing ⚠️
apps/browser/src/background/main.background.ts 0.00% 1 Missing ⚠️
...c/app/services/renderer-crypto-function.service.ts 0.00% 1 Missing ⚠️
apps/desktop/src/app/services/services.module.ts 0.00% 1 Missing ⚠️
apps/desktop/src/auth/login/login-v1.component.ts 0.00% 1 Missing ⚠️
.../auth/login/login-via-auth-request-v1.component.ts 0.00% 1 Missing ⚠️
... and 11 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13285      +/-   ##
==========================================
- Coverage   35.05%   35.05%   -0.01%     
==========================================
  Files        3036     3036              
  Lines       92720    92720              
  Branches    16888    16888              
==========================================
- Hits        32507    32500       -7     
- Misses      57750    57757       +7     
  Partials     2463     2463              

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

Copy link
Contributor

github-actions bot commented Feb 6, 2025

Logo
Checkmarx One – Scan Summary & Details6588bf7a-e306-4b94-a342-72087b18f04d

Great job, no security vulnerabilities found in this Pull Request

@quexten quexten changed the title Move cryptofunction service to km [PM-17665] Move cryptofunction service to km Feb 6, 2025
@quexten quexten marked this pull request as ready for review February 6, 2025 12:20
@quexten quexten requested review from a team as code owners February 6, 2025 12:20
@@ -50,6 +50,7 @@ component_management:
name: Key Management - Crypto
paths:
- libs/common/src/key-management/crypto/**
- libs/node/src/services/**
Copy link
Contributor

Choose a reason for hiding this comment

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

Please also add below to key-management

Copy link
Contributor

@jprusik jprusik left a comment

Choose a reason for hiding this comment

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

Approved for Autofill concerns

@@ -1,4 +1,4 @@
import { CryptoFunctionService } from "../../../platform/abstractions/crypto-function.service";
import { CryptoFunctionService } from "../../../key-management/crypto/abstractions/crypto-function.service";
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this not be a relative import?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I double checked with @Thomas-Avery since you raised the same comment on the encrypt service PR. If something is within a package - in this case libs/common/, then we should use relative imports. In this case the import is in libs/common/src/auth/services/webauthn-login/webauthn-login-prf-key.service.ts, importing libs/common/src/key-management/crypto/abstractions/crypto-function-service.ts, so both are under the libs/common package and we should use a relative import.

If we were importing cross package (i.e in libs/common we would be importing something from libs/key-management/@bitwarden/key-management), then we would not use relative imports.

I don't know if this is just a key-management policy, or applies to all teams. Maybe @Thomas-Avery can chime in.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for the clarification and that all tracks. I apologize for not scrutinizing these imports further than a surface level observation.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Changes look good, non blocking comment.

Copy link
Member

@shane-melton shane-melton left a comment

Choose a reason for hiding this comment

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

Vault changes look good to go!

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.

7 participants