enaml-ops / omg-cli

it's kind of like an (o)ps (m)anager in (g)olang
Apache License 2.0
15 stars 11 forks source link

Password generation agorithm changed to mimic mkpasswd behaviour #48

Closed s-matyukevich closed 7 years ago

s-matyukevich commented 7 years ago

Passwords generated by old algorithm don't work with latest stemcell version.

zmb3 commented 7 years ago

I intentionally removed this library as it adds a salt to the hash which invalidates it.

They also relocated to a new repo and deleted all commit history, which is not good practice for maintaining a Go package and not the type of library I'd recommend depending on.

zmb3 commented 7 years ago

Though I now see that the algorithm is more than just a simple SHA512 checksum. Can we confirm that users can log in when using approach?

s-matyukevich commented 7 years ago

@zmb3 I only test that his algorithm generates exactly the same hash as mkpasswd command, if using the same salt. Though I am pretty sure that this hash will work. Will be able to make full test tomorrow.

s-matyukevich commented 7 years ago

@zmb3 I've tested and can confirm that with this fix ssh works.

zmb3 commented 7 years ago

Awesome @s-matyukevich

The only thing I'm wondering about is the change to the glide files that adds both github.com/kless/osutil and github.com/tredoe/osutil. It seems kless/osutil redirects to tredoe/osutil, so can we get rid of the kless one?