-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
[1.2.1] Custom Relying Party Id does not pass CheckRelyingPartyIdContained pipe #50
Comments
Okay. Basically, I need to fix this by extracting the domain from the |
I am going to add also other steps. So I was able to get through this (for now) by doing this:
I would suggest maybe adding a config for this or something. But I run into another issue here:
File: Attestation/AuthenticatorData Line 117
This registers properly. I know this isn't the cleanest, but I had to work on my development while waiting on a fix. EDIT:
|
@DarkGhostHunter Will you be able to create the fix for this or would you like me to create a PR for this as well? |
Please, help me with the PR. Currently hands full. |
PHP & Platform
8.1.22
Database
No response
Laravel version
10.16.1
Have you done this?
Expectation
Setting a custom Relying Party Id in the
.env
file should allow to register new webauthn devices.Description
Following the Laragear/webauthn documentation:
WebAuthn/README.md
Lines 605 to 609 in 7e62ec9
If I set
WEBAUTHN_ID=https://my.domain.com
the registration ceremony fails because the RP-ID is not valid. Indeed, regarding the Webauthn W3C recommandation, the RP ID should be a domain, not an URL. Using such an URL makes the webauthn API throwing aSecurityError
(see https://www.w3.org/TR/webauthn-2/#CreateCred-DetermineRpId)But if I set
WEBAUTHN_ID=my.domain.com
, the registration ceremony also fails but this time because theCheckRelyingPartyIdContained
does not pass because of the way$current
is defined:WebAuthn/src/SharedPipes/CheckRelyingPartyIdContained.php
Lines 46 to 48 in 7e62ec9
Using
parse_url()
with thePHP_URL_HOST
flag will return nothing, causing the next evaluation to fail:WebAuthn/src/SharedPipes/CheckRelyingPartyIdContained.php
Lines 51 to 53 in 7e62ec9
Reproduction
// Set WEBAUTHN_ID=my.domain.com and try to register a new device
Stack trace & logs
No response
The text was updated successfully, but these errors were encountered: