TritonDataCenter / python-manta

Python SDK for Manta (community maintained)
MIT License
25 stars 18 forks source link

Comparison of MANTA_KEY_ID fingerprint to agent fingerprint is broken for MD5 #51

Closed rjloura closed 5 years ago

rjloura commented 5 years ago

in manta/auth.py we calculate all the fingerprints for all keys in ~/.ssh/ and compare them with the fingerprint assigned to MANTA_KEY_ID. Unfortunately, the SHA256 fingerprint method prepends the SHA algorithm specifier, but we don't for MD5, see below:

(pymanta) rui@hayek:~/git/python-manta$ ./bin/mantash -v ls /rui.loura/stor/
manta.client: DEBUG: ListDirectory '/rui.loura/stor'

sha256  SHA256:EPtz0N+kwSVps8rGjxunfTGoJSGcflZX9hkCmYDrEhI  
md5  5f:fb:db:f3:fd:43:ad:4e:ee:b6:24:75:74:a3:ae:8b  
fingerprint:  MD5:ce:d8:0e:dd:11:a2:7d:1b:08:1e:1a:5a:6d:1b:26:b3

sha256  SHA256:BAPjVkUlbGAZXbycEexupe/Ozerzc2JBkBVASc3+eWY  
md5  ce:d8:0e:dd:11:a2:7d:1b:08:1e:1a:5a:6d:1b:26:b3  
fingerprint:  MD5:ce:d8:0e:dd:11:a2:7d:1b:08:1e:1a:5a:6d:1b:26:b3

mantash: ERROR: could not find key info for signing: no ssh-agent key with fingerprint "MD5:ce:d8:0e:dd:11:a2:7d:1b:08:1e:1a:5a:6d:1b:26:b3"; no '~/.ssh/*.pub' key found with fingerprint 'MD5:ce:d8:0e:dd:11:a2:7d:1b:08:1e:1a:5a:6d:1b:26:b3'