-
Notifications
You must be signed in to change notification settings - Fork 26
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
pivy-agent: add mode not to keep the PIN in memory #24
Comments
The This would probably require adding a mode where we open the card in exclusive mode or maintain an indefinite transaction while the PIN is "loaded". (FYI: the current UX requires the PIN to be provided again if the device is removed, as it is -- as soon as the |
I support adding this mode. It would be logical, and much more secure, to keep excl. mode and remove PIN from memory. Also I did a few test, with token being removed, and pivy-agent does NOT always detect it, and keeps indefintely PIN in the memory. This was a hit/miss. Over 5 tries, only one requstelt in PIN being required. In others (each around 1..2 minutes long) entering again PIN was not required. |
@rdslw Any chance I could get you to send through the debug level log output (obtained by running I don't have any desire to test or maintain support for opening the card in exclusive mode and re-entering the PIN every use right now, and it would require adding substantial complexity to the code to handle both modes of operation (there's a lot of logic which assumes the current transactional workflow associated with shared mode). I think it's best if you need that to look elsewhere -- that way you're getting simpler code which does only that workflow and isn't full of conditional logic (and pivy can have less conditional logic too). |
I did extensive tests, and I'm NOT able to reproduce it with disconnects LONGER than 60 seconds. Probably was ommision on my side. Sorry for that. Just to be sure, 30s works reliably without needing to provide PIN. One question though in regard of not keeping PIN in the memory: what is proper way to erase it completly (overwrite etc) from memory on request WITHOUT having to remove token for longer >60secs. Is 'ssh-add -D' sufficient? Does it overwrite PIN in memory, or uses other measures? |
@rdslw Yes, |
PIV tokens can be configured to only require the PIN once in a session. Assuming pivy-agent keeps the PIV session open, it doesn't need to keep the PIN in memory in that case. It would be nice to have a mode for pivy-agent not to keep the PIN.
The main difference in UX is that plugging the token out and back in would require providing the PIN again.
The text was updated successfully, but these errors were encountered: