3 ms·
> Nowhere in the spec did I see where ngrok.io should be excluded as a valid rp id, I looked pretty intently but could have missed something. Just like with loc
by jeroenhd 5y ago
> Nowhere in the spec did I see where ngrok.io should be excluded as a valid rp id, I looked pretty intently but could have missed something. Just like with localhost this was purely a way to cheaply get tls to simulate a more real implementation.
It's in the spec, though you need to click a few links to get to the details. The WebAuthn spec (https://www.w3.org/TR/webauthn-2/ https://www.w3.org/TR/webauthn-2/) has the following in the terms defined by reference:
> is a registrable domain suffix of or is equal to
This references the following page: https://html.spec.whatwg.org/multipage/origin.html#is-a-registrable-domain-suffix-of-or-is-equal-to https://html.spec.whatwg.org/multipage/origin.html#is-a-regi...
Which contains a reference to a "public suffix": https://url.spec.whatwg.org/#host-public-suffix https://url.spec.whatwg.org/#host-public-suffix
Which references the Public Suffic List: https://publicsuffix.org/list/ https://publicsuffix.org/list/
Which ngrok.io is on: https://publicsuffix.org/list/public_suffix_list.dat https://publicsuffix.org/list/public_suffix_list.dat
So, this limitation is in the spec, it's just not immediately obvious if you skim through the spec to find the problem.
The public suffix list ensures that you cannot accidentally share your authentication domain with others for all kinds of security measures, and WebAuthn is just one of those. Learning about the PSL and its uses (and applied limitations) is imperative if you write any kind of security-related web content, IMO.
- qudat 5y agoI must have missed that! I did meander my way to the public suffix list at some point but I must not have searched it properly. Thanks!