VerifyAsync accepts Fmt = "none" even when AttestationConveyancePreference was "direct"
See original GitHub issueMethod VerifyAsync
from AuthenticatorAttestationResponse
doesn’t check which Attestation
was inside originalOptions
.
It uses an AttestationVerifier
selected depending on what was in the request (AttestationObject.Fmt
):
AttestationVerifier verifier = AttestationObject.Fmt switch
{
// TODO: Better way to build these mappings?
"none" => new None(), // https://www.w3.org/TR/webauthn/#none-attestation
"tpm" => new Tpm(), // https://www.w3.org/TR/webauthn/#tpm-attestation
"android-key" => new AndroidKey(), // https://www.w3.org/TR/webauthn/#android-key-attestation
"android-safetynet" => new AndroidSafetyNet(), // https://www.w3.org/TR/webauthn/#android-safetynet-attestation
"fido-u2f" => new FidoU2f(), // https://www.w3.org/TR/webauthn/#fido-u2f-attestation
"packed" => new Packed(), // https://www.w3.org/TR/webauthn/#packed-attestation
"apple" => new Apple(), // https://www.w3.org/TR/webauthn/#apple-anonymous-attestation
_ => throw new Fido2VerificationException("Missing or unknown attestation type")
};
The problem with this is that if we requested attestation by returning “direct” as the AttestationConveyancePreference
, then we are not checking that in that case AttestationObject.Fmt
was different than “none”.
I’m right with my analysis or am I missing something?
Thanks for your time!
Issue Analytics
- State:
- Created a year ago
- Comments:9
Top Results From Across the Web
Web Authentication: An API for accessing Public Key ...
Relying Parties use the attestation public key conveyed in the attestation certificate to verify the attestation signature.
Read more >Web Authentication: An API for accessing Scoped ...
This specification defines an API enabling the creation and use of strong, attested, cryptographic scoped credentials by web applications, ...
Read more >How can we trust authenticator data flags in fmt:none ...
I went to refresh my memory by taking a look at the spec and realized that if an RP never requests direct attestation...
Read more >Handling unwanted or unsupported attestation formats #1485
For my own library I think accepting unsupported attestations as an 'unknown' type with the verification resulting in a "none" attestation ...
Read more >Client to Authenticator Protocol (CTAP)
Abstract. This specification describes an application layer protocol for communication between a roaming authenticator and another ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The attStmt.fmt “none” has nothing to do with the options.attestation “none”. The RP in steps 3 - 21 checks the result to see if it matches spec and policy, if anything is amiss, the registration should be failed.
Check out https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-attestationformats. It’s been made a bit more obvious in this draft of the next version of the spec.