Giter VIP home page Giter VIP logo

fido2-library's People

Contributors

apowers313 avatar dependabot[bot] avatar florianbepunkt avatar goldenbearkin avatar jamescullum avatar jbyoshi avatar jedrivisser avatar martinord avatar sachaw avatar strugee avatar vigan-abd avatar wesseldr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fido2-library's Issues

Error EINTEGRITY on installation

when i try to install it with
npm i --save fido2-library

I get this error

npm ERR! code EINTEGRITY
npm ERR! sha512-rMySX7kJkQaFPNQxkwUEN3RdGFiUqRw8WIZPgggdyRdL1IH7mKjWgOcZwGWoUQBUAKgE6YYbEETGE0N1S7I6VA== integrity checksum failed when using sha512: wanted sha512-rMySX7kJkQaFPNQxkwUEN3RdGFiUqRw8WIZPgggdyRdL1IH7mKjWgOcZwGWoUQBUAKgE6YYbEETGE0N1S7I6VA== but got sha512-VLRAcYdF+nZcgiDBM8AjKRkDyQIe5sNMySr4YaxR210yxsjvqGyOAbM5GW0ZzqOPIRhqQOuAYWxrtFoifphIng==. (93368 bytes)

Ubuntu 20.04.2
node 14.17.0
npm 6.14.13

Integrity Check Error

Hi,

I'm getting following error while installing fido2-library

` tarball data for fido2-library@https://registry.npmjs.org/fido2-library/-/fido2-library-2.6.0.tgz (sha512-rMySX7kJkQaFPNQxkwUEN3RdGFiUqRw8WIZPgggdyRdL1IH7mKjWgOcZwGWoUQBUAKgE6YYbEETGE0N1S7I6VA==) seems to be corrupted. Trying again.

tarball data for fido2-library@https://registry.npmjs.org/fido2-library/-/fido2-library-2.6.0.tgz (sha512-rMySX7kJkQaFPNQxkwUEN3RdGFiUqRw8WIZPgggdyRdL1IH7mKjWgOcZwGWoUQBUAKgE6YYbEETGE0N1S7I6VA==) seems to be corrupted. Trying again.

EINTEGRITY
sha512-rMySX7kJkQaFPNQxkwUEN3RdGFiUqRw8WIZPgggdyRdL1IH7mKjWgOcZwGWoUQBUAKgE6YYbEETGE0N1S7I6VA== integrity checksum failed when using sha512: wanted sha512-rMySX7kJkQaFPNQxkwUEN3RdGFiUqRw8WIZPgggdyRdL1IH7mKjWgOcZwGWoUQBUAKgE6YYbEETGE0N1S7I6VA== but got sha512-VLRAcYdF+nZcgiDBM8AjKRkDyQIe5sNMySr4YaxR210yxsjvqGyOAbM5GW0ZzqOPIRhqQOuAYWxrtFoifphIng==. (93368 bytes)`

Missing allowCredentials in PublicKeyCredentialRequestOptions

Hello @JamesCullum,

as specified by WebAuthn specification the options for assertion generation (PublicKeyCredentialRequestOptions) also include allowCredentials field to filter what credentials could be used during login process. However I see that the library does not include this option. I'am working on adding this. When I'll finish, I'll send a pull request to you. Let me know if this is ok for you.

Thank you,

Enrico.

SHA512 check failing on npm

Hi @JamesCullum seems that there's an issue in npm with latest release (v2.6.0)

root@scw-221e2d:~/dev# npm i [email protected]
npm ERR! code EINTEGRITY
npm ERR! sha512-rMySX7kJkQaFPNQxkwUEN3RdGFiUqRw8WIZPgggdyRdL1IH7mKjWgOcZwGWoUQBUAKgE6YYbEETGE0N1S7I6VA== integrity checksum failed when using sha512: wanted sha512-rMySX7kJkQaFPNQxkwUEN3RdGFiUqRw8WIZPgggdyRdL1IH7mKjWgOcZwGWoUQBUAKgE6YYbEETGE0N1S7I6VA== but got sha512-VLRAcYdF+nZcgiDBM8AjKRkDyQIe5sNMySr4YaxR210yxsjvqGyOAbM5GW0ZzqOPIRhqQOuAYWxrtFoifphIng==. (93368 bytes)

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-06-11T16_08_04_700Z-debug.log

The issue seemed to happen on different environments, also got a fresh copy of package and compared sha512 manually and it was returning VLRAcYdF+nZcgiDBM8AjKRkDyQIe5sNMySr4YaxR210yxsjvqGyOAbM5GW0ZzqOPIRhqQOuAYWxrtFoifphIng== (hex: 54b440718745fa765c8220c133c023291903c9021ee6c34cc92af861ac51db5d32c6c8efa86c8e01b339196d19cea38f21186a40eb80616c6bb45a227e98489e).
Could you please investigate it further?

Counter handling if counter is not supported (e. g.) safari

Currently Safari supports webauthn, but the counter is always set to zero.

The signature counter is not implemented and therefore it is always zero. Secure Enclave is used to prevent the credential private key from leaking instead of a software safeguard.

(Source: https://webkit.org/blog/11312/meet-face-id-and-touch-id-for-the-web/)

I would propose that the prevCounter verification step is skipped in validation if the prevCounter expectation and the counter value submitted in the client authData is both 0. This in line with Ackermann Yuriy's recommendation

If counter in DB is 0, and response counter is 0, then authr does not support counter, and this step should be skipped

https://herrjemand.medium.com/verifying-fido2-responses-4691288c8770

Current behavior is that WebAuthn fails on WebKit browser due to rollback error.

EDIT: Created a PR #8

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.