-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Last week, I've used the PWS functionality for the first time with real data. I had some issues with our current PWS commands:
- The user has to provide the password as a CLI argument. This might lead to leaks via the history file, logs or the process list.
- There are three typical use cases:
- Adding a new site. Currently, I have to check which slots are currently programmed (
pws status), keep track of the first unprogrammed slot and then callpws set. - Updating existing information. Currently, this requires me to re-enter all information for the
pws setcommand instead of just listing the information to update. - Deleting a site. This works fine.
- Adding a new site. Currently, I have to check which slots are currently programmed (
So I suggest to replace the current pws set command with:
pws set [--overwrite] <slot> <name> <login> [<password>|-]. If the password is set to-, it is read from stdin. If it is not set, it is prompted from the user. Unless--overwrite(or--force?) is set, this makes sure that the slot is currently unprogrammed to avoid accidental data loss.pws add <name> <login> [<password>|-]. The same aspws set, but it queries the first unprogrammed slot and writes the data to this slot.pws update <slot> [--name <name>] [--login <login>] [--password <password>]. Overwrites the given data on the given slot without changing the other fields.
If we want to be even more interactive, we could also make the slot, name and login arguments optional and prompt them from the user if not set.
@d-e-s-o What do you think?
Tracking:
- Add
pws addsubcommand (Add pws add subcommand #151) - Add
pws updatesubcommand (Add pws update subcommand #150) - Add
--slotoption topws add(Add --slot option to pws add #158) - Support reading the password from stdin and prompting it (Support reading PWS passwords from stdin #163)
- Remove
pws setcommand (Remove pws set #162)
Metadata
Metadata
Assignees
Labels
No labels