janlelis / pws

Command-Line Password Safe 🔐︎
MIT License
208 stars 19 forks source link

Feature: print password, and authenticated session #15

Open AlexRiedler opened 10 years ago

AlexRiedler commented 10 years ago

It would be awesome if we could have an authenticated session; and print password.

My use case is the following: my .bashrc file grabs various ENV variables eg. AWS_SECRET_PASSWORD from a tool (such as pws). something like:

AWS_SECRET_KEY=$(pws get aws_secret_key)

but I also would not want to do if there is plenty of keys

AWS_SECRET_KEY=$(pws get --print aws_secret_key)
FOO_SECRET=$(pws get --print foo_secret)

so having something like:

pws login # prompts for the password (maybe with an auto-log out)

AWS_SECRET_KEY=$(pws get --print aws_secret_key)
FOO_SECRET=$(pws get --print foo_secret)

pws logout

I know this is a lot to ask for, but just throwing up this idea.

louis-clotman commented 7 years ago

(print password)++

I want to use pws on a remote server that servers as my primary dev machine. So I have no access to a "clipboard".

alex0112 commented 6 years ago

@janlelis Would you be open to merging a PR that implemented this behavior?

janlelis commented 5 years ago

@AlexRiedler @lsc21 @alex0112 The "print password" feature has been implemented and is part of the 1.0.8 release. Its usage is:

$ pws print-screen <key>

Regarding the authenticated session: I really like the idea and how it works out in this use-case. On the other hand it could take away some of the simplicity of this library and may weaken its security. I'll think about it and I am open for ideas, especially regarding where to store the session/master password. Maybe in the system's keychain...