Giter VIP home page Giter VIP logo

Comments (5)

ashleysommer avatar ashleysommer commented on June 12, 2024

Note, I don't think this is related to the use of pinAuth sharedKey encryption on the hmac-secret salt. That part works fine, and when testing with PIN Protocol V1 that payload is sent without UV and without PinAuth token on the request and it still works as expected.

from python-fido2.

ashleysommer avatar ashleysommer commented on June 12, 2024

I worked out the issue. It all comes down to this line in the code.

When PinProtocol is not set on the Client when doing GetAssertion (because uv is false, verification is not required), it sets the PinUVAuthVersion parameter on the GetAssertion request to None, that the FIDO2 spec says it implies Pin Protocol V1. But during the process of encrypting the HMAC-secret salt for the HMAC-secret extension, the code uses PIN Protocol V2 (because that is the default on Token2). That puts the Token2 in a situation where the call is assumed to be using Protocol V1, but the HMAC-secret extension has used Protocol V2.

I don't really know what the solution would be for this. The ClientBackend needs to know if any of the extensions have instantiated a Pin Protocol, and ensure it matches the PIN protocol itself is currently using (or if it doesn't have one, set it).

from python-fido2.

ashleysommer avatar ashleysommer commented on June 12, 2024

Another thing to consider is the fact that Extensions are instantiated and processed (process_get_input()) before the ClientBackend runs _get_auth_params(), where it would normally create its own PinProtocol instance if required. This seems out of order to me. But it can't be the other way around because extensions can define permissions requirements, that are used by _get_auth_params(), so it cannot be the other way around. It seems to me that a PinProtocol instance should always be created as the first operation, then that instance is passed to each of the extensions as they require it, then that same instance is used in _get_auth_params() for creating ClientPIN if required. That would ensure the same PIN Protocol is used consistently across the whole backend.

from python-fido2.

dainnilsson avatar dainnilsson commented on June 12, 2024

Version 1.1.2 is now released and should hopefully resolve this.

from python-fido2.

BryanJacobs avatar BryanJacobs commented on June 12, 2024

I raised #197 before I saw this issue.

from python-fido2.

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.