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-8618] Credential Exchange #32

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

[PM-8618] Credential Exchange #32

wants to merge 22 commits into from

Conversation

Hinton
Copy link
Member

@Hinton Hinton commented Nov 12, 2024

🎟️ Tracking

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

📔 Objective

Initial implementation of the Credential Exchange Format. Currently supports the following types:

  • Login
    • BasicAuth
    • Passkey
    • Totp (Export only)
    • Note (Export only)

⏰ 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 Nov 12, 2024

Logo
Checkmarx One – Scan Summary & Detailse1929e72-f7e6-43fe-8984-167151495988

No New Or Fixed Issues Found

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 57.94798% with 291 lines in your changes missing coverage. Please review.

Project coverage is 63.34%. Comparing base (15f1d9c) to head (cc68ca9).

Files with missing lines Patch % Lines
crates/bitwarden-exporters/src/models.rs 27.52% 79 Missing ⚠️
crates/bitwarden-exporters/src/export.rs 0.00% 67 Missing ⚠️
crates/bitwarden-exporters/src/lib.rs 0.00% 61 Missing ⚠️
crates/bitwarden-exporters/src/cxp/export.rs 85.60% 39 Missing ⚠️
crates/bitwarden-exporters/src/cxp/import.rs 88.81% 16 Missing ⚠️
crates/bitwarden-uniffi/src/tool/mod.rs 0.00% 16 Missing ⚠️
crates/bitwarden-exporters/src/client_exporter.rs 0.00% 10 Missing ⚠️
crates/bitwarden-vault/src/totp.rs 77.77% 2 Missing ⚠️
crates/bitwarden-vault/src/cipher/cipher.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #32      +/-   ##
==========================================
- Coverage   63.43%   63.34%   -0.09%     
==========================================
  Files         187      189       +2     
  Lines       12999    13618     +619     
==========================================
+ Hits         8246     8627     +381     
- Misses       4753     4991     +238     

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

impl TryFrom<CipherView> for crate::Cipher {
type Error = MissingFieldError;
impl crate::Cipher {
pub(crate) fn from_cipher(
Copy link
Member Author

@Hinton Hinton Nov 26, 2024

Choose a reason for hiding this comment

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

This is really unfriendly. And we should figure out a better strategy for handling this.

@dani-garcia Long term we've discussed wanting dedicated DTOs for ciphers. Should we go ahead with it and create a CreateCipherView dto in vault which lets you have a full passkey unencrypted?

An alternative would be to add a method to Cipher letting you pass in the new passkey and we can avoid the dance of export needing to know how to encrypt things.

FYI @coroiu

Copy link
Member Author

@Hinton Hinton left a comment

Choose a reason for hiding this comment

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

Some personal reminders.

crates/bitwarden-exporters/src/client_exporter.rs Outdated Show resolved Hide resolved
Copy link
Member Author

Choose a reason for hiding this comment

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

Personal reminder. Json currently does not support passkey exports, web clients do.

crates/bitwarden-exporters/src/cxp/export.rs Show resolved Hide resolved
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: Improve tests.

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