roelderickx / connective-plugin-linux

A replacement for the Connective Plugin which is used on several websites to log in or sign documents using a card reader and an electronic identity card.
GNU General Public License v3.0
36 stars 2 forks source link

Cannot make it work #11

Closed ropieur closed 2 years ago

ropieur commented 2 years ago

Hello @roelderickx , I downloaded your package, ran get_connective_plugin.py which created a connective-downloads directory with connective-plugin-installer-local-2.0.9.msi and connective_signing_extension-1.0.4.xpi. I installed successfully .xpi extension into firefox (96.0.3 under Ubuntu 20.04). From Addons page, I see the plugin "Connective signing extension". When I connect to the istme website, after having entered my phone number, itsme still requires me to install the Connective plugin. Is it supposed to work or should I do additional installs? Is it possible to debug what is happening? BTW, the client server solution is not an alternative for me, because I have Ubuntu only.

roelderickx commented 2 years ago

Hello @ropieur ,

Did you install the nativemessaging package from pypi (pip install nativemessaging, or on some distributions pip3 install nativemessaging) and ran nativemessaging-install.py firefox? Firefox should be able to start the connective-backend.py script, if that is impossible you will still get the message requiring you to install the browser plugin. It is a bit of a deceiving message as I believe you already correctly installed the xpi browser extension.

Please have a look in the test directory for a troubleshoot guide and for guidance on how to debug the plugin without itsme / doccle / ....

ropieur commented 2 years ago

Hi @roelderickx , Thank you for the swift reply.

I didn't install nativemessage package, because I was thinking it was only intended for the alternative client-server solution. In order to install it, I need to install first pip from my distro

sudo apt install python3-pip

Then I've been able to install nativemessaging as suggested

$ pip install nativemessaging
Collecting nativemessaging
  Downloading nativemessaging-1.0.1-py3-none-any.whl (7.0 kB)
Installing collected packages: nativemessaging
Successfully installed nativemessaging-1.0.1

I had to run nativemessaging-install.py firefox from the root directory of connective-plugin-linux-main (This was not clear to me)

As explained, from test/README.MD, I ran connective-backend.py, which ends up in error

$ ../connective-backend.py < get_readers.txt 
Traceback (most recent call last):
  File "../connective-backend.py", line 14, in <module>
    import smartcard
ModuleNotFoundError: No module named 'smartcard'

I have to mention that the smartcard reader is fully embedded on my laptop and I can read my eID thanks to eid_viewer from official website.

Any suggestion?

roelderickx commented 2 years ago

As explained, from test/README.MD, I ran connective-backend.py, which ends up in error

$ ../connective-backend.py < get_readers.txt 
Traceback (most recent call last):
  File "../connective-backend.py", line 14, in <module>
    import smartcard
ModuleNotFoundError: No module named 'smartcard'

I have to mention that the smartcard reader is fully embedded on my laptop and I can read my eID thanks to eid_viewer from official website.

Any suggestion?

Since you can read your identy card using eid-viewer I assume all necessary C libraries are present on your system, you just need the python API as well: pip install pyscard should do the trick.

If the script is also complaining about tkinter you have to install this as well, there may be a package available in your linux distribution.

ropieur commented 2 years ago

Thank you for the tip! In order to install pyscard, I needed to install swig and libpcsclite-dev

sudo apt install swig
sudo apt install libpcsclite-dev

Test script ran perfectly

$ ../connective-backend.py < get_readers.txt 
IN {"cmd": "GET_READERS", "activationToken": "...", "isRequest": true}
OUT {"readerList": [{"index": 0, "library": "__cardcomm__", "name": "Alcor Micro AU9560 00 00", "cardPresent": null, "cardType": 0}]}
�{"readerList": [{"index": 0, "library": "__cardcomm__", "name": "Alcor Micro AU9560 00 00", "cardPresent": null, "cardType": 0}]}

Finally I opened test/protocoltest.html

When I connect to https://my.itsme.be/self/update/en/identification, after continue, I still get a page with

To continue you need to install Connective SignID
This software is required for identification with a card reader

Unsure what to do next.

ropieur commented 2 years ago

From the Browser Console I see the following

GET | https://ids.connective.eu/favicon.ico
Status 404 Not Found
Version HTTP/1.1
Transferred 21 B (21 B size)
Referrer Policystrict-origin-when-cross-origin
[Exception... "Favicon at "https://ids.connective.eu/favicon.ico" failed to load: Not Found."  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource:///modules/FaviconLoader.jsm :: onStopRequest :: line 253"  data: no] [FaviconLoader.jsm:253:22](resource:///modules/FaviconLoader.jsm)
    onStopRequest resource:///modules/FaviconLoader.jsm:253
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 2 [background.js:2807](moz-extension://9977b881-037a-4c9d-bc69-99246d9f09f8/background.js)
    send moz-extension://9977b881-037a-4c9d-bc69-99246d9f09f8/background.js:2807
roelderickx commented 2 years ago

When I connect to https://my.itsme.be/self/update/en/identification, after continue, I still get a page with

To continue you need to install Connective SignID
This software is required for identification with a card reader

Unsure what to do next.

Your installation is fine now, but it seems as if the Connective browser package is replaced with the Connective SignID. See https://documentation-archive.connective.eu/en-us/SignID2.1.0/SignID.html

Since it is something different it is not supported by connective-plugin-linux. Not that it is impossible to create, probably very similar, but it means we have to start all over from the very beginning :confused:

It makes me wonder when they changed this, a few other people used itsme with success.

roelderickx commented 2 years ago

It is not really clear why itsme moved towards Connective SignID, it may have been planned long ago but on the other hand the Connective browser plugin worked fine for them. The combination of the lack of technical requirement and the timing suggests they did this on purpose, either to avoid the use of connective-plugin-linux or to get a free Linux version for Connective SignID too. Whatever the reason, I decided to do something else with my precious time. I still expect Connective to release Linux versions for their products, including the Connective browser plugin, as promised on their website.

amedee commented 2 years ago

Hello @ropieur ,

Did you install the nativemessaging package from pypi (pip install nativemessaging, or on some distributions pip3 install nativemessaging) and ran nativemessaging-install.py firefox? Firefox should be able to start the connective-backend.py script, if that is impossible you will still get the message requiring you to install the browser plugin. It is a bit of a deceiving message as I believe you already correctly installed the xpi browser extension.

Please have a look in the test directory for a troubleshoot guide and for guidance on how to debug the plugin without itsme / doccle / ....

Hi, could you add the pip install ... instructions to your main README.md? They might be obvious for seasoned Python developers, but I haven't written anything more than a Hello World in Python and I'm not familiar with the environment.

amedee commented 2 years ago

Never mind, I just read in the last comment that they replaced the Connective thing and that your workaround no longer works so I need to install Virtualbox...

roelderickx commented 2 years ago

I added the pip install instruction for nativemessaging to the README file, but for pyscard it is a bit more complicated. There are some requirements to be met for this package as well, I personally never tried pip install pyscard but it may work out of the box.

About the replacement with Connective SignID: that really depends on the website you are trying to use. Itsme has moved forward to use the new plugin but Doccle for example still works with this application.

amedee commented 2 years ago

Thanks for getting back on this. In my case it was ItsMe, but I still have to do Doccle too. In any case I have just given up, installed VirtualBox, downloaded a Windows 11 ISO, and did it that way. It's like shooting with a cannon at a mosquito...

Anyway thanks for your efforts!