Enpass to 1PW Converter Not Working in spite of same fields [Solved: Needed customization}

Options
TechieSooner
TechieSooner
Community Member
edited May 2019 in 1Password 7 for Windows

I'm having trouble with Mr C's converter. Most of my items (not all) are just getting thrown into the "Notes" field of 1Password with seemingly no pattern to it.

So here's a login that works (From the Enpass JSON):

            {
                "auto_submit": 1,
                "category": "login",
                "favorite": 0,
                "fields": [
                    {
                        "label": "Username",
                        "order": 1,
                        "sensitive": 0,
                        "type": "username",
                        "uid": 10,
                        "updated_at": 1538760682,
                        "value": "me@me.com",
                        "value_updated_at": 1538760682
                    },
                    {
                        "label": "E-mail",
                        "order": 2,
                        "sensitive": 0,
                        "type": "email",
                        "uid": 12,
                        "updated_at": 1538760682,
                        "value": "",
                        "value_updated_at": 1538760682
                    },
                    {
                        "label": "Password",
                        "order": 3,
                        "sensitive": 1,
                        "type": "password",
                        "uid": 11,
                        "updated_at": 1549061713,
                        "value": "asdf",
                        "value_updated_at": 1538760682
                    },
                    {
                        "label": "Website",
                        "order": 4,
                        "sensitive": 0,
                        "type": "url",
                        "uid": 13,
                        "updated_at": 1538760682,
                        "value": "15Five.com",
                        "value_updated_at": 1538760682
                    },
                    {
                        "label": "ADDITIONAL DETAILS",
                        "order": 5,
                        "sensitive": 0,
                        "type": "section",
                        "uid": 101,
                        "updated_at": 1539186279,
                        "value": "",
                        "value_updated_at": 1546473630
                    },
                    {
                        "label": "Phone number",
                        "order": 6,
                        "sensitive": 0,
                        "type": "phone",
                        "uid": 14,
                        "updated_at": 1538760682,
                        "value": "",
                        "value_updated_at": 1538760682
                    },
                    {
                        "label": "TOTP",
                        "order": 7,
                        "sensitive": 0,
                        "type": "totp",
                        "uid": 102,
                        "updated_at": 1539186279,
                        "value": "",
                        "value_updated_at": 1546473630
                    },
                    {
                        "label": "Security question",
                        "order": 8,
                        "sensitive": 0,
                        "type": "text",
                        "uid": 15,
                        "updated_at": 1538760682,
                        "value": "",
                        "value_updated_at": 1538760682
                    },
                    {
                        "label": "Security answer",
                        "order": 9,
                        "sensitive": 1,
                        "type": "text",
                        "uid": 16,
                        "updated_at": 1538760682,
                        "value": "",
                        "value_updated_at": 1538760682
                    },
                    {
                        "label": "URL",
                        "order": 10,
                        "sensitive": 0,
                        "type": "url",
                        "uid": 6683,
                        "updated_at": 1551826491,
                        "value": "15Five.com",
                        "value_updated_at": 1551826491
                    }
                ],
                "icon": {
                    "fav": "15five.com",
                    "image": {
                        "file": "misc/login"
                    },
                    "type": 1,
                    "uuid": ""
                },
                "note": "",
                "subtitle": "me@me.com",
                "template_type": "login.default",
                "title": "15five",
                "updated_at": 1539186279,
                "uuid": "3c31caca-3d10-4153-81d5-322be141ba12"
            },

And here's one that does not work after import:

            {
                "auto_submit": 1,
                "category": "login",
                "favorite": 0,
                "fields": [
                    {
                        "label": "username",
                        "order": 1,
                        "sensitive": 0,
                        "type": "username",
                        "uid": 7673,
                        "updated_at": 1514416453,
                        "value": "me@me.com",
                        "value_updated_at": 1514416453
                    },
                    {
                        "history": [
                            {
                                "updated_at": 1514416453,
                                "value": "Jx2UL8iD"
                            }
                        ],
                        "label": "password",
                        "order": 2,
                        "sensitive": 1,
                        "type": "password",
                        "uid": 7677,
                        "updated_at": 1549061674,
                        "value": "asdf",
                        "value_updated_at": 1532542425
                    },
                    {
                        "label": "url",
                        "order": 3,
                        "sensitive": 0,
                        "type": "url",
                        "uid": 7680,
                        "updated_at": 1514416453,
                        "value": "http://www.1800petmeds.com/login.jsp?_requestid=362748",
                        "value_updated_at": 1514416453
                    }
                ],
                "icon": {
                    "fav": "1800petmeds.com",
                    "image": {
                        "file": "misc/login"
                    },
                    "type": 1,
                    "uuid": ""
                },
                "note": "",
                "subtitle": "me@me.com",
                "template_type": "import.imported",
                "title": "1800petmeds.com",
                "updated_at": 1558491502,
                "uuid": "d1bf8a7f-928f-4742-acf2-c009bb210363"
            },

