Keeper-Security / Commander

Keeper Commander is a python-based CLI and SDK interface to the Keeper Security platform. Provides administrative controls, reporting, import/export and vault management.
https://www.keepersecurity.com/commander.html
MIT License
189 stars 74 forks source link

Support for OpenSSH ecdsa-sk & ed25519-sk #1280

Open Utesgui opened 3 months ago

Utesgui commented 3 months ago

I would love to use my ed25519-sk-keys with the keeper ssh command.

Support was added to cryptography in March: https://github.com/pyca/cryptography/issues/10604

Screenshot with 16.11.8: image

This screenshot was from 16.11.0 image

sk-keeper commented 3 months ago

The mentioned cryptography thread is about public not private key. The latest cryptography package 43.0.0 cannot load Yubikey's private key.

>>> serialization.load_ssh_private_key(private_key.encode(), password=b'...')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/skolupaev/Work/PY/sdk/lib/python3.11/site-packages/cryptography/hazmat/primitives/serialization/ssh.py", line 696, in load_ssh_private_key
    pubfields, pubdata = kformat.get_public(pubdata)
                         ^^^^^^^^^^^^^^^^^^
AttributeError: '_SSHFormatSKEd25519' object has no attribute 'get_public'. Did you mean: 'load_public'?