Skip to content
This repository was archived by the owner on Jun 17, 2022. It is now read-only.

Conversation

@djsmith85
Copy link
Contributor

@djsmith85 djsmith85 commented Mar 6, 2022

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

With Dashlane discontinuing their Desktop app and now only supporting .csv instead of .json, we need a new importer to handle this format.

Rough overview of importer functionality:

  • Empty fields are skipped

  • All unmapped fields are imported as custom fields

  • Import into folders based on the category column

  • Import into collection based on the category column, if the import is ran from within an organization

  • Login items - credentials.csv

    • URI/URL
    • Username
    • Password
    • TOTP
    • Notes
  • Payment items - payments.csv

    • Cards
      • Cardholder
      • CC Number
      • CVV
      • Expiry date
      • Card brand is set using CC Number and only to our supported brands
    • Accounts
      • Cardholder
      • Account number
  • PersonalInformation items as Secure Notes- personalInfo.csv

  • If only one name record is present, then all following records will be combined into one Bitwarden Identity.

    • Title
    • Firstname
    • Initial
    • LastName
    • DefaultPhone
    • Company
    • Email
    • Username
    • Address
  • Id's items - ids.csv
    Maps every type to an identity record

    • Title is set using the fullname appended by the id-type
    • Name-fields are set if fullName is present in the export file
    • card
      • LicenseNumber
    • passport
      • PassportNumber
    • license
      • LicenseNumber
      • State
    • social_security
      • SSN
    • tax_number
      • LicenseNumber
  • Secure Notes - securenotes.csv

    • Title
    • Note

Asana task: https://app.asana.com/0/1153292148278596/1200559746179756/f

Code changes

  • common/src/importers/dashlaneImporters/dashlaneJsonImporter.ts: Moved existing dashlane json importer into dashlaneImporters folder
  • common/src/importers/dashlaneImporters/types/dashlaneCsvTypes.ts: Added types definitions for the csv files from Dashlane
  • common/src/importers/dashlaneImporters/dashlaneCsvImporter.ts: The actual csv importer
  • spec/common/importers/testData/dashlaneCsv/*.ts: Several files with test data used when executing the spec
  • spec/common/importers/dashlaneCsvImporter.spec.ts: Spec including several test cases to validate an import
  • common/src/enums/importOptions.ts: Register Dashlane csv importer
  • common/src/services/import.service.ts: Fix import of DashlaneJsonImporter and register Dashlane csv importer

Testing requirements

Testing will be done once, these changes are merged into the web-vault.

Before you submit

  • I have checked for linting errors (npm run lint) (required)
  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

@djsmith85 djsmith85 changed the title WIP: Dashlane Csv-Importer Dashlane Csv-Importer Mar 7, 2022
@djsmith85 djsmith85 requested a review from a team March 7, 2022 10:50
@djsmith85 djsmith85 marked this pull request as ready for review March 7, 2022 10:50
Copy link
Member

@differsthecat differsthecat left a comment

Choose a reason for hiding this comment

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

Looks good!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants