New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'Ed25519Key' object has no attribute 'public_blob' #1071

Closed
ushuz opened this Issue Sep 21, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@ushuz

ushuz commented Sep 21, 2017

brew installed Python 2.7.13

paramiko (2.3.0)
bcrypt (3.1.3)
cryptography (2.0.3)
pyasn1 (0.3.6)
PyNaCl (1.1.2)

Downgrade to 2.2.2 fixed the problem.

No handlers could be found for logger "paramiko.transport"
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/fabric/main.py", line 757, in main
    *args, **kwargs
  File "/usr/local/lib/python2.7/site-packages/fabric/tasks.py", line 386, in execute
    multiprocessing
  File "/usr/local/lib/python2.7/site-packages/fabric/tasks.py", line 276, in _execute
    return task.run(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/fabric/tasks.py", line 173, in run
    return self.wrapped(*args, **kwargs)
  File "/Users/ushuz/Code/xiachufang-maint/push/fabfile.py", line 134, in push
    put(list_io, list_fn, use_sudo=True)
  File "/usr/local/lib/python2.7/site-packages/fabric/network.py", line 687, in host_prompting_wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/fabric/operations.py", line 346, in put
    ftp = SFTP(env.host_string)
  File "/usr/local/lib/python2.7/site-packages/fabric/sftp.py", line 33, in __init__
    self.ftp = connections[host_string].open_sftp()
  File "/usr/local/lib/python2.7/site-packages/fabric/network.py", line 159, in __getitem__
    self.connect(key)
  File "/usr/local/lib/python2.7/site-packages/fabric/network.py", line 151, in connect
    user, host, port, cache=self, seek_gateway=seek_gateway)
  File "/usr/local/lib/python2.7/site-packages/fabric/network.py", line 481, in connect
    client.connect(**kwargs)
  File "/usr/local/lib/python2.7/site-packages/paramiko/client.py", line 416, in connect
    look_for_keys, gss_auth, gss_kex, gss_deleg_creds, t.gss_host,
  File "/usr/local/lib/python2.7/site-packages/paramiko/client.py", line 618, in _auth
    self._transport.auth_publickey(username, key))
  File "/usr/local/lib/python2.7/site-packages/paramiko/transport.py", line 1447, in auth_publickey
    return self.auth_handler.wait_for_response(my_event)
  File "/usr/local/lib/python2.7/site-packages/paramiko/auth_handler.py", line 209, in wait_for_response
    raise e
AttributeError: 'Ed25519Key' object has no attribute 'public_blob'
@ushuz

This comment has been minimized.

ushuz commented Sep 21, 2017

It seems that Ed25519Key doesn't initialize public_blob property like ECDSAKey, or other PKey descendants

It was deleted here 59f9a64#diff-87395d54ac5abc2ace279f1e60fe5fd9L66

@bitprophet

This comment has been minimized.

Member

bitprophet commented Sep 22, 2017

Hrm, that means both A) there's a hole in our test suite and B) I probably needed to move that line to the top of __init__ instead of simply deleting it. Will take a peek, thanks!

@bitprophet

This comment has been minimized.

Member

bitprophet commented Sep 22, 2017

Hrm we're testing basic connectivity with Ed25519 user keys. Ah! But since we need certs around to test that functionality, and certs get automatically loaded (as per OpenSSH compatible behavior), our test keys always load the certs & thus have public_blob set. So I'll probably want to move the certs and copies of their keys into a separate location to avoid this.

@bitprophet

This comment has been minimized.

Member

bitprophet commented Sep 22, 2017

Confirmed that once I do that, this error pops up, so now I can test the fix.

bitprophet added a commit that referenced this issue Sep 22, 2017

Move cert tests & copies of related keys into separate folder.
This prevents non-cert-related tests from incidentally loading
the certs, which was masking issues (re #1071)

bitprophet added a commit that referenced this issue Sep 22, 2017

dkhapun pushed a commit to cyberx-labs/paramiko that referenced this issue Jun 7, 2018

Initialize public_blob in Ed25519 key.
Was removed earlier (because the 'initialization'
of first impl was at END of method and thus broke
main impl of cert loading) but neglected to add
back to TOP of __init__, so broken anytime there
is no cert in play.

Fixes paramiko#1071
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment