replace plaintext password prompt with obfuscation and show censored password during confirmation#19
Conversation
…password during confirmation
|
Seems generally good to me. My one thought is, should we have the prompt asking if the pass is correct if we're gonna obfuscate it? |
|
I think I am gonna try to spin up a pr using something like gopass for increased security. Def agree password being stored in dotfiles in plaintext is not ideal. Not sure how this will interact with cron scripts to auto start, but maybe I make it optional. |
Without getting into the trap of "showing the password to make sure the password we obfuscated is correct", I figured that the re-enter prompt will ensure that the user has a high chance of using their intended password, since you have to enter it correctly twice. The flow I was trying to imitate most closely was comparable to signing up for a new account on say Github or Google. In the worst case, it sounds like the user can recover their password either through the plaintext file or using gopass as you suggested. |
This is better security practice and will prevent footguns from users reporting issues with the setup script by copying and pasting the entire output. Since the point of the plaintext was to be able to verify visually that the passwords match, let's also lean towards standard practices here by making the user simply confirm their password. The final output is also censored to adhere to the same principle, while still being relatively certain that the user entered their intended password.
Yes, the password is still ultimately stored as plaintext for the purposes of the making the command "one-shot" the startup, but that can be resolved separately, if needed.
Test