-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
migration to fido2 #31
Conversation
Is there any way to keep compatibility with the old And another, related question: are keys registered to websites via PS I updated codecov token in CI, next run should have it. |
The only thing that needs to be done is to change the name from |
While technically possible, this will require the user to update both dom0 and relevant templates at the same time. We don't have any method to enforce it, so it the user updates one but not the other, the U2F will be broken for that time. But, if we change the package name (as you suggested before), then the update will no longer be automatically installed (no surprise breakage on standard update), and we can document the migration procedure (update both the dom0 and templates at the same time). And then, we can also include this in the R4.1->R4.2 migration tool (QubesOS/qubes-issues#7832). I guess this is the way to go then. |
Codecov Report
@@ Coverage Diff @@
## main #31 +/- ##
=======================================
Coverage ? 72.81%
=======================================
Files ? 20
Lines ? 1501
Branches ? 0
=======================================
Hits ? 1093
Misses ? 408
Partials ? 0 |
and args.key_handle_hash != apdu.qrexec_arg): | ||
allow_list = list(request.qrexec_args) | ||
if (args.credential_id_hash is not None | ||
and args.credential_id_hash not in allow_list): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why in
? When request.qrexec_args
is a list of more than one element? Wouldn't it allow using other keys if a policy allows just one of them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I added a function that removes the other keys from the request. According to the protocol, there should be no difference in which key is used. However, in our case, we want to have control over it.
How to test CTAP2? My attempt with Firefox didn't produce any ctap.GetInfo calls. |
From what I know, Firefox + MacOS/Linux support for FIDO2 is still broken. You need to try with a different browser. |
With Chromium indeed it tries
|
In fact, it seems the new
The second part surely will need some opt-out switch (maybe via qvm-service?). |
Or go even step further, and keep the old names for those two, accepting a little inaccuracy. TBH "Authenticate" and "Register" are easier to understand for the user than "GetAssertion" and "MakeCredential". The documentation can still clarify what actual operations they do. |
It seems that your device doesn't support CTAP2? I have added a message that is less misleading. |
So we want:
right? |
Yes (with typo fixed), if I'm indeed correct about their compatibility for CTAP1 - do you confirm? |
Could be. See also my log contains |
Sorry for typo ;) Yes it is fully compatible |
FWIW, with device supporting CTAP2 it works correctly (and according to logs it indeed used CTAP2). |
Now it simply throws an exception if the device does not support CTAP2, but without the message "Unexpected error" because this error is expected. Most clients should then fallback to CTAP1 in such cases. |
and as for compatibility, |
I have re-tested new version and seems all combinations work with pre-existing keys and u2f.Authenticate service:
For those tests, I had But when I enabled |
BTW, package metadata will need adjustments for better rename handling (https://wiki.debian.org/RenamingPackages, and also spec needs to |
Hm, can you send me the logs from "client vm" and sys-usb? |
Crash on the client side:
|
The U2F-only devices handling seems to work now. But while testing it, I found another case - if no token is plugged in at all, services fail with
Same for u2f.Authenticate. It seems to be relatively harmless (GetInfo would fail anyway, and Register/Authenticate is retried). Plugging the token in afterwards still works (although for FIDO2 token, I guess behavior is slightly different, as it will be treated as FIDO1/U2F token now; I don't think the proxy can do anything about that). |
After some investigation I think I can handle that but the question is that we want it now or in later PR? |
Can be a later PR, it isn't critical. BTW, how do you plan to do that? have you found a way to get GetInfo call retried? |
it seems this change requires python3-fido2 >= 1.0.0 (only then AttestationResponse was introduced for ctap). |
Adds support for the fido2 tokens (such as PIN)
Adds CI tests/QA
Updates docs
resolves QubesOS/qubes-issues#5501