by PureParadigm · 5y ago · 0 comments
- I host my git repo on my desktop computer (through SSH), so it's not exposed anywhere except if you have SSH access to my computer. (A lot of people seem to think git = GitHub which is not true). So if your git repo is not exposed to the public, you don't leak any of the site names/usernames you use.
- The passwords are GPG encrypted so even if it were leaked that would be okay as long as my secret key remains secure.
As far as usability goes, I usually use the -c option to copy/paste my passwords. I used a browser extension for awhile, but I haven't gotten around to reinstalling since the copy/paste works fine for me. Syncing with my phone and Linux devices works perfectly (since it's just git).
The Windows client seems to be no longer maintained [1], so I would like better support here for my Surface. But this is still okay since I can SSH to my desktop computer from Windows and copy/paste the passwords from there.
I still had an earlier gpg key, and had not reset all my passwords when I switched keys. I'd just re-encrypted them. This let me check out an old commit and decrypt all the passwords in it. A dumb mistake, but it showed me I'm not smart enough to use something that doesn't hold my hand more.
[1] https://play.google.com/store/apps/details?id=dev.msfjarvis....
That is: there are GUI mobile and desktop client apps, compatible with the pass storage schemes.
In this case, the parent refers to one such app that can connect to e.g. your GitHub repo with your passes, and read/manage the passwords from there.
The command has a nice auto completion and search feature. And calling it without arguing give you a list of all the name of the key you have in a tree view.
I really enjoy using that little utility since I would say 4 or 5 years.
Termux[0] does supports gpg and pass but no yubikey by default, but okc-agent[1] is a third party binding of OpenKeyChain, providing barebones gpg via yubikey. I use this to decrypt passwords via NFC:
[0]: https://termux.org [1]: https://github.com/DDoSolitary/OkcAgent
Simple password decrypt: okc-gpg -d ~/.password-store/mypass.gpg
I made a termux shortcut (button on homescreen) to emulate pass-dmenu via this ( store in ~/.shortcuts):
#!/data/data/com.termux/files/usr/bin/env bash
# Lists passwords in termux dialog, decrypting selection to clipboard for 45s
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
# Inspired by https://git.zx2c4.com/password-store/tree/contrib/dmenu/passmenu
shopt -s nullglob globstar
prefix=${PASSWORD_STORE_DIR-~/.password-store}
password_files=( "$prefix"/**/*.gpg )
password_files=( "${password_files[@]#"$prefix"/}" )
password_files=( "${password_files[@]%.gpg}" )
password_files_csv=$(printf '%s,' "${password_files[@]}")
choice_json=$(termux-dialog sheet -t "Select password" -v "$password_files_csv")
choice_exit=$(echo "$choice_json" | jq .code)
[[ "$choice_exit" == 0 ]] || exit
password=$(echo "$choice_json" | jq .text | tr -d '"')
okc-gpg -d ~/.password-store/"$password".gpg 2>/dev/null | head -n 1 | termux-clipboard-set
# pass show -c "$password" 2>/dev/null
termux-toast -s "Password copied to clipboard"
sleep 46
termux-clipboard-set ""
termux-toast -s "Password remove from clipboard"Iirc, ssh can now do file encryption with FIDO2 keys; these are $10 or so.
Definitely worth buying a pair if you are worried about security (both Trojans, where local encryption at rest can be defeated, and losing your device where it is not)
One danger of doing just copy and paste is that you are more exposed to phishing attacks. The browser extension for the password managers check that the site that they are filling in is indeed the site that they stored the password for.
You can use auto type. But you need to make each entry identifiable and sometimes it doesn’t work because page and login titles change.
In X11 it's also possible to get passwords typed automatically with xdotool, which I call through an xmonad package. The only thing I'm missing is more powerful autocompletion.
... but as far as I can see, passmenu just copies to clipboard and doesn't use xdotool?