The partner service provider [omitted] is not configured

Have had solution in place with a configured SP for about a year, and suddenly started seeing the error:

The partner service provider [omitted] is not configured

Stack trace:

ComponentSpace.Saml2.Exceptions.SamlConfigurationException: The partner service provider […] is not configured.
at ComponentSpace.Saml2.Configuration.Resolver.SamlConfigurationResolver.GetPartnerServiceProviderConfigurationAsync(String configurationName, String partnerName)
at ComponentSpace.Saml2.SamlIdentityProvider.GetPartnerSpConfigurationAsync(String partnerName)
at ComponentSpace.Saml2.SamlIdentityProvider.ReceiveSsoAsync()
at EES.Reporting.Services.AuthenticationApi.Controllers.SamlController.SSO() in /agent/_work/1/s/src/Services/EES.Reporting.Services.AuthenticationApi/Controllers/SamlController.cs:line 279

The line refers to a call to:

await _samlIdentityProvider.ReceiveSsoAsync();

The service provider, which has been omitted here, IS configured within the Startup.cs of the service.

samlConfigurations.Configurations = new List<SamlConfiguration>()
{
  PartnerServiceProviderConfigurations = new List<PartnerServiceProviderConfiguration>()
  {
    new PartnerServiceProviderConfiguration()
    {
        Name = [omitted]
        ...
    }
  }
}

Initial discussion with the service provider determined that nothing has changed before or since the issue began happening on November 27th. This has been working for about a year before this started happening, seemingly out of the blue.

The issue is not reproduceable with the sandbox environment of the SP.

Thank you for your help.

We use the Issuer field in the SAML authn request to lookup the partner service provider configuration by its name.

The Issuer field and PartnerServiceProviderConfiguration.Name must be an exact match.

Please double check that the name included in the exception and the configured name match exactly including any trailing slashes etc.

Also, setting the configuration once at application start-up is the correct approach. Make sure it isn’t being set anywhere else in the application.

If there’s still an issue, please enable SAML trace and send the generated log file as an email attachment to support@componentspace.com mentioning your forum post.

Thank you for this. I believe we are over the hump, but wanted to follow up on logging. We do log to DataDog, and I verified that the “ComponentSpace”: “Debug” config item is present, but I am not seeing anything that I would consider a ComponentSpace debug message. Could you provide an example of what to be looking for in the logs?

Thank you.

The ExampleServiceProvider and ExampleIdentityProvider projects are configured to log using Serilog. The output from these are good examples of what you should expect to see.

If you run the two projects in the Visual Studio debugger, you’ll find date stamped log files in the respective logs subfolders. Please note that most of the entries are at the Debug log level.

We don’t have any experience with DataDog. However, we use the standard ASP.NET Core logging API and logging should work with any logging provider.

If there’s an issue, I suggest trying Serilog, Log4Net or NLog and getting this working. It would then just be a matter of determining what the issue is with DataDog.