Comments (5)
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.
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.
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.
Version 1.1.2 is now released and should hopefully resolve this.
from python-fido2.
I raised #197 before I saw this issue.
from python-fido2.
Related Issues (20)
- > Create gh pr checkout 76 #228
- Please support `cryptography` version `>=40` HOT 1
- Test fails on RHEL9 due to sha1 removal HOT 6
- secret retrieval part of `hmac_secret.py` example doesn't work with GoTrust Idem webauthn key
- multiple device selection errors out with `PIN_NOT_SET` HOT 1
- `WinAPI` does not implement extensions HOT 3
- Login with fingerprint HOT 6
- Simple files from examples directory do not work on Trezor model T HOT 8
- How to mimic `navigator.credentials.get` HOT 2
- ES384 and ES512 fail on verify() HOT 1
- FIDO2 over PCSC HOT 3
- fido2.webauthn.AttestedCredentialData.__init__ is missing type annotation HOT 3
- Doc string out of sync
- No Serial number in dev property HOT 1
- CBOR_UNEXPECTED_TYPE HOT 1
- occasional `Unexpected run loop exit code: 3` printed to stderr when prompting for UP HOT 5
- Importing `fido2.hid` causes `Abort trap: 6` on macOS 13.6.5 HOT 4
- Not showing account information in resident keys example HOT 3
- missing 1 required positional argument: 'extensions'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-fido2.