shimunn / fido2luks

Decrypt your LUKS partition using a FIDO2 compatible authenticator
Mozilla Public License 2.0
132 stars 19 forks source link

When adding a new key, make it more obvious what the user is entering #28

Closed madonius closed 3 years ago

madonius commented 3 years ago
When adding a new key the user could receive better guidance from the cli What the user sees How this is likely to be interpreted
> fido2luks -i add-key /dev/sda2 <id>
Password: which password?
Password (again): repeat
\<interaction with the key is expected> what am I supposed to do here?
Old password: Is the old password goind to be replaced || The one before was the new password?
Old password (again): repeat

I think this could lead to frustration on the user's side. Thus I would recommend on the one hand changing the prompts to the passwd phrasing

> $ passwd
Current password:
New password:
Retype new password:

on the other I would propose notifying the user that an action is needed on the security key side.

shimunn commented 3 years ago

Thanks for raising that issue, usability is important! I've made some changes #29

fido2luks -i add-key /dev/nvme0n1p1
Current password:
Password to be added:
Password to be added (again):

fido2luks -i replace-key /dev/nvme0n1p1
Current password:
Replacement password:
Replacement password (again):

I prefer to use (again) over Retype... since that avoids having to capitalize the promt which in rust requires more code than it's worth imo.

madonius commented 3 years ago

Thank you ♥