Hi all,
I’m trying to get the native Firefox to read my smartcard. I added pcsc-lite
and opensc
via homebrew. I’ve thrown the permissions sink at it with Flatseal, added the absolute path to the drivers, and also allowed it to transpose that path into /run/user/...
, but continue to run into the Unable to add module
error. Are there any other avenues aside from using an appimage, etc.?
Native flatpak installed with an RPM or flatpak Firefox.
Both can work.
Your title says native but you seems to be talking about a flatpak in your post.
I meant which ever version of Firefox comes baked into Bluefin. But yes, you’re correct, it is Flatpak.
After further review I realize this issue is much bigger than I originally thought and Bluefin won’t work for me. 
Unfortunate. But it is very much possible to use flatpak browsers with a smart card.
The main issue is that the pcsc portal doesn’t quite work correctly. So the solution is to expose your host’s p11-kit to the guest.
You can do this with flatpak overrides.
In your terminal do the following:
systemctl enable --now --user p11-kit-server.socket
systemctl enable --now --user p11-kit-server.service
flatpak override --filesystem=xdg-run/p11-kit/pkcs11 org.mozilla.firefox
Restart Firefox. You will now be able to add the p11-proxy device to your Firefox security devices and use your smart card.
Gotchas I’ve seen with this is that it needs to be an actually supported reader by opensc. Additionally this exposes your tokens to your browser. This is more than what flatpak initially allows. But this does get it working.