-
Notifications
You must be signed in to change notification settings - Fork 89
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
Metadata validation is performed during login on credentials with no attestation #387
Comments
After further analysis, I understand that the Aaguid when no attestation has been provided will be the null guid ( |
If this errors it's unexpected behavior which we should fix. Especially if it errors during login but not registration. |
I initially thought so, because I saw that However, as I mentioned in my follow-up comment, after further analysis I found out about NOTE: My rationale for thinking this is 'by design' is that if I'm currently using |
Makes sense. I'll double check the logic and ensure it makes sense in all situations. But it should pass in both registration or login scenarios and generally should fail more in registration than login |
Version
0.12.1
Description
Metadata validation (through the ValidateMedata method) is skipped during the registration ceremony when no attestation information has been provided by the authenticator.
You can see that the call to
ValidateMetadata
in VerifyAttestation will not be reached because the method will exit previously at the start of the function with this code:webauthn/protocol/attestation.go
Lines 152 to 158 in 086658d
However, a similar check is not performed during validateLogin when the a Metadata provider has been configured, and thus the call
ValidateMetadata
will always be executed.webauthn/webauthn/login.go
Lines 342 to 355 in 086658d
NOTE: I was not sure whether to report this as an issue or start a discussion, because I'm not sure whether the behaviour is intended, though I think it'd make sense to add a similar check to that in
VerifyAttestation
in this last section ofvalidateLogin
.Reproduction
AttestationFormat
has been configured toAttestationFormatNone
.ValidateMetadata
call is skipped.ValidateMetadata
invalidateLogin
with the error:Failed to validate credential record metadata
.Expectations
Login in step 3 to be successful.
The text was updated successfully, but these errors were encountered: