age-plugin-yubikey icon indicating copy to clipboard operation
age-plugin-yubikey copied to clipboard

UX: Possibility to prompt when touch is required?

Open VlkrS opened this issue 1 year ago • 8 comments

What were you trying to do

I'm happily using age-plugin-yubikey, but I find that there are occasions when the lack of a prompt when touch is required is confusing, because it appears that the program just "hangs". Is it possible to add an optional prompt saying "Please touch your yubikey" or somesuch?

VlkrS avatar Aug 29 '23 22:08 VlkrS

It gets printed to the console. I'm assuming you'd want a UI notification in the same fashion as yubikey-agent?

supermarin avatar Nov 15 '23 22:11 supermarin

age-plugin-yubikey used to always send a message to touch the YubiKey, but in testing it became quickly apparent that if you had "always require touch" configured for an identity, and needed to decrypt a bunch of files in a row, the notification was incredibly noisy. We now only send that message if we've been waiting for at least 10 seconds.

If you're not seeing any message at all, even after waiting, that suggests a different problem. Can you confirm whether or not you're seeing the delayed message?

str4d avatar Nov 16 '23 08:11 str4d

I went back and checked the details of this change, and I'd forgotten that the way we did it was that the message was removed completely from age-plugin-yubikey, and moved into clients (which have the necessary context to implement the more forgiving approach): https://github.com/str4d/age-plugin-yubikey/pull/64

So the issue here is probably that the age client you are using does not implement the "waiting on X plugin" notification.

str4d avatar Nov 16 '23 08:11 str4d

the age client you are using does not implement the "waiting on X plugin" notification

I'm pretty new to the age ecosystem and am using the original age. All it does is print a message to the console, which isn't great when it's used in scripts. Ideally, I'd like a GUI popup for PIN prompts and a notification for touch prompts. Is there a way to do that with age or would I need to use a different client, like your rage?

Amolith avatar Dec 05 '23 23:12 Amolith

I have the same problem (also pretty new to the age ecosystem), the console-only UX is really confusing when using a console email client (like aerc).

eterps avatar Dec 06 '23 10:12 eterps

Ideally, I'd like a GUI popup for PIN prompts and a notification for touch prompts. Is there a way to do that with age or would I need to use a different client, like your rage?

You would need to use a client that implements that feature. My rage client does: it uses pinentry binary if available to do a GUI popup, falling back to CLI.

str4d avatar Jan 22 '24 20:01 str4d

Thank you @str4d , the way rage uses pinentry works great.

Ideally, I'd like a GUI popup for PIN prompts and a notification for touch prompts.

I am also wondering about getting a notification for touch prompts. Is that possible somehow?

eterps avatar Jan 23 '24 21:01 eterps

Thank you @str4d , the way rage uses pinentry works great.

Ideally, I'd like a GUI popup for PIN prompts and a notification for touch prompts.

I am also wondering about getting a notification for touch prompts. Is that possible somehow?

To answer my own question, it seems like this might do it: https://github.com/maximbaz/yubikey-touch-detector

eterps avatar Jan 25 '24 11:01 eterps