simplesamlphp / simplesamlphp-module-webauthn

A module implementing FIDO2 / WebAuthn as a second authentication factor
GNU Lesser General Public License v2.1
15 stars 8 forks source link

Cannot Register a device on SimpleSAMLphp-2.1 #57

Open libregeek opened 9 months ago

libregeek commented 9 months ago

Installed SimpleSAMLphp-2.1 on a PHP-8.1 environment and installed Webauthn module using composer. Webauthn is configured as a process filter for two-factor authentication.

SimpleSAMLphp is redirected to the Webauthn registration page after successful authentication. But after validating the device the following error occurred:

SimpleSAML\Error\Error: UNHANDLEDEXCEPTION
Backtrace:
2 src/SimpleSAML/Error/ExceptionHandler.php:35 (SimpleSAML\Error\ExceptionHandler::customExceptionHandler)
1 vendor/symfony/error-handler/ErrorHandler.php:541 (Symfony\Component\ErrorHandler\ErrorHandler::handleException)
0 [builtin] (N/A)
Caused by: Symfony\Component\ErrorHandler\Error\ClassNotFoundError: Attempted to load class "TagObjectManager" from namespace "CBOR\Tag".
Did you forget a "use" statement for another namespace?
Backtrace:
7 modules/webauthn/src/WebAuthn/WebAuthnAbstractEvent.php:435 (SimpleSAML\Module\webauthn\WebAuthn\WebAuthnAbstractEvent::cborDecode)
6 modules/webauthn/src/WebAuthn/WebAuthnRegistrationEvent.php:79 (SimpleSAML\Module\webauthn\WebAuthn\WebAuthnRegistrationEvent::__construct)
5 modules/webauthn/src/Controller/RegProcess.php:122 (SimpleSAML\Module\webauthn\Controller\RegProcess::main)
4 vendor/symfony/http-kernel/HttpKernel.php:163 (Symfony\Component\HttpKernel\HttpKernel::handleRaw)
3 vendor/symfony/http-kernel/HttpKernel.php:75 (Symfony\Component\HttpKernel\HttpKernel::handle)
2 vendor/symfony/http-kernel/Kernel.php:202 (Symfony\Component\HttpKernel\Kernel::handle)
1 src/SimpleSAML/Module.php:234 (SimpleSAML\Module::process)
0 public/module.php:17 (N/A)
restena-sw commented 9 months ago

I have myself not deployed on 2.1 yet (but the module does work on 2.0.6). Any chance you can try with 2.0.x and see if the error is reproducible there?

tvdijen commented 9 months ago

This error should not happen with v2.1 of this module. It seems as if you have an older version of the module.

libregeek commented 9 months ago

I have myself not deployed on 2.1 yet (but the module does work on 2.0.6). Any chance you can try with 2.0.x and see if the error is reproducible there?

@restena-sw I have tried with SSP-2.0 earlier and Webauthn-2.1.1 works fine. However, I wanted to try out the precondition feature in SSP-2.1 to use two MFA plugins. Currently, the environment runs SSP-2.1 and the master branch from Webauthn.

libregeek commented 9 months ago

This error should not happen with v2.1 of this module. It seems as if you have an older version of the module.

I am using the master branch from Github. Perhaps, I missed running the composer. Let me check and get back to you.

restena-sw commented 9 months ago

I just tested with master against 2.1.0 (slim build) on PHP 8.1 composer. All worked as expected.