-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating touch-policy to "cached"&pin-policy to "once": no effect on existing slots #107
Comments
There is no way in this plugin to alter the PIN or touch policies of an existing YubiKey slot. I don't recall if that is because it is simply not possible for YubiKeys, or only because the If you select an existing slot via the text UI, the existing identity in that slot gets its identity file recreated (equivalent to |
You certainly can't change the policy to a laxer one, otherwise an attacker would just do that, and bypass the point of e.g. always having to touch the key to do an operation. |
OK, I think then I'll add a laxer yubikey slot. I was surprised by this because |
So, update: I generated a new age key in a second slot, with I'm only running |
You're reading the "Agent" section for current |
Ooooooops 😓 I did try with latest main just now, and same result: It prompts for the PIN again, despite the slot being configured as follows:
The touch cache works, just as it did on 0.3.2. |
We've found and fixed several bugs in the initial implementation of the PIN cache, and at least one more needs to be fixed by making changes to the |
Ahhh, I just read through d9c5aba#diff-f8cca32b0c315d712da3375dab4d6c52abd816618850f4c0ce5578d35efe7deaR79 and now I get why it keeps asking me the PIN every time: I am using a yubikey4c nano. Does the 5 series fare better / do the PINs get cached there? |
Ah yep, the YubiKey 4 problem is a recent discovery.
As far as I can tell, yes. We had some initial bugs as I mentioned above, but it seems to be working pretty well now (I haven't been receiving bug reports for YubiKey 5s recently, and IIRC those who reported previous bugs have said they are now fixed). |
Environment
What were you trying to do
I used
age-plugin-yubikey --pin-policy once --touch-policy cached
to reduce the number of times I have to provide my PIN and touch the key (especially for rekeying secrets with https://github.com/ryantm/agenix).What happened
and then,
Note that each PIN prompt also requires a touch of the yubikey. I'm not sure what's going on here, but my hypothesis is that existing slots' settings can't be changed? Is that right?
The text was updated successfully, but these errors were encountered: