Skip to content

PM-23648: All Identities (passport, driving-license, id-doc, name) -> Identity #363

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

Merged
merged 18 commits into from
Aug 14, 2025

Conversation

abergs
Copy link
Member

@abergs abergs commented Jul 25, 2025

🎟️ Tracking

📔 Objective

This PR maps multiple identity documents to Identity + custom fields. PR was submitted in a rush, forgive me if it fails tests but would be worthwhile to have early reviews on my approach.

⏰ 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

@abergs abergs requested a review from a team as a code owner July 25, 2025 10:26
Copy link
Contributor

github-actions bot commented Jul 25, 2025

Logo
Checkmarx One – Scan Summary & Details7eff8621-b380-4c29-8d49-0fb4d8bb2a7d

Great job! No new security vulnerabilities introduced in this pull request

Copy link

codecov bot commented Jul 25, 2025

Codecov Report

❌ Patch coverage is 97.63314% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.89%. Comparing base (4153278) to head (77fbc9c).

Files with missing lines Patch % Lines
crates/bitwarden-exporters/src/cxf/identity.rs 97.30% 12 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##           cxf/sample     #363      +/-   ##
==============================================
+ Coverage       74.37%   74.89%   +0.51%     
==============================================
  Files             253      254       +1     
  Lines           21918    22419     +501     
==============================================
+ Hits            16302    16791     +489     
- Misses           5616     5628      +12     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@audreyality

This comment was marked as resolved.

@abergs
Copy link
Member Author

abergs commented Aug 1, 2025

❓ Have you considered that some of these documents may have multiple copies? I have identity documents from 2 different countries. Some jurisdictions issue multiple drivers licenses (e.g. a commercial license and a personal license). Some official positions issue specialized passports...

@audreyality If there are multiple documents in the CXF import then you'll have multiple identities stored in Bitwarden, one for each.

In the future we may tro to de-dupe the incoming data, unless we find it breakes in cases like yours. However, we don't that in this PR so I think we're good?

@Hinton
Copy link
Member

Hinton commented Aug 12, 2025

@abergs can you just rebase this on main directly. I don't think there's any reaason to base it on the sample.

@abergs abergs requested a review from Hinton August 13, 2025 08:29
(identity, custom_fields)
}

#[cfg(test)]
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: Move sample usages to a new sample.rs, where you run our import flow and assert all the output at once.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will do as part of final cleanup once all items are mapped (do to logistics)

@abergs abergs requested a review from Hinton August 14, 2025 14:07
@abergs abergs requested a review from Hinton August 14, 2025 15:08
Copy link

@abergs abergs merged commit 57f3dc5 into cxf/sample Aug 14, 2025
47 checks passed
@abergs abergs deleted the cxf/identity branch August 14, 2025 15:12
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.

3 participants