Giter Club home page Giter Club logo

Comments (23)

yaron14 avatar yaron14 commented on May 12, 2024 1

I succeeded attestation and assertion using the example in https://webauthn.io (there are quite a few libraries out there).
In addition, I used Microsoft' sample for implementing WebAuthn with resident key.

This is my attestation code:
image

from simplewebauthn.

yaron14 avatar yaron14 commented on May 12, 2024 1

This is the raw attestation (JSON) returned from startAttestation:

{
  "attResp": {
    "id": "QdiHnAdxCTeVpw2Up2QYdbTG1fQFLwfdELRHvyyZg10",
    "rawId": "QdiHnAdxCTeVpw2Up2QYdbTG1fQFLwfdELRHvyyZg10",
    "response": {
      "attestationObject": "o2NmbXRkbm9uZWdhdHRTdG10oGhhdXRoRGF0YVkBZ9Ukck8V92UT5YFZtBoVSQZWyFTM-rDMTOAW1DLfg1hnRQAAAAAAAAAAAAAAAAAAAAAAAAAAACBB2IecB3EJN5WnDZSnZBh1tMbV9AUvB90QtEe_LJmDXaQBAwM5AQAgWQEAycssl7oWfq6Kl9I_CUlJAMDvgR_ikvp6ugJxuQCTlmJ399AzoenJMrN_GcudcIdVviopUwTIipVZfsXrHRShZXh9hoSwt6Hxc8hYy2fHsOOhYeQ1k7pheZD_U_obAkuZa31I_0EqkkTAEgKJ0MIw0NQKQcL9SvqB0cvowj1j_mAfgEc519SDSqtfUkeX8if36Y10jJPok-ieczFKAQn5V_0VhSAoCUXM9gsNArOo2K8BxU8N5gwFWnJIYIkEHQBxO2IC4w5W14wftU1Ysh0kzNWFSAR4obKmUVZMSr04pHu-3bd_aHadTd9zCUtrmFB3bHkCgOYidpYNpy0xLiJDWSFDAQAB",
      "clientDataJSON": "eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoiLThHZXZjMzVlOVlremxvY05DbjhxRWdMN1ZLZDZSeDlac3NsTkw4SWE2QSIsIm9yaWdpbiI6Imh0dHBzOi8vZGV2Lm5ldHBhc3Nwb3J0LmlvIiwiY3Jvc3NPcmlnaW4iOmZhbHNlfQ"
    },
    "type": "public-key"
  }
}

from simplewebauthn.

MasterKale avatar MasterKale commented on May 12, 2024 1

Good news, I was able to successfully fix the original error mentioned at the beginning of this issue!

error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag

It turns out RSA support wasn't nearly as baked as I thought. Suspiciously short public keys I was getting back from Attestation were due to the library trying to convert RSA keys to PKCS format as though they were ECC keys.

This doesn't solve any TPM-related issues as it turns out I'd been getting None type attestations with RSA public keys instead of the TPM attestations I was hoping for.

from simplewebauthn.

MasterKale avatar MasterKale commented on May 12, 2024 1

@yaron14 I confirmed that I received the same "Certificate contained incomplete subjectAltName data" error with that TPM attestation you posted above.

I'm happy to report that I was able to solve the issue 🎉

Here's output from the fixed verifyAttestationResponse() for that TPM attestation:

{
  "verified": true,
  "userVerified": true,
  "authenticatorInfo": {
    "fmt": "tpm",
    "counter": 0,
    "base64PublicKey": "pAEDAzkBACBZAQC0ciFRFbWRy-FM8K7FKCWx1xQ9lkpjErkYnun5Fbu6h8OeXpPdngMam85Kf56JRuwKPtwz-cToz-wjjQ7Bpg--EaBE4_WEoQc6lfEoShDSAa2gvf1rKhOoe4quaRu3lxpqGCp5qRSbKET3SWYSphrfo6AD_qQ2X8safYhnRb7WatyTP42qKCwzWX0J4JovMG4d_zteT1q3wljbp2XGxcF9qPTHhqSjj2h20DeP4dDS-TZzLsytSYCswpBE-WvEElcIslIhmFdmnbRY5UMECR9tkyp3NfwHBGqP_uZVwilxRC3rVTuGWSNm9pdqrgADnLftVeKSNGU22tnMxyNb-4MVIUMBAAE",
    "base64CredentialID": "LVwzXx0fStkvsos_jdl9DTd6O3-6be8Ua4tcdXc5XeM"
  }
}

