d-e-s-o / nitrocli

A command line tool for interacting with Nitrokey devices.
30 stars 10 forks source link

Improve pws subcommand #139

Open robinkrahl opened 3 years ago

robinkrahl commented 3 years ago

Last week, I've used the PWS functionality for the first time with real data. I had some issues with our current PWS commands:

So I suggest to replace the current pws set command with:

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:

d-e-s-o commented 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.

robinkrahl commented 3 years ago

It seems as if we should make pws update --password also work with stdin then, though, should we?

True, good point!

d-e-s-o commented 3 years ago

Is there some fundamental difference in OTP handling that we don't provide a similar interface there?

robinkrahl commented 3 years ago

No, that would be my next step. I started with the PWS because the commands are more complex and data loss might hurt more.

d-e-s-o commented 3 years ago

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?

robinkrahl commented 3 years ago

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.