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

Issue with Using Yubikey 4 on Firefox #3261

Open
MarcusPro7 opened this issue Feb 10, 2025 · 5 comments
Open

Issue with Using Yubikey 4 on Firefox #3261

MarcusPro7 opened this issue Feb 10, 2025 · 5 comments
Labels

Comments

@MarcusPro7
Copy link

Hi everyone,

I'm trying to use the Yubikey 4 on Firefox to authenticate on Gmail. Unfortunately, even though it is recognized, it does not light up, and according to the guides from both CL and Yubico, I can't authenticate. What tests can I do to find a solution?

Installed version: 42950
6.13.1-1540.native

$ firefox -v
Mozilla Firefox 135.0

~ $udevadm --version
255
~ $lsusb
ID 1050:0407 Yubico.com Yubikey 4/5 OTP+U2F+CCID

i found similar issue, but not work for me.

@MarcusPro7
Copy link
Author

MarcusPro7 commented Feb 12, 2025

I am trying to install YubiKey-manager by following this guide

$ pip install --user yubikey-manager
Collecting yubikey-manager
  Using cached yubikey_manager-5.5.1-py3-none-any.whl.metadata (1.1 kB)
Requirement already satisfied: click<9.0,>=8.0 in /usr/lib/python3.13/site-packages (from yubikey-manager) (8.1.8)
Requirement already satisfied: cryptography<45,>=3.0 in /usr/lib/python3.13/site-packages (from yubikey-manager) (43.0.3)
Collecting fido2<2.0,>=1.0 (from yubikey-manager)
  Using cached fido2-1.2.0-py3-none-any.whl.metadata (1.4 kB)
Requirement already satisfied: keyring<26,>=23.4 in /usr/lib/python3.13/site-packages (from yubikey-manager) (25.6.0)
Collecting pyscard<3.0,>=2.0 (from yubikey-manager)
  Using cached pyscard-2.2.1.tar.gz (156 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: cffi>=1.12 in /usr/lib/python3.13/site-packages (from cryptography<45,>=3.0->yubikey-manager) (1.17.1)
Requirement already satisfied: SecretStorage>=3.2 in /usr/lib/python3.13/site-packages (from keyring<26,>=23.4->yubikey-manager) (3.3.3)
Requirement already satisfied: jeepney>=0.4.2 in /usr/lib/python3.13/site-packages (from keyring<26,>=23.4->yubikey-manager) (0.8.0)
Requirement already satisfied: jaraco.classes in /usr/lib/python3.13/site-packages (from keyring<26,>=23.4->yubikey-manager) (3.4.0)
Requirement already satisfied: jaraco.functools in /usr/lib/python3.13/site-packages (from keyring<26,>=23.4->yubikey-manager) (4.1.0)
Requirement already satisfied: jaraco.context in /usr/lib/python3.13/site-packages (from keyring<26,>=23.4->yubikey-manager) (6.0.1)
Requirement already satisfied: pycparser in /usr/lib/python3.13/site-packages (from cffi>=1.12->cryptography<45,>=3.0->yubikey-manager) (2.22)
Requirement already satisfied: more-itertools in /usr/lib/python3.13/site-packages (from jaraco.classes->keyring<26,>=23.4->yubikey-manager) (10.6.0)
Using cached yubikey_manager-5.5.1-py3-none-any.whl (216 kB)
Using cached fido2-1.2.0-py3-none-any.whl (219 kB)
Building wheels for collected packages: pyscard
  Building wheel for pyscard (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pyscard (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      Package libpcsclite was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libpcsclite.pc'
      to the PKG_CONFIG_PATH environment variable
      Package 'libpcsclite' not found
      running bdist_wheel
      running build
      running build_py
      running build_ext
      building 'smartcard.scard._scard' extension
      swigging src/smartcard/scard/scard.i to src/smartcard/scard/scard_wrap.c
      swig -python -outdir src/smartcard/scard -DPCSCLITE -o src/smartcard/scard/scard_wrap.c src/smartcard/scard/scard.i
      creating build/temp.linux-x86_64-cpython-313/src/smartcard/scard
      gcc -g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -Wformat -Wformat-security -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z,now -Wl,-z,relro -fno-semantic-interposition -ffat-lto-objects -fno-trapping-math -Wl,-sort-common -Wl,--enable-new-dtags -mrelax-cmpxchg-loop -ffunction-sections -fPIC -DVER_PRODUCTVERSION=2,2,1,0000 -DVER_PRODUCTVERSION_STR=2.2.1 -DPCSCLITE=1 -Isrc/smartcard/scard/ -I/usr/include/PCSC -I/usr/local/include/PCSC -I/usr/include/python3.13 -c src/smartcard/scard/helpers.c -o build/temp.linux-x86_64-cpython-313/src/smartcard/scard/helpers.o
      src/smartcard/scard/helpers.c:28:10: fatal error: winscard.h: File o directory non esistente
         28 | #include <winscard.h>
            |          ^~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyscard
Failed to build pyscard
ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyscard)

I encountered an error indicating that libpcsclite is missing.

$ pcscd -v
pcsc-lite version 2.2.1
Copyright (C) 1999-2002 by David Corcoran <[email protected]>.
Copyright (C) 2001-2024 by Ludovic Rousseau <[email protected]>.
Copyright (C) 2003-2004 by Damien Sauveron <[email protected]>.
Report bugs to <[email protected]>.
Enabled features: USB libudev polkit systemd Linux x86_64 ipcdir=/run/pcscd usbdropdir=/usr/lib/pcsc/drivers serialconfdir=/etc/reader.conf.d
MAX_READERNAME: 128, PCSCLITE_MAX_READERS_CONTEXTS: 16
$ systemctl status pcscd.service

● pcscd.service - PC/SC Smart Card Daemon
     Loaded: loaded (/usr/lib/systemd/system/pcscd.service; indirect; preset: disabled)
     Active: active (running) since Wed 2025-02-12 12:38:44 CET; 2s ago
TriggeredBy: ● pcscd.socket
       Docs: man:pcscd(8)
   Main PID: 6305 (pcscd)
      Tasks: 3 (limit: 8545)
     Memory: 1.1M (peak: 1.3M)
        CPU: 9ms
     CGroup: /system.slice/pcscd.service
             └─6305 /usr/sbin/pcscd --foreground --auto-exit

feb 12 12:38:44 PT-IT02 (pcscd)[6305]: pcscd.service: Referenced but unset environment variable evaluates to an empty string: PCSCD_ARGS
feb 12 12:38:44 PT-IT02 systemd[1]: Started pcscd.service.

What am I doing wrong?

@K1ngfish3r
Copy link

K1ngfish3r commented Feb 12, 2025

I'm not at my CL system right now, but try doing the following

sudo swupd search-file libpcsclite.pc

then try and add the smallest bundle which matches using

sudo swupd bundle-add [bundle-name]

@bwarden
Copy link
Member

bwarden commented Feb 12, 2025

As @K1ngfish3r pointed out, you need the dev bundle so you can build against that library -- Bundle devpkg-pcsc-lite.

@bwarden
Copy link
Member

bwarden commented Feb 12, 2025

I'll try to package and bundle yubikey-manager with its dependencies and tag it here if/when it's published.

@MarcusPro7
Copy link
Author

I'll try to package and bundle yubikey-manager with its dependencies and tag it here if/when it's published.

Thank you both for the advice, Brett always on point. The dream would be to also unlock the encrypted disk with a Yubikey

clrbuilder pushed a commit to clearlinux/clr-bundles that referenced this issue Feb 13, 2025
@ephut ephut removed the new label Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants