Wednesday, May 11, 2016

WSO2 IS SSO with .NET application

In this blog, I would like to discuss another common case which, I couldn't find many entries in explaining how to integrate WSO2 Identity Server with .NET web application.

 There are different types of 3rd party components available but out of that thought of demonstrating the demo with Component Space [1] which provides a comprehensive framework to implement SSO solutions and the demonstration was prepared with using those references.

I will use some steps (with images) to demonstrate how easily could integrate, the sample code can be download [3] and you could easily open up .NET IDE so, you can customize it according to your preference.


  • First, you should register .NET web application you have written as a service provider, you can customize SP parameters such as assertion encryption, SLO settings according to your preference. (I would assume at this point you may have covered fundamentals of WSO2 Identity server, such as registering Sevice Provide (SP), Identity Provider (IP) and other basic fundamentals, if not recommendation is to go through [2]




  • Then, you have to customize the SSO web app settings under web.config
<configuration>
  <appSettings>
    <add key="idpssoURL" value="https://localhost:9443/samlsso" />
    <add key="idpArtifactResponderURL" value="http://localhost:51394/SAML2IdentityProvider/SAML/ArtifactResponder.aspx" />
    <add key="idpLogoutURL" value="https://localhost:9443/samlsso" />
 </appSettings>
<connectionStrings/>




  • Once you do all the required modifications at SSO web app, then when deploying to IIS server, during initial startup it would ask the way SSOSAMLRequest should have generated, this is customizable, which means you don't need to expose to the actual client but for development perspective, you can play around with different options available.




  •  The next step would be, when you click "continue" button, it would direct you to IS SSO login page as depicted below.




  • Then once you log in successfully, it would show the welcome page as given below.






[1] https://docs.wso2.com/display/IS500/Samples
[2] http://www.componentspace.com/SAMLv20.aspx
[3] https://www.dropbox.com/s/jfik1852xdhf342/SAML2ServiceProvider.zip?dl=0

4 comments:

  1. it is so informational and descriptive post on how to integrate WSO2 Identity Server with .NET web application. it will help me resolve many issues regarding several projects. Keep blogging

    ReplyDelete
  2. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a .Net developer learn from Dot Net Training in Chennai. or learn thru Dot Net Training in Chennai. Nowadays Dot Net has tons of job opportunities on various vertical industry.
    or Javascript Training in Chennai. Nowadays JavaScript has tons of job opportunities on various vertical industry.

    ReplyDelete
  3. I am getting The SAML response signature failed to verify. after IS SSO login page, I believe its to do with the certs. How do I match them on the WSO2 IS and the sample .net app?

    Thanks
    Jay

    ReplyDelete
    Replies
    1. I'm also having this problem, did you manage to fix it?

      Delete