I'll release a new version in a day or two with this fix.

from simplewebauthn.

aseigler avatar aseigler commented on May 12, 2024 1

@yaron14 I confirmed that I received the same "Certificate contained incomplete subjectAltName data" error with that TPM attestation you posted above.

FYI, I am currently chasing down an issue that sounds suspiciously like this one. There are apparently two SAN configurations in the wild, one that is 100% per spec, and another that is slightly off. Thread: passwordless-lib/fido2-net-lib#187

from simplewebauthn.

yaron14 avatar yaron14 commented on May 12, 2024 1

@MasterKale Sure! I'll test and make you notice about it.
And after testing it I'll add the TPM assertion response here.

from simplewebauthn.

yaron14 avatar yaron14 commented on May 12, 2024 1

Attestation:

{ "id": "ryoAn12QaYeC5t21-E4U2kV92VbFWOBMfdXFa7KMkpY", "rawId": "ryoAn12QaYeC5t21-E4U2kV92VbFWOBMfdXFa7KMkpY", "response": { "attestationObject": "o2NmbXRjdHBtZ2F0dFN0bXSmY2FsZzn__mNzaWdZAQA3gSb0KX3ANQz4XdqVh1NUGn2vgjw2cHdmsySEfDPaBH1mPglMyRkl9bV5Bo4eeU4j1rympeJxBBXBj4xw6NbBEzEIRQnoJv5sLvbxpYTl0alB6qYiid3csTP8NG3OpbP2bbPSTxA47lq3meKH0TlKajINCbGYg-RMdHeU2AoFV7OKlGhlWVnLbzAtF8cwfLtDQk1XQul_LF7HrB-bz7YqtG2QlemwuO5PoDqzmNBexGgZlXh4KpLlHinOcg9jybJ7sStAOy_cUbUzK-RM_C8vSzEDeyHtDKvjLesMLZ3uruNCAHW2iK5JuCGKehto1MC3r_FtnE33aJMinJIGw-FeY3ZlcmMyLjBjeDVjglkFxDCCBcAwggOooAMCAQICEGoHJ5pU80VnnGzPa5PrxlkwDQYJKoZIhvcNAQELBQAwQTE_MD0GA1UEAxM2RVVTLVNUTS1LRVlJRC0xQURCOTk0QUI1OEJFNTdBMENDOUI5MDBFNzg1MUUxQTQzQzA4NjYwMB4XDTIwMDgyNzE1MTIzMFoXDTI1MDMyMTIwMjkxNVowADCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKkVhLA9cKyViKaVr6wwKqzty1AKR0VJGa3BB3QF7IfK81mfqv-x31Y0V0zPioxYgPHHfF4j4XPm5mVlQI9PluM828elk86kwPV-OFlhIX7nM1Hy9NQtgnfyV-7Kxmb3pKe2TI937XrtuJj0pKUav3g0RtPUZDywpWBVDCI4AopqLVyys8bse_bZdDI-l8IDqpzpt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a7KMkpY", "rawId": "ryoAn12QaYeC5t21-E4U2kV92VbFWOBMfdXFa7KMkpY", "response": { "authenticatorData": "1SRyTxX3ZRPlgVm0GhVJBlbIVMz6sMxM4BbUMt-DWGcFAAAAAQ", "clientDataJSON": "eyJ0eXBlIjoid2ViYXV0aG4uZ2V0IiwiY2hhbGxlbmdlIjoibDVmb3JLampkV2FxR1lmX042bnhlZXdJY04tbkFJNUM5bDJvU0ZiWlZDVG0yaUNQUUEtblhvbFh4QmxVOE1OQ2RrMlJyejRHRU01N09WUFFLNVVxb1EiLCJvcmlnaW4iOiJodHRwczovL2Rldi5uZXRwYXNzcG9ydC5pbyIsImNyb3NzT3JpZ2luIjpmYWxzZX0", "signature": "B5qOGZZK4BBlY9vifFnZIl-XPQOVeIlIrEsiYaJQYsuw8lUeCNZ05opj41ZAVsiyBRMrbJiBRMVyL3PPw4lJXcPotU7hNKj5YlDoFAEx8GMStfDy5bhOQf8HT_Cei-sy-Vo6xPQ-SnSDZxyIQ91Zwv3BK923iG0RI4o2nnYvp5WV3iQF4I_Ll5xoib0DzTK-2swPwoXZHIA8uFUyAf-d43sjYislJa9cIbCI5pcjTwFU5fjX4o7DXscHzDZCcRXGoSZcKLEN8CBY1EjkJs7rD5UWbgqtXux1erT5U4F9UJ5BK8bNhSt018nExU3rXdoinFMvOccUVAvBkp3KLQ424g", "userHandle": "MEdpcVNPK0c4WE5zb3l1ZVBjRzB2VGRTMitiNzlKWUNlSlJtRGZqSVlHbz0" }, "type": "public-key" }

from simplewebauthn.

MasterKale avatar MasterKale commented on May 12, 2024 1

@yaron14 You rock, thank you! 👏

from simplewebauthn.

MasterKale avatar MasterKale commented on May 12, 2024

Aha, I was wondering when this would come up. I've been aware of this for some time now. If I remember correctly I got as far as discovering that the public key the TPM authenticator returns during attestation is surprisingly short - maybe 16 characters? This strange "public key" causes issues with signature verification at the end of an assertion verification, which is the error you're seeing.

I've had a branch with a unit test on it that recreates this exact same error you're experiencing. I've gone ahead and drafted a WIP PR #50 to eventually contain the fix for this issue.

from simplewebauthn.

yaron14 avatar yaron14 commented on May 12, 2024

Thanks!
Waiting for your next update to install it as a package dependency.

from simplewebauthn.

MasterKale avatar MasterKale commented on May 12, 2024

@yaron14 Can you do a Start Menu search for "TPM", click "Security Processor", and then provide a screenshot here of your "Security processor details" screen? It'll look like this:

paste

I'm wondering what your "Attestation" status is. If it's "not ready" like mine then it might mean there's something at the OS/BIOS level that needs to be adjusted to get it to a "Ready" state. This might be a symptom of a mis-configured system preventing valid public keys from being returned in a TPM attestation, which causes assertions to fail.

from simplewebauthn.

yaron14 avatar yaron14 commented on May 12, 2024

image

I've already tried and tested WebAuthn with some demos and libraries and my TPM authenticattor worked fine.
I believe it relates to what you've said earlier that the public key that been generated is really short and for some reason it failed the signature verification phase.

from simplewebauthn.

MasterKale avatar MasterKale commented on May 12, 2024

I assumed SimpleWebAuthn would handle TPM fine because it passes the FIDO Conformance test which include TPM assertions, but for some reason in the real world something isn't working as expected.

Is there another library in which your same setup handles TPM assertions just fine? I'd be curious to compare notes.

Can you show me how you're calling generateAttestationOptions()? That'll help me recreate your conditions.

For that matter would you be able to provide attestation options from a WebAuthn demo that does work? I wonder if there's an optimal set of Attestation options specifically for TPM that will generate a proper public key, and perhaps by attempting to simplify things I've chosen initialized values that can be tweaked to handle more use cases.

from simplewebauthn.

MasterKale avatar MasterKale commented on May 12, 2024

I put in some time yesterday trying to get my Windows 10 PC to fix that "Attestation: Not ready" issue. Even after (finally) upgrading to 2004, enabling Secure Boot, and resetting TPM, though, I still can't get it to show "Ready".

I discovered afterwards that in this state I've actually been getting "packed" attestations! It's still true that the public key the authenticator returns is malformed (it also means I haven't actually been able to test SimpleWebAuthn's TPM support in real-world conditions! 😬)

I know I've asked for a lot of data from you, but I have another request: can you provide a raw attestation using those above options? I'd love to dig into it to see if it is indeed a TPM attestation, or a Packed attestation like I've been getting.

from simplewebauthn.

MasterKale avatar MasterKale commented on May 12, 2024

@yaron14 That's a "none" type attestation:

{
  "id": "QdiHnAdxCTeVpw2Up2QYdbTG1fQFLwfdELRHvyyZg10",
  "rawId": "QdiHnAdxCTeVpw2Up2QYdbTG1fQFLwfdELRHvyyZg10",
  "response": {
    "clientDataJSON": {
      "type": "webauthn.create",
      "challenge": "-8Gevc35e9YkzlocNCn8qEgL7VKd6Rx9ZsslNL8Ia6A",
      "origin": "https://dev.netpassport.io",
      "crossOrigin": false
    },
    "attestationObject": {
      "fmt": "none",
      "attStmt": {},
      "authData": {
        "rpIdHash": {
          "type": "Buffer",
          "data": [213,36,114,79,21,247,101,19,229,129,89,180,26,21,73,6,86,200,84,204,250,176,204,76,224,22,212,50,223,131,88,103]
        },
        "flagsBuf": {
          "type": "Buffer",
          "data": [
            69
          ]
        },
        "flags": {
          "up": true,
          "uv": true,
          "at": true,
          "ed": false,
          "flagsInt": 69
        },
        "counter": 0,
        "counterBuf": {
          "type": "Buffer",
          "data": [0,0,0,0]
        },
        "aaguid": {
          "type": "Buffer",
          "data": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
        },
        "credentialID": "QdiHnAdxCTeVpw2Up2QYdbTG1fQFLwfdELRHvyyZg10",
        "credentialPublicKey": "pAEDAzkBACBZAQDJyyyXuhZ-roqX0j8JSUkAwO-BH-KS-nq6AnG5AJOWYnf30DOh6ckys38Zy51wh1W-KilTBMiKlVl-xesdFKFleH2GhLC3ofFzyFjLZ8ew46Fh5DWTumF5kP9T-hsCS5lrfUj_QSqSRMASAonQwjDQ1ApBwv1K-oHRy-jCPWP-YB-ARznX1INKq19SR5fyJ_fpjXSMk-iT6J5zMUoBCflX_RWFICgJRcz2Cw0Cs6jYrwHFTw3mDAVackhgiQQdAHE7YgLjDlbXjB-1TViyHSTM1YVIBHihsqZRVkxKvTike77dt39odp1N33MJS2uYUHdseQKA5iJ2lg2nLTEuIkNZIUMBAAE"
      }
    }
  },
  "type": "public-key"
}

attestationType: 'none' in your call to generateAttestationOptions() will only get back from the authenticator the most basic of attestations - your browser will never attempt an TPM attestation.

Can you try again with attestationType: 'direct'?

from simplewebauthn.

yaron14 avatar yaron14 commented on May 12, 2024

I'm getting the following error:
Error: Certificate contained incomplete subjectAltName data (TPM)

It's from verifyTPM.js file

from simplewebauthn.

MasterKale avatar MasterKale commented on May 12, 2024

Aha, an actual TPM attestation appears. Can you share that here?

from simplewebauthn.

yaron14 avatar yaron14 commented on May 12, 2024

{ "id": "LVwzXx0fStkvsos_jdl9DTd6O3-6be8Ua4tcdXc5XeM", "rawId": "LVwzXx0fStkvsos_jdl9DTd6O3-6be8Ua4tcdXc5XeM", "response": { "attestationObject": "o2NmbXRjdHBtZ2F0dFN0bXSmY2FsZzn__mNzaWdZAQAVTQGgcWtxs9VV4i1gQTcdXfoyZwupUnZjebIIzuq77nBe_EyxS4Fh8Go2vCdVnpHLXHsVct1ISZ8fmSB31YrnuaHpvxjTN-k0t3ynOwJY9SZd4uxX9KQUOMpjhWsQczpNL72J7wd4VckeU6oHvq-z9x6Oqfk1KbmzRu-ZdrUikYkM1uCXqk9h0P1MpeaoxFoLiS-2Vz1MZENB2-N-tC_ljwoUsAOBiE3MRfp2e_LCe4oRWCvhJn7qiVglQOnQWTtoky_FOKqJtPqt59v74C3rin8reNmNwXD1l0XljOYQaujLOMGut63CwtlpAgBN8IPHNWnukzv0X5VY0KjBT6DbY3ZlcmMyLjBjeDVjglkFxDCCBcAwggOooAMCAQICEGoHJ5pU80VnnGzPa5PrxlkwDQYJKoZIhvcNAQELBQAwQTE_MD0GA1UEAxM2RVVTLVNUTS1LRVlJRC0xQURCOTk0QUI1OEJFNTdBMENDOUI5MDBFNzg1MUUxQTQzQzA4NjYwMB4XDTIwMDgyNzE1MTIzMFoXDTI1MDMyMTIwMjkxNVowADCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKkVhLA9cKyViKaVr6wwKqzty1AKR0VJGa3BB3QF7IfK81mfqv-x31Y0V0zPioxYgPHHfF4j4XPm5mVlQI9PluM828elk86kwPV-OFlhIX7nM1Hy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cmlnaW4iOmZhbHNlfQ" }, "type": "public-key" }

from simplewebauthn.

yaron14 avatar yaron14 commented on May 12, 2024

YAY!
Thank you! I'm waiting for the new release :)

from simplewebauthn.

MasterKale avatar MasterKale commented on May 12, 2024

@yaron14 This issue should be fixed as of the newly-published v0.9.0. RSA support in general should be greatly improved, even if fmt is "none" as in an earlier example above.

And while I have your attention, I've been unable to procure a device capable of producing actual TPM attestations. I'm hoping you can test out both attestations and assertions with the new version of the library and report back on how it goes.

Also, I'd like to request a TPM assertion response from you as well. I need one to round out my unit testing so I can feel more confident about being able to support these types of devices for both scenarios.

from simplewebauthn.

yaron14 avatar yaron14 commented on May 12, 2024

@MasterKale, its working superbly! Thanks.
You should have had to inform me about the change of serviceName property though as I received an error in startAttestation and had no idea what to do until I looked at the changes you've made to the new version :)

This is the TPM assertion you've asked for:

{ "id": "7NtSkjQY3AsVB2SWw0jZhYerjOAJo4tqOYXM-dNw7FE", "rawId": "7NtSkjQY3AsVB2SWw0jZhYerjOAJo4tqOYXM-dNw7FE", "response": { "authenticatorData": "1SRyTxX3ZRPlgVm0GhVJBlbIVMz6sMxM4BbUMt-DWGcFAAAAAg", "clientDataJSON": "eyJ0eXBlIjoid2ViYXV0aG4uZ2V0IiwiY2hhbGxlbmdlIjoiMS1tUVp5U2x5MDdmRlhwY19OMGYxYUZEa19uUnJXWUIwV1FYX3dZOTBMYkJXeFU4QmRTaUNyZnFXRXRUSWY3Ym51VFVPN1M3WTlsQm5fS21ldlJuWGciLCJvcmlnaW4iOiJodHRwczovL2Rldi5uZXRwYXNzcG9ydC5pbyIsImNyb3NzT3JpZ2luIjpmYWxzZX0", "signature": "qKfneac-UwlxCnxd_D23VHO8RAKbaBG0s1dTIi2FrLyOunyr7mzpJgQT-iKjaTl5Vh8lJrBtM7J88zj2r8KuDXHqPTDsuNKqP_-RezJq6Jbr8ctlx-u8hl3CVhv1hkrSQjb1Oisk54esJ7BYJowojLT6Q1e5002JBC0Urt0ic7IDZ65YDle2Xuu30FXSvQrbfWe51G0LDgnAZKpCE8Fga7Arp8Kh82EXoZ5CpK9YqDHe_WYeCYXLF39-Vi03_eVAyO89aoVaI0gUKeifFcHnf3L1p88PjjUK0JbItyhvqXz1CjG5Adfg6hMZSOID11AWm3mcU_bCM-f9f0nre9e2hQ", "userHandle": "cXM4VjR6VDUxeHRWSWZzaGxzeVJRS3o1enBscExqWTJpRGlmWjk1MEdGdz0" }, "type": "public-key" }

from simplewebauthn.

MasterKale avatar MasterKale commented on May 12, 2024

You should have had to inform me about the change of serviceName property though as I received an error in startAttestation and had no idea what to do until I looked at the changes you've made to the new version :)

Yikes, sorry about that! I'll make a point of highlighting things like that when addressing future issues 🙇

This is the TPM assertion you've asked for:

Argh, the id in the assertion is different than the id in the attestation from a few days ago. I suppose I should have asked for a pair of attestation+assertion as the assertion is no good if I don't have the public key from the preceding attestation. Can I bother you for another set? 😅

from simplewebauthn.

MasterKale avatar MasterKale commented on May 12, 2024

Closing this out as the issue has been confirmed resolved 🚀

from simplewebauthn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.