Skip to content
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

Use gpgme for gpg detector, misc style fixes #51

Merged
merged 1 commit into from
Jan 14, 2024

Conversation

mochaaP
Copy link
Contributor

@mochaaP mochaaP commented Jan 13, 2024

use gpgme for gpg detector
move ssh socket to ~ suffix

@mochaaP
Copy link
Contributor Author

mochaaP commented Jan 13, 2024

the hmac watcher could be migrated to use ykpers, but i don't have a setup to test for that

Copy link
Owner

@maximbaz maximbaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! It's a very interesting idea to use gpgme, it certainly makes it somewhat less hacky 😁

I only have a single comment, a proposal to fix the app occasionally hang.

detector/ssh.go Outdated Show resolved Hide resolved
detector/gpg.go Outdated Show resolved Hide resolved
detector/hmac.go Show resolved Hide resolved
@maximbaz
Copy link
Owner

the hmac watcher could be migrated to use ykpers, but i don't have a setup to test for that

Admittedly I don't use it myself either, but I believe it's as easy to set it up as to follow this:

$ ykman config usb -e OTP # enable OTP if you have it disabled
$ ykman otp chalresp --touch --generate 2 # generate a new random key in slot 2
$ ykman otp calculate 2 # when asked, give it any value (e.g. 00), then this will require touch

Interestingly, the current code does not detect the need to touch yubikey (for me). I don't know if it regressed (nobody opened an issue!), a quirk of my personal computer, or an issue in the setup above. But if you want to try it out, give it a go 😁

use gpgme for gpg detector
move ssh socket to ~ suffix
@mochaaP
Copy link
Contributor Author

mochaaP commented Jan 14, 2024

revised with the suggestions.

@mochaaP
Copy link
Contributor Author

mochaaP commented Jan 14, 2024

ssh watcher could potentially use the sock_diag subsystem of netlink, but i couldn't find a good enough wrapper for that in golang.
I guess the current method is the way forward, keep it as is

@maximbaz maximbaz changed the title chore: misc style fixes Use gpgme for gpg detector, misc style fixes Jan 14, 2024
@maximbaz maximbaz merged commit 6e37cbe into maximbaz:main Jan 14, 2024
@maximbaz
Copy link
Owner

maximbaz commented Jan 14, 2024

FYI I doubled the timings, because I experienced sporadic false positives when executing gpg sign operations, which do not require a touch, but just because they are slow, they triggered yubikey-touch-detector's notification.

We might have to increase them even more, if people report that on their computers they still get false positives...

I also cut 1.11.0 release, so you can just take the latest tag for packaging 😉

go.mod Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants