Can't make Firefox Snap Work with Smart Card Reader

Hello,

I have recently got a smart card reader to access some governmental websites in Sweden. Once you access one of these sites and choose to login in, the website asks you to download a Firefox addon (SConnect) and install some files on your computer.

The installation of the addon seems to work without any issues, but host files causes some issues. They are install to to the local users ./mozilla and ./sconnect directories, which the Firefox snap cannot read.

I tried to move the files to the common folder of the snap, and that seems to made the plugin to be able to talk to the host. However, when the site asks me to introduce the card, nothing happens. Despite the plugin working, it seems that it can’t communicate with the card reader.

I saw that there existed some similar posts related to card readers, but the last response was around 2019. I wanted therefore to check first in case I am doing something wrong or if card readers still pose an issue for the snap version.

Thank you for your help.

Mgns

I seem to recall @ogra working on something related to smartcards very recently, and if I remember correctly I think that a new interface for reading from smart cards was going to be worked on to enable this.

what i did is simply packaging pcsc-lite (including the pcscd daemon) and its most common USB drivers into one snap … that snap provides a content interface to access the daemons socket …

the prob with this approach is that the firefox snap would have to use my pcsc-daemon snap as stage snap at build time to get a libpcsclite that looks for the socket in $SNAP_COMMON/pcscd

a snap using the content interfac plug is here:

and here is how the lib gets included:

i’m not sure if we could somehow make the content interface include the access to the libs at runtime instead of the extra part at build time.

Just linking a recent discussion about this issue.