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

Export to CSV format #262

Open
moenodedev opened this issue Oct 28, 2022 · 8 comments
Open

Export to CSV format #262

moenodedev opened this issue Oct 28, 2022 · 8 comments
Assignees
Labels
enhancement New feature or request macOS macOS-specific issue

Comments

@moenodedev
Copy link

moenodedev commented Oct 28, 2022

Support export to CSV since it's unlikely Firefox will support MacOS AutoFill soon and it doesn't like a KeePassium addon for Firefox is on the roadmap. Also, Safari Auto Fill is broken when Touch ID is enabled (#259). Adding CSV export would make it easier for desktop users to use autofill functionality built into browsers.

Safari

Safari CSV import format

Fields

  • Title
  • URL
  • Username
  • Password
  • Notes
  • OTPAuth

Example CSV

Title,URL,Username,Password,Notes,OTPAuth
"Apple","https://apple.com","[email protected]","password","","0000000000"

Safari also supports the Firefox CSV format.

Firefox

Limitations of about:logins

  • Does not have a Notes field
  • Does not allow extra fields
  • Does not support TOTP or two factor tokens

Firefox about:logins CSV import format

Fields

  • url
  • username
  • password
  • httpRealm
  • formActionOrigin
  • guid
  • timeCreated
  • timeLastUsed
  • timePasswordChanged

url, username, and password values must be present (not blank "" or null) otherwise the row will not be imported.

Example CSV

"url","username","password","httpRealm","formActionOrigin","guid","timeCreated","timeLastUsed","timePasswordChanged"
"https://apple.com/","[email protected]","password","Apple","","00000000-0000-0000-0000-000000000001","","",""
url username password httpRealm formActionOrigin guid timeCreated timeLastUsed timePasswordChanged
https://apple.com/ [email protected] password Apple 00000000-0000-0000-0000-000000000001

The columns can be in any order and they will be matched.

Importing the CSV into Firefox

Enable CSV import in Firefox

  1. Open about:config
  2. Set security.allow_eval_in_parent_process to true
  3. Set signon.management.page.fileImport.enabled to true
  4. Set those options back to false after importing the CSV

Import the CSV

  1. Open about:logins
  2. Click the dropdown button in the top right corner
  3. Click Import from a File...
  4. Select the CSV file and click the Import button
  5. Review the import summary at about:loginsimportreport

Any existing entries will be updated.

Documentation

@moenodedev moenodedev added the enhancement New feature or request label Oct 28, 2022
@moenodedev moenodedev changed the title CSV export in Firefox format CSV export to Firefox format Oct 28, 2022
@moenodedev
Copy link
Author

moenodedev commented Oct 28, 2022

Safari on MacOS will also import logins in this CSV format. If the two factor token value is included in an OTPAuth column the "Verification Code" will be imported.

Safari exports these fields to CSV:
Title,URL,Username,Password,Notes,OTPAuth

https://support.apple.com/en-in/guide/safari/ibrw1015/mac

@moenodedev moenodedev changed the title CSV export to Firefox format Export to Firefox and Safari CSV formats Oct 28, 2022
@keepassium
Copy link
Owner

Thank you for the detailed description.

I would generalize this as "CSV export from the Mac version", with specific format variations for Firefox and Safari. This would be redundant for the mobile app, but totally makes sense for the desktop version.

@keepassium keepassium added the macOS macOS-specific issue label Oct 29, 2022
@keepassium keepassium changed the title Export to Firefox and Safari CSV formats Export to CSV format Oct 29, 2022
@keepassium keepassium self-assigned this Oct 29, 2022
@moenodedev
Copy link
Author

moenodedev commented Oct 31, 2022

This functionality may be better as a separate program specifically for converting kdbx to csv because that would allow you to perform the export in a script or an xbar command or a MacOS shortcut.

@keepassium
Copy link
Owner

@moenodedev , there is already keepassxc-cli export for that :)

@moenodedev
Copy link
Author

On desktop I already have KeeWeb since it has a clean and intuitive UI. I see that it has XML and HTML export. I don't want to install a mess of apps so I decided to resubscribe to 1Password for now. I hope #259 can be resolved soon and that MacOS Auto Fill will be implemented in Firefox eventually.

@keepassium
Copy link
Owner

In the wide perspective, CSV export still makes sense for desktop KeePassium, so I will reopen this to keep it on the list.

@keepassium keepassium reopened this Nov 1, 2022
@FreedomIsAChoice
Copy link

FreedomIsAChoice commented Jan 31, 2024

Hello,
would someone please explain what the column "guid" means when exporting passwords from Firefox?
Is it relevant for the import?
Thank you in advance!

@keepassium
Copy link
Owner

@FreedomIsAChoice , KeePassium does not import/export data from/to other formats. You will get a more informed answer from Firefox team and that of the importing app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request macOS macOS-specific issue
Projects
None yet
Development

No branches or pull requests

3 participants