DOMAIN and rp_id should detach in webuthn context #6567
Bert-Proesmans
started this conversation in
General
Replies: 2 comments 1 reply
-
|
Is only a matching host+tld allowed? Else extracting the host+tld with by creating something like allow all sub domains or something might be an option to. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Took a stab at implementing the suggestion; EDIT; I can test this with multiple real users after the webauthn-rs rework lands in stable. There is too much distance between current stable and current master for me to just throw this into production. x) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Given configuration values "domain"(config) and "domain_origin"(config).
Domain(config) defines the full URL to access the vaultwarden application.
Domain_origin(config) defines the canonical origin (scheme + domain name + port)
vaultwarden/src/config.rs
Lines 576 to 580 in 57bdab1
vaultwarden/src/config.rs
Lines 1302 to 1305 in 57bdab1
The webauthn_rs library is initialised with "rp_id"(auth) and "origin"(auth). (RP = relying party aka the browser here)
rp_id(auth) parameter is defined as the "authority" of the authentication environment, used as identification for backend application and security key material.
[rp_]origin(auth) parameter is defined as the location where the relying party makes contact with users/security key.
The rp_id(auth) argument is constructed from the domain name of domain(config). this is basically always a 1-to-1 domain name mapping eg,
The origin(auth) argument is constructed from domain_origin(config), which is itself constructed from domain(config). This summarises to taking the domain name part of domain(config).
So rp_id and rp_origin are always set to equal values. With this constraint the system currently works as expected.
vaultwarden/src/api/core/two_factor/webauthn.rs
Lines 32 to 44 in 57bdab1
But rp_id should become detached from domain(config) to be semantically correct. (rp_origin remains derived from domain(config).)
This will enable replicated setups in the future. The following scenario's becomes instantly possible;
As for how to approach this, my suggestion is to introduces a new configuration parameter ~"webauth_domain" with a default value of
domain(config).origin().domain(). Admins can set this to a custom value, and the webauthn_rs library will make sure this value is correct in relation to rp_originBeta Was this translation helpful? Give feedback.
All reactions