pallotron / yubiswitch

OSX status bar application to enable/disable Yubikey Nano

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support a status command

mikelikesbikes opened this issue · comments

I've integrated YubiSwitch awareness into some tooling that asks users to press their YubiKey, to make it a more seamless UI for people who are using YubiSwitch.

We've recently run into a bit of an issue, specifically with what to do when a user has YubiSwitch has the "Automatically switch off YubiKey" feature disabled. Currently my integration does something like this:

# shell out to YubiSwitch to enable key, if YubiSwitch exists
# prompt for YubiKey press
# shell out to YubiSwitch to disable key, if YubiSwitch exists

I'd like to be able to preserve the "before" state of the YubiKey if possible. I think I would just need some way for YubiSwitch to expose the status of the YubiKey in order to do this. Something like:

# shell out to YubiSwitch to get the status of the key
# shell out to YubiSwitch to enable key, if YubiSwitch exists
# prompt for YubiKey press
# shell out to YubiSwitch to disable key, if YubiSwitch exists and the status was previously disabled

My workaround has been to skip disabling the key and allow YubiSwitch to automatically disable it after the delay interval. But this obviously leaves the key enabled for some time after, depending on the user's YubiSwitch settings.

Is this something you think would be possible to add? (I'm not familiar with ObjectiveC, but happy to contribute any way I can)