I am using self-signed certs: https://www.samltool.com/self_signed_certs.php
I’m trying to enable SAML between Laravel and Suite, I’ve already have all the certs ready my problem is that I’m getting this error in Laravel:
ErrorException (E_WARNING)
DOMDocument::createElementNS(): unterminated entity reference module=Users
##/vendor/lightsaml/lightsaml/src/LightSaml/Model/AbstractSamlModel.php
*/
protected function manyElementsToXml($value, \DOMNode $node, SerializationContext $context, $nodeName = null, $namespaceUri = null)
{
if (false == $value) {
return;
}
if (false == is_array($value)) {
throw new \LogicException('value must be array or null');
}
foreach ($value as $object) {
if ($object instanceof SamlElementInterface) {
if ($nodeName) {
throw new \LogicException('nodeName should not be specified when serializing array of SamlElementInterface');
}
$object->serialize($node, $context);
} elseif ($nodeName) {
if ($namespaceUri) {
$child = $context->getDocument()->createElementNS($namespaceUri, $nodeName, (string) $object);
} else {
$child = $context->getDocument()->createElement($nodeName, (string) $object);
}
$node->appendChild($child);
} else {
throw new \LogicException('Can handle only array of AbstractSamlModel or strings with nodeName parameter specified');
}
}
}
Laravel saml.php
content
<?php
return [
'sp' => [
'issuer' => env('APP_URL'),
// add your cert.pem and key.pem to /storage/saml
'cert' => 'saml',
'key' => 'saml',
'suite.com' => [
'destination' => 'https://suite.com/index.php?action=Login&module=Users',
'type' => 'crm',
],
]
];
If I remove this part &module=Users
the error disappears but I end up with an infinite redirect as I’m guessing Suite isn’t able to redirect it properly without &module=Users
.
So my question here is what am I doing wrong and does Suite have a different login URL for SAML authentication?