GetPartnerIdentityProviderConfigurationAsync: configurationName is sometime null or empty

Hello,

We now use ComponentSpace SAML2 library for a while, first in .Net and now in .Net Core (.Net 6).

We have identified in this one an issue in production server we cannot manage to understand or identify the root cause.

We have a multitenant product, meaning that multiple configurations can be configured by our customers. For that we have override the AbstractSamlConfigurationResolver.

In our CustomSamlConfigurationResolver, the method GetPartnerIdentityProviderConfigurationAsync(string configurationName, string partnerName) sometime get an empty configurationName (null). We rely on this configurationName to determine which configuration needs to be selected from our database to provide all relevant information in the PartnerIdentityProviderConfiguration object (result of the method).

Why, from time to time, randomly, and not for all users, the configurationName could be empty/null?

Thank you for your assistance.

We pass into the configuration resolver whatever value has been set using the SetConfigurationNameAsync method.

Is it possible this method isn’t being called sometimes which is why the configurationName parameter is null?

When do you call SetConfigurationNameAsync? Is it immediately before any other SAML API calls?

Could you add a check in your code to ensure SetConfigurationNameAsync is being called and the value being passed in is not null?

If you can reproduce the issue, please enable SAML trace and send the generated log file as an email attachment to support@componentspace.com.

https://www.componentspace.com/forums/7936/Enabling-SAML-Trace

[quote]
ComponentSpace - 9/19/2022
We pass into the configuration resolver whatever value has been set using the SetConfigurationNameAsync method.

Is it possible this method isn’t being called sometimes which is why the configurationName parameter is null?

When do you call SetConfigurationNameAsync? Is it immediately before any other SAML API calls?

Could you add a check in your code to ensure SetConfigurationNameAsync is being called and the value being passed in is not null?

If you can reproduce the issue, please enable SAML trace and send the generated log file as an email attachment to support@componentspace.com.

https://www.componentspace.com/forums/7936/Enabling-SAML-Trace
[/quote]

This topic can be closed, we managed to fix the issue. It was a mismatch of cookies on the end-user browser: they had the previous cookie still live. Removing it solved the issue.

Thanks for the update.