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

No confirmation request on Linux #16

Open
palemium opened this issue Nov 26, 2022 · 3 comments
Open

No confirmation request on Linux #16

palemium opened this issue Nov 26, 2022 · 3 comments

Comments

@palemium
Copy link

I am trying to run demo on Debian 11 but don't see any signs of success. I am expecting a confirmation prompt in terminal after I tap "Next" button on the test page. Is there a way to get error logs to understand what is wrong?

bullseye:0 2022-11-26 20-06-49

@cmdli
Copy link
Contributor

cmdli commented Dec 3, 2022

From the screenshots, it looks like maybe it's not finding the device? You can enable verbose logging in the code by going to the newLogger(prefix, enabled) lines in the code and enabling them, which would help determine if it is receiving any data from the website.

The verbose logging should just be a command line flag, I'll take a look at that as well.

@jan-krieg
Copy link

I've had the same problem on Linux (Gentoo) and noticed that I had to add a udev rule for the virtual USB device, as by default it's only accessible by root:

user@gentoo-laptop ~ $ ls -l /dev/hidraw0 
crw------- 1 root root 245, 0 16. Mai 03:21 /dev/hidraw0

To make the device accessible to normal users, create a udev rule by e.g. running the following command as root (based on Yubico's reference here):

echo 'KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ACTION=="add|change", ATTRS{idVendor}=="0000", ATTRS{idProduct}=="0000", TAG+="uaccess", GROUP="plugdev", MODE="0660"' > /etc/udev/rules.d/12-fido2-custom.rules

Afterwards, run sudo go run ./cmd/demo start again and check whether the udev rule has taken effect (it works immediately on my side, but if not you could also try udevadm control --reload-rules or even rebooting). The permissions should then look as follows:

user@gentoo-laptop ~ $ ls -l /dev/hidraw0 
crw-rw---- 1 root plugdev 245, 0 16. Mai 03:21 /dev/hidraw0

Finally, make sure your user account is in the plugdev group (if not, add it and completely log out & in again). With this, the virtual USB device should be recognized when trying out e.g. the Yubico test page for WebAuthn.

@killerkalamari
Copy link

udev didn't work for me, but this did:

sudo chgrp plugdev /dev/hidraw0
sudo chmod 0660 /dev/hidraw0

I also needed to install the usbip package.

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

No branches or pull requests

4 participants