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

Merged
merged 30 commits into from
Dec 13, 2024
Merged

[PM-8618] Credential Exchange #32

merged 30 commits into from
Dec 13, 2024

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 & Detailsf5a5d1d3-daae-4d9e-957c-12884266b815

No New Or Fixed Issues Found

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 67.32558% with 281 lines in your changes missing coverage. Please review.

Project coverage is 64.43%. Comparing base (28c7e29) to head (061ec35).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/bitwarden-exporters/src/models.rs 53.17% 81 Missing ⚠️
crates/bitwarden-exporters/src/lib.rs 0.00% 78 Missing ⚠️
crates/bitwarden-exporters/src/export.rs 0.00% 41 Missing ⚠️
crates/bitwarden-exporters/src/cxp/export.rs 89.45% 35 Missing ⚠️
crates/bitwarden-exporters/src/cxp/import.rs 91.28% 17 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   64.06%   64.43%   +0.37%     
==========================================
  Files         186      188       +2     
  Lines       13057    13830     +773     
==========================================
+ Hits         8365     8912     +547     
- Misses       4692     4918     +226     

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

@Hinton Hinton requested a review from dani-garcia November 26, 2024 15:20
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
crates/bitwarden-exporters/src/cxp/import.rs Show resolved Hide resolved
@Hinton Hinton force-pushed the credential-exchange branch from dfe65e7 to 95c6f87 Compare November 28, 2024 15:46
Copy link
Member

@dani-garcia dani-garcia left a comment

Choose a reason for hiding this comment

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

Looks pretty good to me, just some minor comments

crates/bitwarden-exporters/src/export.rs Outdated Show resolved Hide resolved

match value.ty {
ItemType::Login => {
let basic_auth = grouped.basic_auth.first();
Copy link
Member

Choose a reason for hiding this comment

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

We're only handling the first element in Item, but it looks like this function could handle more than one as returns a Vec, is this missing from the first version?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes it's a known limitation of the current implementation.

crates/bitwarden-exporters/src/cxp/import.rs Outdated Show resolved Hide resolved
crates/bitwarden-exporters/src/cxp/export.rs Show resolved Hide resolved
crates/bitwarden-exporters/src/cxp/export.rs Outdated Show resolved Hide resolved
@Hinton Hinton merged commit b7b8dec into main Dec 13, 2024
39 checks passed
@Hinton Hinton deleted the credential-exchange branch December 13, 2024 10:36
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.

2 participants