We have a setup where we use Simple saml as the service provider and Okta as th identity provider.
When we authenticate with this setup we can see that the authentication is successful in Okta and the saml response is valid.
When redirecting back to our application we however receive the error below.
Does anyone know how to fix this?
We tried the following:
error:SimpleSAML\Error\Error: UNHANDLEDEXCEPTION Backtrace: 1 www/_include.php:17 (SimpleSAML_exception_handler) 0 [builtin] (N/A) Caused by: Exception: Unable to extract public key Backtrace: 5 /var/www/devportal/vendor/robrichards/xmlseclibs/src/XMLSecurityKey.php:381 (RobRichards\XMLSecLibs\XMLSecurityKey::loadKey) 4 modules/saml/lib/Message.php:226 (SimpleSAML\Module\saml\Message::checkSign) 3 modules/saml/lib/Message.php:646 (SimpleSAML\Module\saml\Message::processResponse) 2 modules/saml/www/sp/saml2-acs.php:141 (require) 1 lib/SimpleSAML/Module.php:266 (SimpleSAML\Module::process) 0 www/module.php:10 (N/A) remote idp metadata:<?php $metadata['https://sso-idp-provider/identity'] = [ 'entityid' => 'https://sso-idp-provider/identity, 'contacts' => [], 'metadata-set' => 'saml20-idp-remote', 'SingleSignOnService' => [ [ 'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', 'Location' => 'https://XXXXXXXXX/XXXXXXXX, ], [ 'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', 'Location' => 'https://XXXXXXXXX/XXXXXXXX', ], ], 'SingleLogoutService' => [], 'ArtifactResolutionService' => [], 'NameIDFormats' => [ 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress', ], 'keys' => [ [ 'encryption' => false, 'signing' => true, 'type' => 'X509Certificate', 'X509Certificate' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ], ], 'certificate' => 'okta.cert', ];tracking id: 1a8882c231
Authsources setup
$config['default-sp']['entityID'] = 'https://my.entity.id'; $config['default-sp']['idp'] = 'https://sso-idp-provider/identity'; ' $config['default-sp']['RelayState'] = 'https://my.entity.id'; $config['default-sp']['privatekey'] = 'saml.pem'; $config['default-sp']['certificate'] = 'saml.crt';