verifyRegistrationResponse fails if not metadata was found
See original GitHub issueWhen trying to register the an authenticator using fingerprint on my Pixel 3a I get
Error: No metadata statement found for aaguid "b93fd961-f2e6-462f-b122-82002247de78"
Looks like MetadataService.getStatement
always throws if no meta data was found: https://github.com/MasterKale/SimpleWebAuthn/blob/master/packages/server/src/services/metadataService.ts#L138
Is this intentional? Because then this code block doesn’t really make sense: https://github.com/MasterKale/SimpleWebAuthn/blob/master/packages/server/src/registration/verifications/verifyAndroidSafetyNet.ts#L94-L110
My guess is that getStatement
should probably just return null if no metadata was found for a given aaguid, no?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
A handful of server errors coming from Windows devices #238
This error is actually returned from the method that attempts to verify parts of the attestation statement against matching metadata. The fact ...
Read more >No metadata for "BusinessApplication" was found - Stack ...
The problem. For me, this was happening after the webpack hot-reload because when everything was reloaded, new entity models were generated.
Read more >Server - SimpleWebAuthn
Once MetadataService is initialized, verifyRegistrationResponse() will reference MDS metadata statements and error out if it receives authenticator responses ...
Read more >entitymetadatanotfound no metadata for was found - You.com
js' ] Now the api is not started, getting this error error: [app] Application is crashed: EntityMetadataNotFound: No metadata for "User" was found....
Read more >TypeORM - No metadata for "User" was found. - Reddit
Hoping some typeORM experts can help me out, burned wayyy to much time on this. Was wondering if anyone can shed some light...
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 Free
Top 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
Good call, I’d considered this earlier but was still indecisive on what exactly I needed to change about MetadataService to make things more permissive. A boolean seemed the simplest, but then I remembered that that’s what led to there being a
requireResidentKey: boolean
and “residentKey: ResidentKeyRequirement
+ instructions on what to setrequireResidentKey
to for a givenresidentKey
” in L2 of the WebAuthn spec (because in L1 it made sense for resident key requirement to be a simple yes/no!)I settled on this:
An optional
verificationMode
can be set when callingMetadataService.initialize(opts);
to control how the service behaves. It will default to"strict"
because that’s howMetadataService
currently operates and I don’t want this to be a breaking change.How about a
verificationMode
enum / union-type string instead? Something like? Using
verificationMode: "none"
would be helpful for the use-case I described earlier where someone wants to fetch metadata only for logging or display purposes. Not sure what to call the “middle tier”. Maybe something more descriptive likefallback
? Or perhaps you can come up with even more options for the verification behaviour 😃 That’s the nice things about using an enum instead of a boolean - it leaves you the option of adding additional modes in the future.