solokeys / solo1

Solo 1 firmware in C
https://solokeys.com/
Other
2.28k stars 273 forks source link

fido2.ctap.CtapError when running `solo1 key keyboard 'sequence'` #630

Open JonTheNiceGuy opened 1 year ago

JonTheNiceGuy commented 1 year ago

I received my Somu device today.

I installed the solo1 tool from pip, and then, following guidance from in here, I ran pip install fido2~=0.9.

I then ran the upgrade process, which, as others have noted, will fail on the first pass with (27264, b'') but a re-run succeeds.

When I tried to run solo1 key keyboard I repeatedly get this message:

solo1 key keyboard 'decafbad'
Traceback (most recent call last):
  File "/usr/local/bin/solo1", line 8, in <module>
    sys.exit(solo_cli())
  File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/solo/cli/key.py", line 502, in keyboard
    dev.program_kbd(buf)
  File "/usr/local/lib/python3.10/dist-packages/solo/devices/base.py", line 141, in program_kbd
    return ctap2.send_cbor(0x51, cmd)
  File "/usr/local/lib/python3.10/dist-packages/fido2/ctap2/base.py", line 675, in send_cbor
    raise CtapError(status)
fido2.ctap.CtapError: CTAP error: 0x01 - INVALID_COMMAND

Is this because the Somu can't run this keyboard command? Is it because there's an issue (which can be debugged and solved) or is there something else?

4gra commented 9 months ago

I have a Tap. I don't see anywhere in the firmware where this is even handled. I might be misreading the code but my brief delve looks like it should be handled somewhere in ctap_request ... but there's no mention of a command for this, no macros mentioning the command, nothing.

I suspect this simply isn't implemented on any device using this firmware.