-
Notifications
You must be signed in to change notification settings - Fork 26
Test item MakeCredentialCredParamsTest #88
Comments
make_credential_cred_params needs to be looked at. In principle, for algorithm agility, we don't want authenticators blowing up when seeing an unknown /unsupported alg. YK ignores unsupported algs so we need to look at why this test is failing. We may need to clarify the test in CTAP2.1 as I can see that the "PublicKeyCredentialParameters' algorithm identifiers are values that SHOULD be registered in the IANA COSE Algorithms registry" that was intended for RP might be misinterpreted by authenticators as a reason to reject unknown values. From what I can make of it I think the intent of the test is correct. |
Looking at the test https://github.com/google/CTAP2-test-tool/blob/master/src/tests/make_credential.cc#L359 It is the unknown type that is causing errors not the unknown alg. I am guessing most authenticators will reject type values that "public-key". We should clarify in CTAP 2.1 if unknown type and unknown algs MUST both be ignored when processing pubKeyCredParams. |
How do you know? In the test, the invalid If we changed the test code's L359 to have See also: https://github.com/fido-alliance/fido-2-specs/issues/1113#issuecomment-731836851 |
For the sake of debugging, I could split this test into 2. Both with 1 valid entry, and an invalid entry with only However, the question still stands if we want both. Since an authenticator's behaviour shouldn't depend on knowing the current IANA COSE Algorithms registry, I don't see why it should be different. I think this test makes authenticators more compatible with future versions. Or, to put it differently: Why even have an enum with 1 variant if we can't extend it? |
Well, IIUC, the relevant CTAP makeCred step is implicitly saying to ignore invalid values, i.e., if there's at least one
Sure, that'd aid in determining what in particular an improperly-operating authenticator is getting wrong.
IIUC, what you mean is that an authnr ought to be considering a given If so, I agree. Though, for the purposes picking an |
I checked our code. We get the RSA alg which is unknown for the YK CTAP2.1_Pre keys from the MS RP and we have successfully ignored it.
|
0 is probably a safe alg for testing. |
My point is webauthn spec says "Currently one credential type is defined, namely "public-key", link. Supplement: |
@nuno0529 So your point is that a
If later protocol versions introduce a different type and make that valid, your security key would stop working whenever this new
My general approach is to try to constrain allowed behaviour more tightly. I think this has a long-term benefit. And you can pass both tools with one implementation. |
@kaczmarczyck I support your point that a |
test item: MakeCredentialCredParamsTest
{
"description": "Tests entries in the credential parameters list.",
"error_message": "Falsely rejected cred params list with 1 good and 1 bad element.",
"id": "make_credential_cred_params",
"observations": [
"A prompt was expected, but not performed. Sometimes it is just not recognized if performed too fast.",
"The failing error code is
CTAP2_ERR_UNSUPPORTED_ALGORITHM
."],
"result": "fail",
"tags": []
},
Webauthn specs says below in https://www.w3.org/TR/webauthn-2/#dom-publickeycredentialdescriptor-type
ctap2 spec has description for pubKeyCredParams(0x04) of authenticatorMakeCredential's command
So authenticator should not accept type="non-existing type" with the alg value of COSE.
The text was updated successfully, but these errors were encountered: