Vault Import and Export

Provides a convenient way to import other password managers' data into the vault and export vault data out.
This feature is only available in the JS SDK.

Importing Vault Data

To make the transition easier for users to switch to using the Sudo Password Manager, the JS SDK provides a transformer that will accept vault files from other password managers. The transformer takes a file and returns a list of ItemInput. Those inputs have not been added to the vault, but allows the user to edit the data further if needed. After the data has been transformed, the data can be added to the vault calling the addBatchItems method.
try {
const vaultId = /* Id of the vault to add the data to */
const file = /* the vault data to upload */
const items = await transformData('firefox', file)
const result = await client.addBatchItems(vaultId, items)
} catch {
// Handle/notify user of errors

Supported Vault Imports

Currently the Sudo Password Manager provides data transformation for the following password managers and file formats. However, any password manager can be added to the vault adhering to the Sudo Platform's generic CSV file.
  • 1Password (CSV)
  • Dashlane (CSV, and zip)
  • Chrome Browser (CSV)
  • Firefox Browser (CSV)
  • Safari Browser (CSV)
  • Edge Browser (CSV)

Exporting Vault Data

If the user needs to export vault data, the client provides an exportVault method that will return a given vault's content in a string format to save as a CSV file.
try {
const vaultId = /* the vault id of the vault to export*/
const fileContents = await client.exportVault(vaultId)
} catch {
// Handle/notify user of errors
When the client exports vault data, the client decrypts secure values and returns the secure values as plaintext. Handle the data appropriately.