question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't import JSON data - Incorrect AES key length (86 bytes)

See original GitHub issue

Hi! Trying to use the Import feature to create new shared folders in Keeper Cloud, but it keeps returning the following error: Incorrect AES key length (86 bytes)

I initially thought it was my code, so I did a JSON dump of an existing folder/record set, deleted those records, and then tried to import the dumped JSON as-is, and I got the same error.

Steps followed:

keeper shell
[login using non-SSO Keeper Administrator]
export --format json keeper_export.json
import --format json keeper_export.json
Incorrect AES key length (86 bytes)

This happens whether I do the import command as a one line (i.e: keeper --user someuser --password somepassword import --format json somefilepath.json) or whether I log into keeper shell and trigger the import from there.

This is the Python code I’m using for reference:

#!/usr/bin/python3
import os
import subprocess
import json
folders = ['SomeFolderName', 'SomeOtherName', 'Potato', 'Potahto']
filepath = "keeper_new_folder.json"
for folder in folders:
    try:
        os.remove(filepath)
    except:
        print("File not exist, cannot delete")
    data = {}
    data['shared_folders'] = []
    data['shared_folders'].append({
        'path': folder,
        'manage_users': 'true',
        'manage_records': 'true',
        'can_edit': 'true',
        'can_share': 'true',
        'permissions': [
            {
                'name': 'SG.SLTECH.DEVOPS',
                'uid': 'Ce6tm32Po81z3Y2zK5Wd3A',
                'manage_users': 'true',
                'manage_records': 'true'
            }
        ]
    }) 
    with open (filepath, 'w') as outfile:
        json.dump(data, outfile)
    subprocess.call(["keeper", "--user", "some-non-SSO-user", "--password", "somepassword", "import", "--format", "json", filepath])

Environment information:

  • Python v3.6.8 (Ubuntu) & 3.7.3 (Windows)
  • OS: Ubuntu 18.04.x LTS running on Windows 10 WSL v1 & Powershell 5.1.17134 running on Windows 10 18.03
  • Keeper commander v4.12

Thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
craiglureycommented, Sep 11, 2019

This is fixed. Will push to PIP now as well.

0reactions
sk-keepercommented, Sep 11, 2019

Yes, sure. Just do not add permissions node.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix Invalid AES key length? - java - Stack Overflow
The problem is number 1: you are passing the password instead of the key. AES only supports key sizes of 16, 24 or...
Read more >
Incorrect AES key length (48 bytes) · Issue #2253 - GitHub
Hello all, I have the following problem when i am trying to download an encrypted m3u8 link(AES 128) : [cli][info] Found matching plugin...
Read more >
AES encrypted secret key in JAVA decrypt in Swift
For this first trying to implement a demo where I am trying to decrypt the RSA private key , secret key and encrypted...
Read more >
PyCryptodome Documentation - Read the Docs
A block cipher uses a symmetric key to encrypt data of fixed and very short length (the block size), such as 16 bytes...
Read more >
invalid start byte decrypting pool into clean install (solved)
Glad you're back in business! Make sure to safeguard and make multiple copies of this .json keyfile and/or copy the 64-character HEX string ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found