ComponentSpace

Forums



Multiple SAML configurations exist but a configuration name hasn't been specified


Multiple SAML configurations exist but a configuration name hasn't...

Author
Message
AlexK
AlexK
New Member
New Member (2 reputation)New Member (2 reputation)New Member (2 reputation)New Member (2 reputation)New Member (2 reputation)New Member (2 reputation)New Member (2 reputation)New Member (2 reputation)New Member (2 reputation)

Group: Forum Members
Posts: 1, Visits: 5
Hi,
We have a multi tenant web app using ComponentSpace for SSO.
There are multiple configurations that we add when the app starts:

public void ConfigureServices(IServiceCollection services)
{
    services.AddSaml(ConfigureSaml);
}

public static void ConfigureSaml(SamlConfigurations samlConfigurations)
   {
    var ssoClients = ...;

    samlConfigurations.Configurations = ssoClients.Select(ssoClient => new SamlConfiguration
    {
      Name = ssoClient.ClientId,
      PartnerIdentityProviderConfigurations = new List<PartnerIdentityProviderConfiguration>
      {
       new ()
       {
        Name = ssoClient.PartnerIdentityProviderName,
        SignAuthnRequest = ssoClient.SignAuthnRequest,
        WantSamlResponseSigned = ssoClient.WantSAMLResponseSigned,
        WantAssertionSigned = ssoClient.WantAssertionSigned,
        WantAssertionEncrypted = ssoClient.WantAssertionEncrypted,
        SingleSignOnServiceUrl = ssoClient.PartnerIdentityLoginUrl,
        SingleLogoutServiceUrl = ssoClient.PartnerIdentityLogoutUrl,
        DigestAlgorithm = ssoClient.DigestMethod,
        SignatureAlgorithm = ssoClient.SignatureMethod,
        PartnerCertificates = new List<Certificate>
        {
          new()
          {
           String = ssoClient.CertificateString
          }
        },
        DisableDestinationCheck = ssoClient.DisableDestinationCheck
       }
      },
      LocalServiceProviderConfiguration = new LocalServiceProviderConfiguration
      {
       Name = ssoClient.LocalServiceProviderName,
       AssertionConsumerServiceUrl = ...
      }
    }).ToList();
    }


It is an IDP initiated SSO and our app is a SP. So in the login controller action we have:


      _samlServiceProvider.SetConfigurationNameAsync(currentConfiguration.ClientId);

       var ssoResult = _samlServiceProvider.ReceiveSsoAsync();


Here is what we see in the log:

2022-11-14 15:46:05 DEBUG - The configuration name has been set to XXX. (correct)
2022-11-14 15:46:05 ERROR - Receiving an SSO response from a partner identity provider has failed.
ComponentSpace.Saml2.Exceptions.SamlConfigurationException: Multiple SAML configurations exist but a configuration name hasn't been specified.
at ComponentSpace.Saml2.Configuration.Resolver.SamlConfigurationResolver.GetConfiguration(String configurationName)
 at ComponentSpace.Saml2.Configuration.Resolver.SamlConfigurationResolver.GetLocalServiceProviderConfigurationAsync(String configurationName)
 at ComponentSpace.Saml2.SamlServiceProvider.GetLocalSpConfigurationAsync()
 at ComponentSpace.Saml2.SamlServiceProvider.ReceiveSsoAsync()

Please advise.

Thanks,
Alex.



ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (4.2K reputation)ComponentSpace Development (4.2K reputation)ComponentSpace Development (4.2K reputation)ComponentSpace Development (4.2K reputation)ComponentSpace Development (4.2K reputation)ComponentSpace Development (4.2K reputation)ComponentSpace Development (4.2K reputation)ComponentSpace Development (4.2K reputation)ComponentSpace Development (4.2K reputation)

Group: Administrators
Posts: 3K, Visits: 10K
Hi Alex,

I don't see any obvious issues.

Please send the SAML log file as an email attachment to [email protected] so we can take a closer look.

Regards
ComponentSpace Development
GO


Similar Topics


Execution: 0.000. 2 queries. Compression Enabled.
Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....












Forums, Documentation & Knowledge Base - ComponentSpace


Search