-
Notifications
You must be signed in to change notification settings - Fork 23
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
HyperFIDO Pro Mini ctap2token: CBOR error: CTAP2_ERR_INVALID_CBOR #14
Comments
I have one of those as well (probably an older version than yours, it doesn't list the FIDO_2_1_PRE version) and also have issues with it. Things seem a little better on your side by at least getting a valid error code, I'm getting a I don't have many ideas about what to do from here. I did try modifying the Maybe the fact that this specific token isn't FIDO2 certified gives us some hints (only the from https://fidoalliance.org/certification/fido-certified-products/, searching for all I didn't encounter issues running this example on a wide range of other tokens so I'm really clueless here. My only advice would be to stick to U2F/CTAP1 protocol for now, which seems to work fine with this token. |
My authenticator is the new Pro Mini version (not the Mini version). It is supposed to be FIDO2 compliant. It seems to work with https://webauthn.io/, but I'm not sure if its a FIDO2-only site. By any chance, was this the site you've used? Do you known which version of fido is it using? Can you guide/point me in capturing the usb traffic (in Ubuntu or Windows)? Maybe that would help troubleshooting this? BTW, I'm just starting to slowly learn about CTAP2/webauthn, so please bear with me :) |
Indeed, the Pro version is supposed to be compliant. So to be a bit more specific, the website is not really in play here, we have:
which means it's the browser's responsibility to talk with the token and handle the U2F / CTAP2 protocols. To capture USB, you can go with Wireshark (see https://wiki.wireshark.org/CaptureSetup/USB). Identify your device bus and ID with I've also pushed a debug branch |
Thank you for the details! Please see the Please see the hyperfidopromini.pcapng.gz wireshark usb capture file. I've tried this with the z4yx/u2f_fido2_dissector.lua dissector by copying it to --usb_table:add(0x10500407,ctap_proto) -- VID/PID of Yubikey
usb_table:add(0x2ccf0854,ctap_proto) -- VID/PID of HS HyperFIDO But I not really known how to interpret most of the capture (the capture starts when I insert the authenticator in the usb port and stops after the example program panics). |
HyperSecu Mini tokens are reporting errors when calling GetAssertion. It seems these tokens don't support the transports field being set on the CredentialDescriptor. Luckily it's optionnal so we can safely remove it.
Thanks for the logs! I booted up my Windows VM and managed to capture USB between the token and the browser while interacting with webauthn.io, and as I supposed before, Windows browsers use the CTAP2 protocol. The webauthn flow did work there, so all left to do was to retrieve the GetAssertion request from the capture, and compare it with the one made in the example code. |
It now works! Thank you! I'm not yet sure why, but the example application sometimes asks for a PIN. I will try to dig into CTAP2 protocol to known when a authenticator might require a PIN :-) |
Actually, the application asks for the PIN when I do not press the authenticator button after some seconds. Is that expected? Or should this "error" out in some other way? |
HyperSecu Mini tokens are reporting errors when calling GetAssertion. It seems these tokens don't support the transports field being set on the CredentialDescriptor. Luckily it's optionnal so we can safely remove it.
This looks like to be again a feature proper to the HyperSecu tokens. While timing out waiting for user presence, tokens are expected to return a See updated example in 840ab5f that catch it and avoid asking for a pin when it's not set. This isn't great but I can't do much more here. |
I see, something is kinda broken with it. With your change, this is now more understandable. Thanks :-) |
I'm trying a HyperFIDO Pro Mini authenticator (amazon buy link) with the https://github.com/flynn/u2f/tree/webauthn branch that is being worked on by @daeMOn63 at #12 and its failed with a
CBOR error
.I've tried the ctap2token example as:
git clone -b webauthn https://github.com/flynn/u2f.git cd u2f go run ctap2token/example/main.go
Which returned:
I pressed the button once and it go thru the first step successfully; but when it reached the second step of asking me to press the button, it failed with the
CBOR error
before I pressed the button a second time.Can you help me troubleshoot this? Is there something else I should try?
The text was updated successfully, but these errors were encountered: