-
I am trying to get an assertion from a fido security key with a PIN set but no biometrics. That is as of libfido 1.15.0, fido_dev_has_uv return false, fido_dev_has_pin return true. I used to have this code (simplified for clarity)
When I wrote this code with libfido2 .1.6 this code was working, because the pin was considered a valid UV. So what I want to know, is that a breaking change ? Am I missing something ? Is there a way for the relying party to specify the requirement to use the client PIN now ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Both 1.6.0 and 1.9.0 have separate methods to deal with built-in UV and (client) PIN verification. I'm sorry if you have seen different behaviors across versions. The behavior should certainly not have changed between the two and it's not something we have seen before. Do note that the behavior may also depend on the authenticator implementation. As far as I can recall, CTAP 2.0 did indeed also make a distinction between Client PIN and built-in UV. Futhermore, the authenticator processing steps as outlined by the CTAP 2.0 specification explicitly say
which appears to be what you are seeing (the In WebAuthn, as you seem to be aware, there's no way for the RP to specify that it explicitly wants to perform one or the other type of user verification. Using libfido2, your client implementation can handle it as you see fit, but you should ideally not send an assertion with For example (pseudo code, error handling omitted): uv = FIDO_OPT_OMIT;
pin = NULL;
if (!strcmp(uvRequested, "preferred") || !strcmp(uvRequested, "required")) {
if (fido_dev_has_uv(dev)) {
uv = FIDO_OPT_TRUE;
} else if (fido_dev_has_pin(dev)) {
pin = prompt();
if (!pin) error();
} else if (!strcmp(uvRequested, "required")) {
error();
}
}
fido_assert_set_uv(assert, uv);
fido_dev_get_assert(dev, assert, pin); Further handling is of course necessary if, for example, you want to fall back to a PIN if built-in UV fails for some reason, and so on. Do note that if you use libfido2 to verify the assertion, you should still set |
Beta Was this translation helpful? Give feedback.
-
The fido key I am using for my test does support UV via fingerprint but it's not configured, so has_uv return false (in 1.15, in 1.6 there was no such method). Doing a quick search with 'builtin' or 'built-in' in the CTAP 2.0 specs is not returning anything, and while the 2.1 specs is warning several times client Pin is not UV, there is no such warnings in the 2.0 specs, but I may have missed something, there is a lot of text. Anyways I am more interested in recent versions so thanks for confirming there is no webauthn option for the client PIN and your answer, I think will just add an option in my application configuration if it needs to be checked and the userVerification flag will just be used for built-in pin/biometrics. |
Beta Was this translation helpful? Give feedback.
Both 1.6.0 and 1.9.0 have separate methods to deal with built-in UV and (client) PIN verification. I'm sorry if you have seen different behaviors across versions. The behavior should certainly not have changed between the two and it's not something we have seen before. Do note that the behavior may also depend on the authenticator implementation.
As far as I can recall, CTAP 2.0 did indeed also make a distinction between Client PIN and built-in UV. Futhermore, the authenticator processing steps as outlined by the CTAP 2.0 specification explicitly say