bitwarden / jslib

Common code referenced across Bitwarden JavaScript projects.
https://bitwarden.com
GNU General Public License v3.0
134 stars 138 forks source link

Can't import new-style 1Password .1pif file #9

Closed kc9jud closed 6 years ago

kc9jud commented 6 years ago

Hi, I'm trying to import my 1Password data via a .1pif file. I'm getting an error that says "Data is not formatted correctly." Obviously I can't share my .1pif file, but is there any way I can enable debugging so I can see what lines in the .1pif file the parser is choking on?

kc9jud commented 6 years ago

Ah, it looks like this is a different format with the same extension? None of the keys in src/importers/onepassword1PifImporter.ts seem to exist in .1pif JSON file I have.

kspearrin commented 6 years ago

I am not sure why your 1pif would be a different format that everyone else. Are you using OPVault format maybe?

kc9jud commented 6 years ago

That's quite possible -- does it matter whether I export from Mac or Windows in that case? Or am I just out of luck exporting from OPVault format?

kspearrin commented 6 years ago

I don't know much about 1Password, but there is some vault format in it called OPVault that produces a different export file. From what I gather, it is not widely used.

kc9jud commented 6 years ago

It turns out that I am indeed using OPVault -- it's been the default since 2015, and there's been forced conversion starting in May: https://discussions.agilebits.com/discussion/90059/agile-keychain-to-opvault-conversion-not-a-smooth-process

There's a contributor on the 1Password forums who has written a utility for reading and writing a variety of password manager formats: https://discussions.agilebits.com/discussion/30286/mrcs-convert-to-1password-utility

Is there any chance to get either: a) .1pif import support based on that utility, or b) import support on the CSVs created by that utility?

kspearrin commented 6 years ago

If OPVault is the default, then that is what our importer is written for. The importers were all just written based on 1pif exports generated from 1Password 6 and 7 on macOS a few months ago. So it is still not clear to me why your exports would be in a different format :-/

kc9jud commented 6 years ago

It appears that this is something weird with 1Password 4 for Windows.. from the source code of that conversion utility, there is a section in Utils/PIF.pm which talks about converting to standard 1pif format. I'll proceed by trying to export it from a macOS version of 1Password.