ComponentSpace

Forums



InitiateSSO call contains null


InitiateSSO call contains null

Author
Message
nulleleven
nulleleven
New Member
New Member (7 reputation)New Member (7 reputation)New Member (7 reputation)New Member (7 reputation)New Member (7 reputation)New Member (7 reputation)New Member (7 reputation)New Member (7 reputation)New Member (7 reputation)

Group: Forum Members
Posts: 4, Visits: 24
Hello everyone!

I'm sure this has been covered somewhere, but I'm just not finding it. When calling:

InitiateSSO(HttpResponse httpResponse, string relayState, string partnerIdP)

we are getting the error:

"Object reference not set to an instance of an object."
"at ComponentSpace.SAML2.Bindings.HTTPRedirectBinding.SendRequest(HttpResponse httpResponse, String baseURL, XmlElement samlMessage, String relayState, AsymmetricAlgorithm key, String signatureAlgorithm)"

The values for HttpResponse, relayState, and partnerIdP are not null (and there is a config associated to the partnerIdP), I'm unsure where the null is coming from, or what information is to be expected that may not be contained in the HttpResponse. Are there steps we can take to trace the values being passed within InitiateSSO to uncover what is being sent to SendRequest as a null value?

Thank you!
ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)

Group: Administrators
Posts: 2.8K, Visits: 8.5K
Are you passing a System.Web.HttpResponse as the first parameter?

Please enable SAML trace. This should provide more information.

https://www.componentspace.com/Forums/17/Enabing-SAML-Trace

You're welcome to send the SAML log file to support@componentspace.com and we'll take a look.

Regards
ComponentSpace Development
nulleleven
nulleleven
New Member
New Member (7 reputation)New Member (7 reputation)New Member (7 reputation)New Member (7 reputation)New Member (7 reputation)New Member (7 reputation)New Member (7 reputation)New Member (7 reputation)New Member (7 reputation)

Group: Forum Members
Posts: 4, Visits: 24
ComponentSpace - 8/24/2021
Are you passing a System.Web.HttpResponse as the first parameter?

Please enable SAML trace. This should provide more information.

https://www.componentspace.com/Forums/17/Enabing-SAML-Trace

You're welcome to send the SAML log file to support@componentspace.com and we'll take a look.

Just think kind of information I was looking for, thank you! We'll see what this turns up :)
ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)

Group: Administrators
Posts: 2.8K, Visits: 8.5K
Thank you.

Regards
ComponentSpace Development
paulkeefe
paulkeefe
New Member
New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)

Group: Forum Members
Posts: 16, Visits: 49
ComponentSpace - 8/24/2021
Are you passing a System.Web.HttpResponse as the first parameter?

Please enable SAML trace. This should provide more information.

https://www.componentspace.com/Forums/17/Enabing-SAML-Trace

You're welcome to send the SAML log file to support@componentspace.com and we'll take a look.

I am having this same issue and looking through the trace log doesn't tell me what is null. I am going to send in my log file for you to look at. Thank you.
ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)

Group: Administrators
Posts: 2.8K, Visits: 8.5K
In the previous case, the HttpRequest and HttpResponse objects associated with the current HTTP request were not being used. This meant that these objects weren't initialized correctly. The solution was simply to pass in the correct HttpRequest and HttpResponse objects.

Of course, if this isn't what you're seeing, please forward the SAML log file to support@componentspace.com.

Thanks.

Regards
ComponentSpace Development
paulkeefe
paulkeefe
New Member
New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)

Group: Forum Members
Posts: 16, Visits: 49
+x
ComponentSpace - 9/24/2021
In the previous case, the HttpRequest and HttpResponse objects associated with the current HTTP request were not being used. This meant that these objects weren't initialized correctly. The solution was simply to pass in the correct HttpRequest and HttpResponse objects.

Of course, if this isn't what you're seeing, please forward the SAML log file to support@componentspace.com.

Thanks.

That was the issue in that the Response object was not propagating into the method call. Now that it is working I get a different error that I believe is on the IdP side.

Could you confirm that this means the Identity Provider is not sending a post back to my site? If that is not the case, what does this message mean?

[SAMLBindingException: The message is not an HTTP POST.]

ComponentSpace.SAML2.Bindings.HTTPPostBinding.ReceiveRequest(HttpRequest httpRequest, XmlElement& samlMessage, String& relayState) +182

The log file says: Initiation of SSO to the partner identity provider https://xxxx.net has completed successfully.



ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)

Group: Administrators
Posts: 2.8K, Visits: 8.5K
It looks like SSO was initiated successfully (ie a SAML authn request was created and sent to the IdP). However, the SAML response isn't being received.

The SAML response must be sent in an HTTP Post. If instead we receive an HTTP Get etc, we throw the exception you're seeing.

I suggest using the browser developer tools (F12) to take a look at the network traffic. You should see a 302 redirect including the SAMLRequest query string parameter. This is the SAML authn request being sent to the identity provider. If everything was working, after the user logs in at the identity provider, you should see an HTTP Post of the SAMLResponse.

If you're not sure how to interpret this, you're welcome to save the network traffic and email us the HAR file.

Regards
ComponentSpace Development
paulkeefe
paulkeefe
New Member
New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)New Member (17 reputation)

Group: Forum Members
Posts: 16, Visits: 49
ComponentSpace - 9/25/2021
It looks like SSO was initiated successfully (ie a SAML authn request was created and sent to the IdP). However, the SAML response isn't being received.

The SAML response must be sent in an HTTP Post. If instead we receive an HTTP Get etc, we throw the exception you're seeing.

I suggest using the browser developer tools (F12) to take a look at the network traffic. You should see a 302 redirect including the SAMLRequest query string parameter. This is the SAML authn request being sent to the identity provider. If everything was working, after the user logs in at the identity provider, you should see an HTTP Post of the SAMLResponse.

If you're not sure how to interpret this, you're welcome to save the network traffic and email us the HAR file.

That's what I thought but wanted to be sure before contacting our new IdP. It's better to be armed with good information :) Thanks!
ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)

Group: Administrators
Posts: 2.8K, Visits: 8.5K
I suggest checking the network traffic first just in case the issue is at your end.

Regards
ComponentSpace Development
GO


Similar Topics


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


Password:


Social Logins

Select a Forum....









Forums, Documentation & Knowledge Base - ComponentSpace


Search