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

ykman fido credentials list fails with Exception: Wrong channel #546

Open
ivankovnatsky opened this issue Mar 17, 2023 · 0 comments
Open

Comments

@ivankovnatsky
Copy link

ivankovnatsky commented Mar 17, 2023

  • YubiKey Manager (ykman) version: 5.0.1
  • How was it installed?: nixpkgs
  • Operating system and version: macOS Ventura 13.2.1
  • YubiKey model and version: YubiKey 5C Nano (5.4.3) [OTP+FIDO+CCID]
  • Bug description summary: ykman fido credentials list fails with Exception: Wrong channel

Steps to reproduce

  1. Configure 2fa for 1password
  2. Run the command

Expected result

Able to list and see configured accounts

Actual results and logs

❯ ykman fido credentials list
Enter your PIN:
ERROR: An unexpected error has occuredTraceback (most recent call last):
  File "/nix/store/av5v3wzbz4ldrnn8d04v13fwr2sbc51p-python3.10-yubikey-manager-5.0.1/lib/python3.10/site-packages/ykman/_cli/__main__.py", line 364, in main
    cli(obj={})
  File "/nix/store/0zgmcj4qw4q6kyr7wjbxm20r4ifxay2r-python3.10-click-8.1.3/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/nix/store/0zgmcj4qw4q6kyr7wjbxm20r4ifxay2r-python3.10-click-8.1.3/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/nix/store/0zgmcj4qw4q6kyr7wjbxm20r4ifxay2r-python3.10-click-8.1.3/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/nix/store/0zgmcj4qw4q6kyr7wjbxm20r4ifxay2r-python3.10-click-8.1.3/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/nix/store/0zgmcj4qw4q6kyr7wjbxm20r4ifxay2r-python3.10-click-8.1.3/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/nix/store/0zgmcj4qw4q6kyr7wjbxm20r4ifxay2r-python3.10-click-8.1.3/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/nix/store/0zgmcj4qw4q6kyr7wjbxm20r4ifxay2r-python3.10-click-8.1.3/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/nix/store/0zgmcj4qw4q6kyr7wjbxm20r4ifxay2r-python3.10-click-8.1.3/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/nix/store/av5v3wzbz4ldrnn8d04v13fwr2sbc51p-python3.10-yubikey-manager-5.0.1/lib/python3.10/site-packages/ykman/_cli/fido.py", line 559, in creds_list
    credman = _init_credman(ctx, pin)
  File "/nix/store/av5v3wzbz4ldrnn8d04v13fwr2sbc51p-python3.10-yubikey-manager-5.0.1/lib/python3.10/site-packages/ykman/_cli/fido.py", line 534, in _init_credman
    token = client_pin.get_pin_token(pin, ClientPin.PERMISSION.CREDENTIAL_MGMT)
  File "/nix/store/nsjig225j1q1j2bw9zds547ydx04rlcd-python3.10-fido2-1.1.0/lib/python3.10/site-packages/fido2/ctap2/pin.py", line 293, in get_pin_token
    key_agreement, shared_secret = self._get_shared_secret()
  File "/nix/store/nsjig225j1q1j2bw9zds547ydx04rlcd-python3.10-fido2-1.1.0/lib/python3.10/site-packages/fido2/ctap2/pin.py", line 273, in _get_shared_secret
    resp = self.ctap.client_pin(
  File "/nix/store/nsjig225j1q1j2bw9zds547ydx04rlcd-python3.10-fido2-1.1.0/lib/python3.10/site-packages/fido2/ctap2/base.py", line 296, in client_pin
    return self.send_cbor(
  File "/nix/store/nsjig225j1q1j2bw9zds547ydx04rlcd-python3.10-fido2-1.1.0/lib/python3.10/site-packages/fido2/ctap2/base.py", line 238, in send_cbor
    response = self.device.call(CTAPHID.CBOR, request, event, on_keepalive)
  File "/nix/store/nsjig225j1q1j2bw9zds547ydx04rlcd-python3.10-fido2-1.1.0/lib/python3.10/site-packages/fido2/hid/__init__.py", line 195, in call
    raise Exception("Wrong channel")
Exception: Wrong channel

Other info

When I remove 2fa on 1password, unplug the key, plug back, run the list command, it will not fail, but still does not show any accounts:

❯ ykman fido credentials list
Enter your PIN:
Credential ID  RP ID  Username  Display name

I have accounts.google.com configured for sure.

Do I miss maybe something?

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

No branches or pull requests

1 participant