Comments (10)
I think the first version should be minimal and include neither the scdaemon hack nor the clipboard access. (We already have the scdaemon problem with the otp
subcommand. I don’t think we should treat the otpcache
extension differently.)
I’ll personally use the extension with a wrapper script that opens dmenu, like passmenu. This wrapper script will probably contain the scdaemon hack and the clipboard handling. We could add this script to the repository too.
Anyway, I’ll continue to work on the draft and open a PR once it’s ready.
from nitrocli.
#146 has been merged (thank you!) so we can close this issue, right?
from nitrocli.
I do see why remembering slot numbers would be cumbersome. But truth be told, I haven't used the otp
functionality much, so I can't really judge how bad it is to work with what we have.
That being said, I am not a fan of overlaying arguments with functionality as you are proposing. There rarely ever comes anything good out of that and it is pretty much always a source of bugs/unexpected behavior.
So my tendency would be to get rid of the means for addressing slots by number altogether (although off hand I can't say whether that is possible; there may be some bit that I am missing) and only work with names (well, perhaps add a way to disambiguate in case a name is ambiguous).
@robinkrahl do you have an opinion on this request by any chance?
from nitrocli.
We can only query the name for one slot at a time. So if we would remove access by number, we would have to execute n + 1 commands instead of only one command to retrieve an OTP code (where n is the number of used OTP slots). Therefore I don’t want to change the behaviour of the otp
command.
As discussed in #50, I’d prefer an extension, let’s call it otpcache
, that caches the names of the OTP slots and also provides an option to get an OTP code by slot name. So the first invocation of the otpcache
subcommand would initialize the cache (per device). It could be updated with nitrocli otpcache update
, and queried using nitrocli otpcache status
or nitrocli otpcache get <name>
.
from nitrocli.
Ah, thanks for refreshing my memory here, Robin. :-)
I agree with your inclination of making this an extension. Yet another reason to finally prioritize this work...
from nitrocli.
As the v0.4.0 release includes support for extensions (thanks!), we should be able to implement this feature. There is a prototype on the topic/otp-cache
branch. Do you plan to continue working on this branch? Should I have a look at it?
from nitrocli.
Feel free to give it a go, Robin. It was your original proposal. It's working great for me, but it requires the killing of scdaemon
to prevent smartcard lock ups as I am sure you recall. I am not sure we want to keep that, but at the same time without that or a different workaround the functionality basically has negative value for me (and I suspect for others).
Clipboard management is another issue: not sure how many ways there are to set the clipboard on Linux alone. But I suppose that does not have to be included in a first version.
from nitrocli.
I realized that we have the same problem with PWS, so I’d suggest to have a cache
extension with otp
and pws
subcommands instead.
from nitrocli.
Sounds good!
from nitrocli.
Yep.
from nitrocli.
Related Issues (20)
- Compare strings instead of byte slices in tests HOT 2
- Access PWS slots by name HOT 8
- Improve otp subcommand HOT 1
- Validate PWS and OTP string length HOT 5
- Document scdaemon reset workaround in readme
- Publishing nitrocli-ext HOT 5
- Publishing the core extensions HOT 10
- Improve installation instructions HOT 6
- Split up commands module HOT 1
- Show retry count (< 3) in pinentry HOT 1
- "Wrong password, please reenter" after device reconnection HOT 22
- "Unexpected response: OK" if empty password is entred via pinentry HOT 1
- Add log messages to nitrocli HOT 12
- Add option to otp-cache to create custom aliases HOT 4
- pinentry-tty does not work HOT 13
- Change tests to not create python scripts during builds HOT 2
- Migrate to clap 3.0.0 HOT 2
- Move CI checks to Makefile HOT 4
- nitrocli (for NK2 Pro) not responsive while NK3 plugged in HOT 4
- Document extensions in readme HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nitrocli.