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

nk3: Improve error message for missing udev rules #600

Open
robin-nitrokey opened this issue Dec 12, 2024 · 2 comments
Open

nk3: Improve error message for missing udev rules #600

robin-nitrokey opened this issue Dec 12, 2024 · 2 comments
Labels
device/Nitrokey 3 enhancement New feature or request

Comments

@robin-nitrokey
Copy link
Member

Trying to use the bootloader without the proper udev rules raises a unhandled SPSDKConnectionError. We should show a proper error message linking to the udev docs instead.

@daringer
Copy link
Collaborator

daringer commented Dec 14, 2024

it might be worth extracting the detection part into the nk-sdk for easy availability inside NitrokeyApp2, I'd see the following detectors ("connectivity tests" ?)

  • detect existence of proper udev rules for nk3, nkpk (actual string in expected file location(s))
  • if device plugged in, actually verify permissions for device (maybe with bootloader test?)
    • udevadm test $(udevadm info -q path -n /dev/hidraw9) lists:
      • read udev rules
      • indicators if rules have been applied
  • detect snap and detect snap rules, see Add Nitrokey identifiers to relevant (Ubuntu) Snaps' udev rules nitrokey-3-firmware#573
  • detect gpg(-agent) exclusivity (?)
  • detect usbguard

@robin-nitrokey
Copy link
Member Author

robin-nitrokey commented Dec 14, 2024

I’m still skeptical if it makes sense to try such a detailed analysis. I think it’s easy to get the details wrong and show false positives. From my experience, in 99 % of the cases, the udev rules are just missing. Or do you have a different experience in support?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
device/Nitrokey 3 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants