-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
U2F registration returns NotTrustedAnchor #272
Comments
This is probably due to broken certs in the key; Will try to verify if this is the case. |
Seeing as this is a problem for more people, I'm looking into a possible solution. Checking the other libraries that already deal with this issue, I published a new branch that should hopefully detect it (but not fix it, for now): https://github.com/dani-garcia/bitwarden_rs/tree/trustanchor-fix Running this should print in the console something like:
And if it detected the cert as one of the broken ones, it would also print @mprasil Can you get a docker image built, so those using docker can test this issue? @neoautomata, @Jellyfrog can you check this branch and see if it detects the issue? |
Weirdest thing, I can now register my key.
|
The image is just being built, give it about an hour and then you can use |
Using that Image I get the following in the server logs:
|
My other key has a different hash:
|
Same key, different computer:
|
With Firefox it always works for me, and it returns the same cert each time:
With Chrome it returns different data each time and never works;
Note the different cert length also. |
This should have been fixed now in 9d027b9, hopefully. |
Just pulled down |
Do you still get the NotTrustedAnchor error, or is it something different this time? |
Yes, same NotTrustedAnchor error. I also got a pop up from chrome asking to read make and model of the key, which I've never seen on any site before. |
The popup is expected, it's to avoid Chrome from sending us self-signed certificates instead of the devices actual certificate. Can you tell me what do you get now running the |
Sorry it has taken me a bit to respond, was out of town. Here's the error from the lastest
|
Okay, with some more testing using that cert, I found the cause of the problem, the cert doesn't have an extensions field with a SubjectAltName, and webpki requires it, there is a recent bug about it here: briansmith/webpki#90. This makes sense for SSL certificates, which is what the library was made for, but apparently some U2F devices don't have those required values. There is a pending issue for U2F attestation support that mentions that change, but it hasn't seen activity in a while: briansmith/webpki#57. I'm not sure there is something we can do here for now, and I don't think it would be particularly safe for us to try to add a random SubjectAltName whenever we get an error. |
Just bumped into this. The weirdest thing is, I've only seen this upon trying to add a second key to my account - which is weird, as I somehow was able to add the first one :D Just to make sure I get the whole picture: does this effectively preclude usage of fido u2f until the referenced bugs are resolved? |
When registering an U2F key (Yubikey) server fails with
Error: NotTrustedAnchor
, which seems to come from here: https://github.com/wisespace-io/u2f-rs/blob/193de35093a44576edba6cc94d9b54f2a1cbdcd1/src/register.rs#L50At first I thought it was the reverse proxy, but same result using it directly with Rocket.
bitwarden_rs @ 0f6ab01f777700c68aee8fcf0cbf0be742c286e1
web-vault @ v2.5.0
FreeBSD 11.2-RELEASE-p5
Config
Log:
PUT request returns:
The text was updated successfully, but these errors were encountered: