By anneli - 10/27/2022
Hello, I'm getting an error "ComponentSpace.SAML2.Exceptions.SAMLSchemaValidationException: One or more configuration XML schema validation errors occurred." when calling SAMLIdentityProvider.InitiateSSO(Response, myId.ToString(), attributes, relayState, partnerName)
I ran ValidateConfig.exe with my saml.config file and I got "The SAML configuration was successfully validated." However, when I call InitiateSSO I get and exception. Exception has 0 Errors but 4 Warnings: 1. The element cannot contain white space. Content model is empty. 2. The element 'urn:componentspace:SAML:2.0:configuration:IdentityProvider' cannot contain child element 'urn:componentspace:SAML:2.0:configuration:LocalCertificates' because the parent element's content model is empty. 3. The element cannot contain white space. Content model is empty. 4. The element 'urn:componentspace:SAML:2.0:configuration:PartnerServiceProvider' cannot contain child element 'urn:componentspace:SAML:2.0:configuration:PartnerCertificates' because the parent element's content model is empty.
Both certificates are under Certificates folder just like in the Example solution This is saml.config <?xml version="1.0"?> <SAMLConfiguration xmlns="urn:componentspace:SAML:2.0:configuration"> <IdentityProvider Name="https://MyIdentityProvider" Description="My Identity Provider"> <LocalCertificates> <Certificate FileName="Certificates\official-outbound-signing-private.pfx" Password="blahblah"/> </LocalCertificates> </IdentityProvider> <PartnerServiceProviders> <PartnerServiceProvider Name="urn:blah:blah:serviceprovider" Description="Core Health Service Provider" WantAuthnRequestSigned="true" SignSAMLResponse="true" SignAssertion="false" EncryptAssertion="false" AssertionConsumerServiceUrl="https://VendorAssertionService.aspx" SingleLogoutServiceUrl=""> <PartnerCertificates> <Certificate FileName="Certificates\vendor-messageencryption-certificate.pem"/> </PartnerCertificates> </PartnerServiceProvider> </PartnerServiceProviders> </SAMLConfiguration>
I also validated it against your schema in Visual Studio and got no errors. Could you please advise what is wrong? Appreciate it.
|
By ComponentSpace - 10/28/2022
Thanks for the update. We introduced some minor but breaking changes to the configuration a while back, as you discovered.
Upgrading would be a good idea.
You'll find the release notes at:
https://www.componentspace.com/forums/8576/Release-Notes
|
|