Here's why it doesn't make sense to me, because the "username" fields exist in both, "password", "url" etc... I even tried modifying the conversion mapping to account for if it's a hard match on caps:
login => { textname => 'login.default', fields => [
[ 'username', 3, qr/^Username|username$/, ],
[ 'password', 3, qr/^Password|password$/, ],
[ 'url', 3, qr/^url|URL|Website$/, ],
[ '_phone', 0, qr/^Phone( number)?$/, ],
[ '_securityquestion', 3, qr/^Security [Qq]uestion$/, ],
[ 'email', 1, qr/^E-mail|email$/, ],

(Yes, I added 'email' just to see what would happen).

But, even when accounting for that, the 15Five entry works and the 1800petmeds gets dumped in entirely as a note.

I'm using the latest non-Beta of both.


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided

Comments

  • MrC
    MrC
    Volunteer Moderator
    edited May 2019
    Options

    @TechieSooner ,

    I've replied to the email you sent to me. I sent you a customized converter to address this. This is the same issues as I summarized here.

    We can follow-up here or via email; your choice.

  • TechieSooner
    TechieSooner
    Community Member
    edited May 2019
    Options

    Apparently, most of the stuff that was not importing was stuff I brought over from another PW Manager (LastPass) years ago. Enpass stores these in import.imported category and thus, was missed in the logins category.

    So to fix this.... read this part of the ReadMe:

    Records imported into Enpass 6 from another password manager are not converted to its own categories, and are instead placed into a generic category. The converter cannot automatically determine the record type for these records, because the field names and semantics vary based on the original password manager. The result will be that many of your records will convert as Secure Notes. The converter can be customized to handle your data. If you are in this situation, use the --dumpcats option to examine the field names present in the "import.imported" category shown in the output. You can decide which of these fields should be mapped to the username, password, and URL fields for a Login category. There is a commented-out entry in the Enpass.pm converter file's table of category/field names which can be uncommented and tailored to your data. Ask if you need help.

    Here's the bit in the pm file:

    # The entry below can be uncommented and customized to deal with login entries that were
    # imported into Enpass.  Enpass does not try to categorize a user's imported records; instead
    # it places such entries, with their original fields, into the "import.imported" category.
    # Because the field names vary widly, depending upon the original password manager, these
    # cannot be automatically matched.
    #   implogin =>                 { textname => 'import.imported', type_out => 'login', fields => [
    #       [ 'username',           3, qr/^UserName$/, ],
    #       [ 'password',           3, qr/^Password$/, ],
    #       [ 'url',                3, qr/^URL$/, ],
    #   ]},
    

    So, performing those:

    $ perl  convert.pl  enpass -v ./Desktop/en.json --dumpcats
    import.imported (1) -----
          1   __MAIN::password::7677::2
          1   __MAIN::url::7680::3
          1   __MAIN::username::7673::1
    

    (password, url, username are the noted things)

    Then modify pm file:

    login2 =>                   { textname => 'import.imported', type_out => 'login', fields => [
            [ 'username',           3, qr/^username$/, ],
            [ 'password',           3, qr/^password$/, ],
            [ 'url',                3, qr/^url$/, ],
        ]},
    

    I'm now working in 1Password just fine.

  • MrC
    MrC
    Volunteer Moderator
    Options

    Thanks for the follow-up @TechieSooner .

    For others who happen upon this thread trying to convert from Enpass, I'm happy to help customize the converter for you.

    Enjoy 1Password!

  • AGAlumB
    AGAlumB
    1Password Alumni
    Options

    :) :+1:

This discussion has been closed.