mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-26 09:46:00 +03:00
[GH-ISSUE #1803] Webauthn Request Failing #1060
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#1060
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @quexten on GitHub (Jun 28, 2021).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1803
Subject of the issue
On the new v1.22.0 image, registering a new Webauthn key does not work.
I am using a Yubikey, and when registering the put request to
/api/two-factor/webauthnfails with a404400 error.{"ErrorModel":{"Message":"Webauthn","Object":"error"},"Message":"","Object":"error","ValidationErrors":{"":["Webauthn"]},"error":"","error_description":""}Deployment environment
Your environment (Generated via diagnostics page)
Config (Generated via diagnostics page)
Show Running Config
Environment settings which are overridden: WEBSOCKET_ENABLED
Steps to reproduce
Register a key with Webauthn. This results in a
404400 error in the network log, and an error popping up in the web vault.Expected behaviour
The key should be registered.
Actual behaviour
There was an error message.
Troubleshooting data
@BlackDex commented on GitHub (Jun 28, 2021):
I don't see a 404 in the logs.
Cloud you clear/invalidate the Cloudflare cache and try again?
Also maybe try with an Incognito/Private browser/tab
@quexten commented on GitHub (Jun 28, 2021):
I disabled Cloudflare and made sure my browser isn't connecting through Cloudflare. The issue still occurs. As shown in the troubleshooting data the cause seems to be an "InvalidRPOrigin", but I couldn't find a setting in the admin panel to set the RPOrigin. The rpid sent in the webauthn challenge is the domain that I'm accessing the web vault through though. And I had a typo in the issue above, it should be error 400, not 404.
@BlackDex commented on GitHub (Jun 28, 2021):
Well that config is linked to the DOMAIN variable.
But it seems that when generating the support string that does seem to be correct.
Could you try to turn on log_level=debug? And check the logs there?
@BlackDex commented on GitHub (Jun 28, 2021):
Just to be sure.
You do access the site via the browser on the exact same URL, including port, https:// etc... as configured via the DOMAIN config right?
@quexten commented on GitHub (Jun 28, 2021):
Okay, enabling the debug logging helped track down the issue.
The domain URL I had configured was:
https://bitwarden.MY_HOST.com/while it should have beenhttps://bitwarden.MY_HOST.com(without the trailing slash). Before Webauthn this didn't seem to cause an issue, but the debug log stated that this was the cause for the failure, and changing it fixed it.Thanks for the help!
@BlackDex commented on GitHub (Jun 28, 2021):
Ok, good to know, we may need to add some filtering there, or some validation.