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-8280] email forwarders #11563

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

Conversation

audreyality
Copy link
Contributor

@audreyality audreyality commented Oct 15, 2024

🎟️ Tracking

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

📔 Objective

Add forwarder support to credential generator

  • Extends the UserStateSubject with classifier & encryptor support
    • Move generalized rx helpers to common so they can be used by UserStateSubject
    • Introduce ObjectKey to support encryption to POJOs in state storage
  • Extend CredentialGeneratorService with forwarder integration support:
    • Introduce { forwarder: IntegrationId } algorithm Id to model service integration
    • Include forwarder integration metadata in algorithms lists
    • Introduce ForwarderEngine to invoke RPCs in response to generator requests.
    • Introduce AlgorithmInfo to model localized credential generation metadata.
  • Add forwarder list and generation features to v2 generator components

🏁 Remaining tasks

  • Define forwarder subject keys
  • Add encryptor injection to credential generator service
  • Use import configuration for settings migration split to PM-13733
  • Implement forwarder settings component(s)
  • Address TODOs
  • Unit test "classified" format support in UserStateSubject

🦕 System Evolution

Switching to { 'engine': EngineId } for built-in generators could improve cohesion throughout the generator system. It also eliminates confusion between the 'username' category and the { engine: 'username' } engineId.

Promote ObjectKey to a class. Several of the methods in UserStateSubject, particularly those used before classification, properly belong in ObjectKey. ObjectKey should also provide an optional serializer for parity with its deserializer.

📸 Screenshots

image image image image image image image

🦮 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 Oct 15, 2024

Codecov Report

Attention: Patch coverage is 70.49689% with 95 lines in your changes missing coverage. Please review.

Project coverage is 33.38%. Comparing base (023abe2) to head (5820e44).

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
libs/tools/generator/core/src/engine/forwarder.ts 16.66% 20 Missing ⚠️
libs/common/src/tools/state/user-state-subject.ts 83.49% 12 Missing and 5 partials ⚠️
libs/common/src/tools/public-classifier.ts 0.00% 12 Missing ⚠️
libs/tools/generator/core/src/data/generators.ts 33.33% 10 Missing ⚠️
libs/common/src/tools/state/object-key.ts 50.00% 4 Missing and 2 partials ⚠️
...s/tools/generator/core/src/types/generator-type.ts 33.33% 6 Missing ⚠️
.../core/src/services/credential-generator.service.ts 92.59% 4 Missing ⚠️
...ols/send/send-ui/src/send-form/send-form.module.ts 0.00% 3 Missing ⚠️
libs/common/src/tools/private-classifier.ts 85.71% 0 Missing and 2 partials ⚠️
libs/tools/generator/core/src/data/integrations.ts 66.66% 1 Missing and 1 partial ⚠️
... and 7 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11563      +/-   ##
==========================================
+ Coverage   33.30%   33.38%   +0.07%     
==========================================
  Files        2787     2793       +6     
  Lines       86620    86833     +213     
  Branches    16525    16558      +33     
==========================================
+ Hits        28852    28985     +133     
- Misses      55465    55535      +70     
- Partials     2303     2313      +10     

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

This comment was marked as off-topic.

@djsmith85 djsmith85 self-requested a review October 15, 2024 18:54
@audreyality audreyality marked this pull request as ready for review October 16, 2024 21:51
@audreyality audreyality requested a review from a team as a code owner October 16, 2024 21:51
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