Unable to enable U2F auth with Yubikey (400 Bad Request) #2083

Closed
opened 2025-10-09 17:44:54 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @Slychocobo on GitHub.

Trying to add U2F to an account, while browser reads the Security key, the process fails when attempting to save with "U2F Error"

Running latest docker-build of Bitwarden_rs.
Site is behind a nginx proxy (using proxy config provided in wiki)

Javascript console reports
zone.js:1152 PUT https://redacted.fqdn/api/two-factor/u2f 400 (Bad Request)

Server reports
[2019-07-07 19:09:52][bitwarden_rs::error][ERROR] U2fError.
,[2019-07-07 19:09:52][_][INFO] Matched: PUT /api/two-factor/u2f (activate_u2f_put)
,[2019-07-07 19:09:52][rocket::rocket][INFO] PUT /api/two-factor/u2f application/json; charset=utf-8:
,[CAUSE] NotTrustedAnchor

Checked app-id.json and it is reporting the correct URL/port

Originally created by @Slychocobo on GitHub. Trying to add U2F to an account, while browser reads the Security key, the process fails when attempting to save with "U2F Error" Running latest docker-build of Bitwarden_rs. Site is behind a nginx proxy (using proxy config provided in wiki) Javascript console reports zone.js:1152 PUT https://redacted.fqdn/api/two-factor/u2f 400 (Bad Request) Server reports [2019-07-07 19:09:52][bitwarden_rs::error][ERROR] U2fError. ,[2019-07-07 19:09:52][_][INFO] Matched: PUT /api/two-factor/u2f (activate_u2f_put) ,[2019-07-07 19:09:52][rocket::rocket][INFO] PUT /api/two-factor/u2f application/json; charset=utf-8: ,[CAUSE] NotTrustedAnchor Checked app-id.json and it is reporting the correct URL/port
Author
Owner

@dani-garcia commented on GitHub:

This is probably the same error as #272 or #105, which means there's not much we can do at the moment. Some keys don't have the SubjectAltName field, (which isn't required for a U2F cert, so some keys don't have them) while the library used for reading them does expect the field to be there. Until those issues are fixed or another library appears there's nothing I can do.

@dani-garcia commented on GitHub: This is probably the same error as #272 or #105, which means there's not much we can do at the moment. Some keys don't have the SubjectAltName field, (which isn't required for a U2F cert, so some keys don't have them) while the library used for reading them does expect the field to be there. Until those issues are fixed or another library appears there's nothing I can do.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#2083