MasterKale / SimpleWebAuthn

WebAuthn, Simplified. A collection of TypeScript-first libraries for simpler WebAuthn integration. Supports modern browsers, Node, Deno, and more.
https://simplewebauthn.dev
MIT License
1.63k stars 137 forks source link

Wrong RootCA certificate in verifyAndroidSafetyNet on server. #137

Closed dz-rep closed 3 years ago

dz-rep commented 3 years ago

Please check certificate GlobalSignRootCAR2 in verifyAndroidSafetyNet on server. It seems that you use wrong certificate, because when i try to create WebAuthn on android device it throw error "subject issuer did not match issuer subject".

I try to use R1 GlobalSign Root Certificate from this site https://aboutssl.org/globalsign-root-certificates-licensing-and-use/ and it work.

MasterKale commented 3 years ago

Thanks for reporting this, @dz-rep. Would you be able to provide the output from navigator.credentials.create() from that Android device? It'll help me test as I work towards a fix.

dz-rep commented 3 years ago

That is what i get from navigator.credentials.create().

{ "id": "AQsMmnEQ8OxpZxijXBMT4tyamgkqC_3hr18_e8KeK8nG69ijcTaXNKX_CRmYiW0fegPE0N_3NVHEaj_kit7LPNM", "rawId": "AQsMmnEQ8OxpZxijXBMT4tyamgkqC_3hr18_e8KeK8nG69ijcTaXNKX_CRmYiW0fegPE0N_3NVHEaj_kit7LPNM", "response": { "attestationObject": "o2NmbXRxYW5kcm9pZC1zYWZldHluZXRnYXR0U3RtdKJjdmVyaTIxMjQxODA0NmhyZXNwb25zZVkgcmV5SmhiR2NpT2lKU1V6STFOaUlzSW5nMVl5STZXeUpOU1VsR1dIcERRMEpGWldkQmQwbENRV2RKVVdadE9HbFpXbnAxY1RCRlNrRkJRVUZCU0RkMVVsUkJUa0puYTNGb2EybEhPWGN3UWtGUmMwWkJSRUpIVFZGemQwTlJXVVJXVVZGSFJYZEtWbFY2UldsTlEwRkhRVEZWUlVOb1RWcFNNamwyV2pKNGJFbEdVbmxrV0U0d1NVWk9iR051V25CWk1sWjZTVVY0VFZGNlJWUk5Ra1ZIUVRGVlJVRjRUVXRTTVZKVVNVVk9Ra2xFUmtWT1JFRmxSbmN3ZVUxVVFUTk5WR3Q0VFhwRmV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FdaNW9jV1l4ajgxY2ZYX2xPR29FM3ozZEtheG44U0ZNNTlVLTVUQm5Gdl9NTzBFRVUwVXJpSDhmQlp6UmdGSHFoUlNvRGs2UmF1aUh0a0JjZjhRVkJ4TURwVXdFd25qOWc0OUVLSkFwVWtqcjZxcFpxdXRfcFBBaGF1dGhEYXRhWMVJlg3liA6MaHQ0Fw9kdmBbj-SuuaKGMseZXPO6gx2XY0UAAAAAuT_ZYfLmRi-xIoIAIkfeeABBAQsMmnEQ8OxpZxijXBMT4tyamgkqC_3hr18_e8KeK8nG69ijcTaXNKX_CRmYiW0fegPE0N_3NVHEaj_kit7LPNOlAQIDJiABIVggxf5sshpkLLen92NUd9sRVM1fVR6FRFZY_P7fnCq3crgiWCALN83GhRoAD4faTpk1bp7bGclHRleO922RvPUpSnBb-w", "clientDataJSON": "eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoiQUhOWlE1WWFoZVpZOF9lYXdvM0VITHlXdjhCemlqaXFzQlVlNDZ2LVFTZyIsIm9yaWdpbiI6Imh0dHA6XC9cL2xvY2FsaG9zdDo0MjAwIiwiYW5kcm9pZFBhY2thZ2VOYW1lIjoiY29tLmFuZHJvaWQuY2hyb21lIn0" }, "type": "public-key", "clientExtensionResults": {}, "transports": [] }

dz-rep commented 3 years ago

Also I can provide you certificate path that I get with GlobalSignRootCAR2.

MasterKale commented 3 years ago

Thank you for the full response, this is very useful ✌️

Also I can provide you certificate path that I get with GlobalSignRootCAR2.

More info is always better, I'll take you up on this offer.

dz-rep commented 3 years ago

There is a certificate path that I got.

-----BEGIN CERTIFICATE----- MIIFXzCCBEegAwIBAgIQfm8iYZzuq0EJAAAAAH7uRTANBgkqhkiG9w0BAQsFADBG MQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExM QzETMBEGA1UEAxMKR1RTIENBIDFENDAeFw0yMTA3MTkxMzEzNDJaFw0yMTEwMTcx MzE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AQEAmYFThxxol4aR7OBKuEQLq4Gs J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO 291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRDLenVOavS ot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd AfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7 TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg== -----END CERTIFICATE-----

MasterKale commented 3 years ago

@dz-rep I spent a little time looking into this. Can you tell me more about the device that generated the response you posted? What's the make and model, and what version of Android is it running? And what browser did you use?

I don't have an answer for you yet, I'm still investigating.

dz-rep commented 3 years ago

@dz-rep I spent a little time looking into this. Can you tell me more about the device that generated the response you posted? What's the make and model, and what version of Android is it running? And what browser did you use?

I don't have an answer for you yet, I'm still investigating.

First time I reproduced it on OnePlus 7 (Android 11) in Chrome when I update package to latest version. Generated response from this device. I also reproduced it on version 0.10.6.

Also I reproduced it on Pixel 4 (Android 11), Xiaomi Mi A2 Lite (Android 9), Huawei P30 Pro (Android 10) in Chrome.

MaKleSoft commented 3 years ago

@MasterKale Got the same issue. Tested on a Pixel 3a running Android 10. Good to know this is being worked on!

MasterKale commented 3 years ago

Ah, sorry for the radio silence. @dz-rep thank you for the list of devices, and same to you @MaKleSoft. I asked around and found out Google is slowly transitioning from the GSR2 to GSR1 root cert, which explains why the GSR2 cert I baked into this library is no longer sufficient, and why using GSR1 was the solution.

Parenthood has slowed down my personal coding velocity so I haven't been able to get a fix out as quickly as I'd have liked. That said I have just a couple small changes I want to make to PR #138 before I merge it to offer you a solution to this issue. Take a look at let me know what you think. I'll try to merge it and cut a release in the next couple of days.

MaKleSoft commented 3 years ago

Thanks for the update! Just so I understand, selecting the appropriate certificate would still be handled automatically in this case, correct? More configurability is always great but one of the big advantages of library is that it "just works" for 99% of the use cases. You wrote in your PR that most devs will be able to ignore SettingsService so it sounds like this is still the goal. Just wanted to make sure 😊

MasterKale commented 3 years ago

Thanks for the update! Just so I understand, selecting the appropriate certificate would still be handled automatically in this case, correct? More configurability is always great but one of the big advantages of library is that it "just works" for 99% of the use cases. You wrote in your PR that most devs will be able to ignore SettingsService so it sounds like this is still the goal. Just wanted to make sure 😊

That's all correct. I'll continue to include root certs for the more "proprietary" attestation formats (my words, not the specs 😆), as I've been doing with GSR2 for "android-safetynet" and Apple's WebAuthn root cert for "apple" because it's been simple to point to these individual files and say, "this is the root cert you need to use here".

In the case of SafetyNet I'll include the GSR1 cert within the library alongside GSR2 now since clearly we're in middle of the transition time. From a usability standpoint nothing should change with existing implementations, I'll just offer another power user feature for those who wish to exercise more control over how the library operates.

MaKleSoft commented 3 years ago

Awesome! Can't wait for the PR to land 😊

MasterKale commented 3 years ago

PR #138 has been merged! It has not yet been released, though, but it will be a feature of v4.0.0 when that releases.

MaKleSoft commented 3 years ago

That's great to hear! Do you have a rough estimate on when you are planning to release v4?

MasterKale commented 3 years ago

Sometime this week, maybe? 🤷‍♂️ PR #142 and PR #147 are the last two PR's I have tagged for v4.0.0, and I think I just solved #142 so there's not much more work left before I'll be ready to prep a release.

I'd like to get a release out sooner rather than later because this is a lot of great stuff to sit on for too long, but it all comes down to how much free time any of us have to work on this. Thank you for your patience 🙇‍♂️

MaKleSoft commented 3 years ago

Oh, no pressure! This week would be amazing but I can wait a little longer. Just really excited to get my hands on the new version. Lots of great stuff indeed! 😊

MasterKale commented 3 years ago

This issue has been resolved in v4.0.0! Please see the changelog and consult the docs for more information about the new SettingsService that can be used to manage root certs for any attestation format.

(I included GSR1 in v4.0.0 so you won't actually need to use SettingsService, but it's available in the future if Google moves onto another root cert and I haven't realized it yet)

dtslvr commented 3 years ago

Thanks @MasterKale! I have just upgraded to v4.1.0 and it is working again on my android device 😎