ComponentSpace

Forums



Application gets in to infinite loop after SSO login


Application gets in to infinite loop after SSO login

Author
Message
Rishit Epari
Rishit Epari
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: 2, Visits: 27
Hi,

I have integrated the SAML SSO for ASP.NET in our webform application with the SP-initiated SSO. After I login to the partner provider (OKTA), my application gets into an infinite loop. 
What could be the possible reason for this?

Attached the log file for your reference.

P.S - I have modified the url's for security reasons.
Attachments
saml.log (1 view, 27.00 KB)
ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)

Group: Administrators
Posts: 2.9K, Visits: 9.4K
Thanks for the log. It looks like your application is repeatedly calling SAMLServiceProvider.InitiateSSO.

I suggest setting a breakpoint on the call to SAMLServiceProvider.InitiateSSO and following the code flow to see why this method is being called repeatedly.

The flow should be:

1. Call SAMLServiceProvider.InitiateSSO to create and send a SAML authn request to the IdP.
2. Login at the IdP.
3. Call SAMLServiceProvider.ReceiveSSO at your assertion consumer service endpoint to receive and process the SAML response.

Make sure the assertion consumer service endpoint is accessible. For example, in a WebForms application include a web.config in the SAML folder that includes:


<configuration>
<system.web>
  <!-- No authorization for the SAML pages -->
  <authorization>
  <allow users="*" />
  </authorization>
</system.web>
</configuration>

  

Regards
ComponentSpace Development
Rishit Epari
Rishit Epari
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: 2, Visits: 27
ComponentSpace - 9/17/2020
Thanks for the log. It looks like your application is repeatedly calling SAMLServiceProvider.InitiateSSO.

I suggest setting a breakpoint on the call to SAMLServiceProvider.InitiateSSO and following the code flow to see why this method is being called repeatedly.

The flow should be:

1. Call SAMLServiceProvider.InitiateSSO to create and send a SAML authn request to the IdP.
2. Login at the IdP.
3. Call SAMLServiceProvider.ReceiveSSO at your assertion consumer service endpoint to receive and process the SAML response.

Make sure the assertion consumer service endpoint is accessible. For example, in a WebForms application include a web.config in the SAML folder that includes:


<configuration>
<system.web>
  <!-- No authorization for the SAML pages -->
  <authorization>
  <allow users="*" />
  </authorization>
</system.web>
</configuration>

  

Thanks,

The web.config file was missing in the SAML folder in my case which was the cause of continuous redirection. After adding the file everything worked.

I am curious to know whether the library supports the relative path reference for saml.config and if it is possible can you share me an example.
ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)

Group: Administrators
Posts: 2.9K, Visits: 9.4K
By default we look for saml.config in the application's root folder.

A different file may be specified through the SAMLConfigFile app setting in web.config. For example:


<add key="SAMLConfigFile" value="c:\config\saml.config"/>



You can use either an absolute or relative file path.

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