Closed chrisdlangton closed 3 years ago
Support for tokenBinding
across browsers has been..."inconsistent"...to date. As such it is currently being considered for deletion from L3 of the WebAuthn spec.
Due to this I don't plan on supporting tokenBinding in the library revamp I'm preparing (see here), nor is it likely that any work will be done on the current iteration of the library to refactor this code...
@MasterKale I see, reading the related material and doing some research of my own I believe I understand the perceived issue.
From the reports it seems that there are some implementations on the client devices that are inconsistent, however many (namely Yubikey) adhere to the spec and the server is capable of authenticating the client identity / public key in a way that would avoid certain MitM and replay attacks.
Therefore a decision to remvoe sserver-side verification, without a replacement mechanism designed to meet or exceed the intent (the security characteristics) of the removed functionality, seems immature at best, negligent when we start discussing the spec. Because the reason of removal is because the client devices we are attempting to authenticate are failing to meet the spec NOT that teh spec is incorrect..
Adding a compromise, if you chose to continue with deprecation (hopefully with a sufficiently secure replacement feature) then perhaps you might follow a normal deprecation strategy?
_verify_token_binding_id
_verify_token_binding_id
will be removed.Note: Logging does not functionally change this code. Also code comments do not functionally change the code, so it is probably decent to link to the decision rationale in the code.
The newly-released v1.0.0 features an attempt to parse "tokenBinding"
in clientDataJSON, passing on it if it's malformed (based on experience with responses from actual older security keys). Validation of token binding status will only take place if the status was valid during parsing, otherwise that check is skipped.
If you see room for improvement with this new mechanism I welcome any PR's to enhance it.
https://github.com/duo-labs/py_webauthn/blob/master/webauthn/webauthn.py#L1285
It only checks the
tokenBinding.status
and never uses thetoken_binding_id
variable or verify theid
as the function name and documentations suggests.Perhaps the implementer should implement the verification? If so, the function is inappropriate and should be renamed to describe the functionality it provides (and be documented to describe this too). In it's current form it misleads the implementer into believing they are using the function to actually do verification and the intent of the function implies in it's documentation this is also the function - however it does not..
So what is the proper use by implementers? What is the function actually meant to do? Is this a defect? Is it named and documented incorrectly and it is working as intended (but very differently from the name and description)?