bitwarden / web

The website vault (vault.bitwarden.com).
https://vault.bitwarden.com
Other
2.57k stars 406 forks source link

Importing 1Password 1pif into bitwarden fails #139

Closed vfrans closed 6 years ago

vfrans commented 6 years ago

Trying to import 1pif file into bitwarden self-hosted fails with the following error:

(Following instructions from https://help.bitwarden.com/article/import-from-1password/ from 1Password 4 on Windows)

Step to reproduce the importing error:

You should see an error mentioning that your CSV data is not formatted correctly. (However 1pif is not in CSV format, it looks more like JSON...)

kspearrin commented 6 years ago

Yes, the instructions are for CSV export, not 1pif. Does windows support exporting 1pif now?

vfrans commented 6 years ago

The instructions clearly state this is about 1Password 4 for Windows and explains how to export to 1pif format.

I do confirm that 1Password 4 for Windows can export 1pif format, however import is not working.

Should I export in csv instead?

If so, what type should I select while importing?

Thanks a lot for the help!

kspearrin commented 6 years ago

Oh I seen, I didn't catch that this was 1Password version 4. I am not sure why you would be getting an error about CSV data is you properly selected "1Password (1pif)" from the file source option. CSV data should be be parsed with this option at all (since there is none). Can you confirm again that you selected "1Password (1pif)". If so, we'll have to look further since we haven't heard of this one before.

vfrans commented 6 years ago

Yes, I selected "1Password (1pif)" in the import dialog.

If necessary I can provide a sample 1pif and screenshots later today.

kspearrin commented 6 years ago

Yes, please provide a sample that causes the error if you can please.

vfrans commented 6 years ago

export.zip

Here is a sample 1pif file that I generated in an empty vault containing only 1 sample entry (in opvault format) on 1Password 4 for Windows (I used the selection for export, not the whole export).

The error is present with this sample (and basically anything I export in 1pif format from 1Password 4 on Windows)

Note that, this morning I tried exporting using 1Password 6 for Mac (using the same vault) and import is working so it seems like 1Password 4 for Windows does not export the records in the same way 1Password 6 for Mac does...

kspearrin commented 6 years ago

@vfrans Yea, that definitely doesn't look like a 1pif that I exported from Windows several months back. They must have changed it. I'll mark the docs as only supporting CSV on windows.

kspearrin commented 6 years ago

@vfrans I just installed 1Password 4 on Windows and did a 1pif export. Mine does not look like yours and works correctly with the importer in bitwarden. Ex:

{"keyID":"B4482C3A63F74D799DB54F4EA4A0A1C9","locationKey":"","typeName":"webforms.WebForm","uuid":"101667D6DD1048668811644CA48349B0","createdAt":1511882046,"securityLevel":"SL5","openContents":{"autosubmit":"default","usernameHash":"34b2b6eed37c0ecab7480a6a854e7d5225e1ccd2d31e36ea93143fe4a21f47f6"},"title":"Google","location":"google.com","updatedAt":1511882068,"txTimestamp":1511882068,"contentsHash":"6072aedb","secureContents":{"fields":[{"type":"T","id":"username","name":"username","value":"kylegoogle","designation":"username"},{"type":"P","id":"password","name":"password","value":"5SSf6BBnqRunHgoK","designation":"password"}],"URLs":[{"url":"google.com"}],"notesPlain":"Some notes"}}
vfrans commented 6 years ago

Are you using .agilekeychain or .opvault? I'm using the latter, I'll try with an agilekeychain because I can't think of any reason it would work for you and not for me. Also, are tou exporting the whole vault or just the selected entries? I'm using the latter.

kspearrin commented 6 years ago

agilekeychain with all entries

vfrans commented 6 years ago

I've just tried using agilekeychain and indeed it works (either selectively or all entries).

Using opvault, nothing works, so maybe add a note to the documentation stating that the export only works with agilekeychain vaults.

Thanks a lot for the help :)

kspearrin commented 6 years ago

Great. Thanks for the info. Good to know.