Hello,
Read through the other threads with this error, but I continue to
receive the error:
"This SP [my-sp] is not a valid audience for the assertion.
Candidates were []"
The entityID is set to 'my-sp' when working with the siteminder Idp
(Required by remote-idp)
Received and saved SAML Response from IdP.
Metadata mismatch is suspected. IdP sets metadata contents. Hoping
to change SP metadata to match IdP.
Is this possible?
Does using http on SP and https on IdP have anything to do with the
error?
Note that this configuration is working with another IdP.
authsources.php:
'default-sp' => array(
'saml:SP',
'privatekey' => 'saml.pem',
'certificate' => 'saml.crt',
'entityID' => 'my-sp',
'idp' => 'remote-idp,
'discoURL' => NULL,
),
saml20-idp-remote.php:
$metadata['remote-idp'] = array(
'name' => 'remote-idp',
'description' => 'test-siteminder-IdP',
'SingleSignOnService' => '
https://test.idp.com/.../public/saml2sso',
'certificate' => 'Idp.cer',
);
saml20-sp-remote.php:
$metadata['my-sp'] = array(
'AssertionConsumerService' => '
http://my-sp.com/simplesaml/
module.php/saml/sp/saml2-acs.php/default-sp',
'SingleLogoutService' => '
http://my-sp/simplesaml/module.php/saml/
sp/saml2-logout.php/default-sp',
);
Attributes from SAML Response from IdP:
<Response xmlns="urn:oasis:names:tc:SAML:2.0:protocol"
Destination="
http://my-sp.com/simplesaml/module.php/saml/sp/saml2-
acs.php/default-sp" ID=...... Version="2.0">
<ns1:Issuer xmlns:ns1="urn:oasis:names:tc:SAML:2.0:assertion"
Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">remote-idp</
ns1:Issuer><ds:Signature xmlns:ds="
http://www.w3.org/2000/09/
xmldsig#">
......
<Status><StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/
></Status>
<ns2:Assertion xmlns:ns2="urn:oasis:names:tc:SAML:
2.0:assertion" ........ Version="2.0">
......
<ns2:Conditions NotBefore="........">
<ns2:AudienceRestriction><ns2:Audience>my-sp</ns2:Audience></
ns2:AudienceRestriction>
<ns2:AudienceRestriction><ns2:Audience>
https://test.idp.com/
testfile.xml</ns2:Audience></ns2:AudienceRestriction>
</ns2:Conditions>
.....
<ns2:AttributeStatement>
<ns2:Attribute Name="UID" NameFormat="urn:oasis:names:tc:SAML:
2.0:attrname-format:basic">
<ns2:AttributeValue>JohnSmith</ns2:AttributeValue>
</ns2:Attribute>
<ns2:Attribute Name="EID" NameFormat="urn:oasis:names:tc:SAML:
2.0:attrname-format:basic">
<ns2:AttributeValue>12345678</ns2:AttributeValue>
</ns2:Attribute>
</ns2:AttributeStatement>
</ns2:Assertion>
</Response>