Greetings,
I've just set up a SimpleSAMLphp installation inside a Docker container to test a module I'm developing. Previously, I was able to access the admin interface, but it was indicating an error inside saml20-idp-hosted.php. After I fixed the error, if I try to access the admin interface I get a page showing the following exception as debug information:
SimpleSAML\Error\Error: UNHANDLEDEXCEPTION
Backtrace:
2 public/_include.php:28 (SimpleSAML_exception_handler)
1 vendor/symfony/error-handler/ErrorHandler.php:607 (Symfony\Component\ErrorHandler\ErrorHandler::handleException)
0 [builtin] (N/A)
Caused by: SimpleSAML\Error\Exception: Unable to load private key from location "server.pem"
Backtrace:
7 src/SimpleSAML/Utils/Crypto.php:220 (SimpleSAML\Utils\Crypto::loadPrivateKey)
6 modules/admin/src/Controller/Config.php:379 (SimpleSAML\Module\admin\Controller\Config::getPrerequisiteChecks)
5 modules/admin/src/Controller/Config.php:137 (SimpleSAML\Module\admin\Controller\Config::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:14 (N/A)
This looks strange to me because I have a server.pem file inside the cert directory, and if I cat it it also looks fine:
root@853cf3a3d9de:/var/simplesamlphp/cert# cat server.pem
-----BEGIN PRIVATE KEY-----
[redacted]
-----END PRIVATE KEY-----
If instead of only specifying the file name inside the saml20-idp-hosted.php I put the full path, the only difference is that the exception text reports the absolute path of the certificate. What am I getting wrong?
Thank you for your help,
Giacomo Tommaso Petrucci