Open robinkrahl opened 3 years ago
Hi @robinkrahl, your suggestions sound fine to me. It seems as if we should make pws update --password
also work with stdin then, though, should we? I wouldn't say that we need to make input of slot
, name
, and login
interactive.
It seems as if we should make
pws update --password
also work with stdin then, though, should we?
True, good point!
Is there some fundamental difference in OTP handling that we don't provide a similar interface there?
No, that would be my next step. I started with the PWS because the commands are more complex and data loss might hurt more.
It seems as if this issue can be closed, correct? From what I can tell https://github.com/d-e-s-o/nitrocli/pull/163 was the last outstanding issue. Or is there something else missing, Robin?
I also intended to add a password prompt. Just reading from stdin is fine for piping, but if the user wants to manually type the password, it’s a bit awkward.
Last week, I've used the PWS functionality for the first time with real data. I had some issues with our current PWS commands:
pws status
), keep track of the first unprogrammed slot and then callpws set
.pws set
command instead of just listing the information to update.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
andlogin
arguments optional and prompt them from the user if not set.@d-e-s-o What do you think?
Tracking:
pws add
subcommand (#151)pws update
subcommand (#150)--slot
option topws add
(#158)pws set
command (#162)