maxgoedjen / secretive

Store SSH keys in the Secure Enclave
MIT License
6.99k stars 155 forks source link

Issue with unlocking for a period time stops working #384

Closed duchscherd closed 2 years ago

duchscherd commented 2 years ago

I was testing out the unlock feature for a period of time and it stopped working. After poking around a bunch, I found what was causing the issue, at least, for me.

Everything worked the first ssh session. Logged into the system and then use the pull down to set the time to keep things unlocked. Responded to the authentication prompt for that and everything was good until it wasn't.

Testing a bunch of stuff, I found when I was clearing the notification, if I was not careful and missed the close button and ended up hitting the notification window, the key was re-locked and you could no longer use the unlock for a period of time for that key. If you selected unlock for a period of time, the notification would go away but you would not be prompted to approve it, and you would continue to be prompt to approve each ssh session. Killing the agents would get things working again.

This looks to have selected 'Do Not Unlock" and re-locks that key. Don't know if it is possible but it would be nice to add an the option to the list when unlocked for a period of time to have a leave unlocked as the default for the remaining time.

It does look like there is a bug that breaks this feature if "Do Not Unlock" is selected after you have unlocked the key for a period time.

maxgoedjen commented 2 years ago

@duchscherd great find! Turns out it's not actually re-locking it, but crashing the agent 👀

image

Basically I had thought that if I didn't attach a category to that, it wouldn't do anything. Easy enough fix though.