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

Refuses to work with fido2>=1.0.0 #73

Open
62832 opened this issue Jun 7, 2023 · 3 comments
Open

Refuses to work with fido2>=1.0.0 #73

62832 opened this issue Jun 7, 2023 · 3 comments

Comments

@62832
Copy link

62832 commented Jun 7, 2023

I'm currently in the process of putting together a (non-pip) package for the Arch Linux user repository as per the distribution's Python package guidelines. This requires that the program being packaged runs against the latest available versions of other python packages, which in the case of the python-fido2 module is currently 1.1.1 as opposed to 0.9.3.

At present, onlykey-cli refuses to start from the package I've built due to the naming changes made in the FIDO2 module such as CTAP1 -> Ctap1.

Traceback (most recent call last):
  File "/usr/bin/onlykey-cli", line 33, in <module>
    sys.exit(load_entry_point('onlykey==1.2.10', 'console_scripts', 'onlykey-cli')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/onlykey-cli", line 25, in importlib_load_entry_point
    return next(matches).load()
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.11/site-packages/onlykey/cli.py", line 15, in <module>
    import solo
  File "/usr/lib/python3.11/site-packages/solo/__init__.py", line 15, in <module>
    from . import client, commands, dfu, helpers, operations
  File "/usr/lib/python3.11/site-packages/solo/client.py", line 16, in <module>
    from .devices import solo_v1
  File "/usr/lib/python3.11/site-packages/solo/devices/solo_v1.py", line 11, in <module>
    from fido2.ctap1 import CTAP1
ImportError: cannot import name 'CTAP1' from 'fido2.ctap1' (/usr/lib/python3.11/site-packages/fido2/ctap1.py)

A fix for this would be greatly appreciated for myself and for anyone else looking to use the CLI utility on Arch-based Linux distributions without the use of pip.

@haplo
Copy link
Contributor

haplo commented Jan 15, 2024

I have been working on packaging onlykey's Python libraries for Arch Linux unaware of @62832 work here. Am I right to assume that you gave up?

@onlykey Would you accept PRs updating the codebase to the new fido2 API?

@62832
Copy link
Author

62832 commented Jan 15, 2024

I did give up initially since I didn't plan at that time on sending any pull requests updating to the new API, and I also wasn't sure if OnlyKey were available to accept such PRs. I'm happy to await a response, however.

@onlykey
Copy link
Contributor

onlykey commented Jan 15, 2024

Yes we would be happy to accept a PR here. Thanks for the work on this.

@62832 @haplo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants