OneLogin Saml2 - Invalid array settings: sp_entityId_not_found, sp_acs_url_invalid, sp_sls_url_invalid

Viewed 2552

Hay all, I'm currently truing to apply SSO into a Wordpress site using the wp-simple-saml plugin. This plugin uses the OneLogin's SAML PHP Toolkit which seems to be where the error is coming from. When I add the XML into the Metadata the following error is triggered: enter image description here

My thinking was that maybe the following SSO idP Metadata was invalid btu samtool I was assured the XML is valid, here is the XML.

<?xml version="1.0"?>
<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" validUntil="XXXXXXX" cacheDuration="XXXXXX" entityID="XXXXX">
  <md:IDPSSODescriptor WantAuthnRequestsSigned="false" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
    <md:KeyDescriptor use="signing">
      <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
        <ds:X509Data>
          <ds:X509Certificate>XXXXXXXXXXXXXXXXXXX=</ds:X509Certificate>
        </ds:X509Data>
      </ds:KeyInfo>
    </md:KeyDescriptor>
    <md:KeyDescriptor use="encryption">
      <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
        <ds:X509Data>
          <ds:X509Certificate>XXXXXXXXXXXX=</ds:X509Certificate>
        </ds:X509Data>
      </ds:KeyInfo>
    </md:KeyDescriptor>
    <md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified</md:NameIDFormat>
    <md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://fidm.us1.gigya.com/saml/v2.0/XXXXXXXXXXXXXXXXXXX/idp/metadata"/>
  </md:IDPSSODescriptor>
</md:EntityDescriptor>

Whats the issue?

2 Answers

It can happen when there are underscores _ in the domain name. Domains with underscores not allowed as per SAML 2.0 specifications.

This error happened to me since I didn't configured correctly the file settings.json

In particular the section ''sp'' was left untouched:

"sp": {
    "entityId": "https://<sp_domain>/metadata/",
    #,"entityId": "https://<sp_domain>/metadata/",
    "assertionConsumerService": {
        "url": "https://<sp_domain>/?acs",
        "binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
    },
    "singleLogoutService": {
        "url": "https://<sp_domain>/?sls",
        "binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
    },
    "NameIDFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified",
    "x509cert": "",
    "privateKey": ""
},
Related