Try WSO2 Cloud for Free
Sign in
||
Skip to end of metadata
Go to start of metadata

Using WSO2 Identity Cloud, you can create a custom application and configure it to facilitate Single Sign-On (SSO) using SAML. This custom application is a representation of your web application and can be integrated with WSO2 Identity Cloud to provide SSO for users of this application. 

In this tutorial you will learn how to configure single sign-on for your custom application using SAML.

To demonstrate SSO of a SAML-based custom application, first you need to obtain and configure a web application. Next you must configure a custom application with agent-type SAML to represent this web application. Users of the web application can access it using Single Sign-on via the Identity Cloud. This tutorial uses Travelocity as the sample web application to demonstrate how SSO works. 

See the following topics for instructions on how to configure the sample web application with WSO2 Identity Cloud. 

Adding a custom application

To know how to add a custom application, see here.

Configuring the sample web application

To deploy and configure the travelocity web application follow the steps below.

  1. Download the travelocity.com.war file. Before you deploy the application, you may need to edit the travelocity.properties file.

     Expand to see how to edit the travelocity.properties file
    1. Open command prompt.
    2. Go to the folder where you have downloaded the travelocity.com.war file.
    3. Create a new directory (e.g., mkdir MyTest).
    4. Extract the travelocity.com.war to the newly created directory (e.g., unzip travelocity.com.war -d MyTest/). This extracts all the files to the MyTest directory.
    5. Navigate to the ../WEB-INF/classes directory.
    6. Edit the travelocity.properties file found inside the ../WEB-INF/classes directory (sample given below).

      PropertiesDescription
      SAML2.SPEntityId=travelocity.com
      A unique identifier for this SAML 2.0 Service Provider application.

      SAML2.AssertionConsumerURL=http://demotenant-travelocity.wso2apps.com/travelocity.com

      The URL of the SAML 2.0 Assertion Consumer. Note: demotenent should be replaced by actual tenant created.

      SAML2.IdPURL=https://identity.cloud.wso2.com/samlsso

      The URL of the SAML 2.0 Identity Provider.
    7. Save the file.

    8. Navigate to the MyTest directory.
    9. Create the travelocity.com.war file (e.g., jar -cvf travelocity.com.war *. ).
  2. Go to WSO2 Integration Cloud and deploy the travelocity web application. Click the following for instructions on how to deploy a web application in Integration Cloud.

     Expand to see how a web application is deployed in Integration Cloud
    1. Log in to Identity Cloud admin portal.
    2. Click the Settings menu at the top right corner and navigate to Integration Cloud.
    3. Click Create Application.
    4. Scroll down and click on Java Web Application in Services.
    5. Under Deploy an artifact, select the Local File System option and click Continue.
    6. Enter an Application Name and click Browse to select the travelocity.com.war file.

      You see the travelocity.com.war getting loaded.
    7. Once uploading is completed, click Create to deploy the application.

      You see the deployment progress as shown below.

      Once the application is successfully deployed, it is displayed as shown below.

      Alternatively, you can see the deployed travelocity application in the Integration Cloud landing page.

Configuring the custom application with the web app

  1. Once you enter the application name, the following page is displayed with Agent as the selected app type and SAML2 Web SSO is selected by default. Make sure the Configure Manually radio button is selected.
  2. Enter Issuer as 'travelocity.com' and provide the Assertion Consumer URL as 'http://demotenant-travelocity.wso2apps.com/travelocity.com/home.jsp' and click Add to add the link. Select Enable Response Signing
  3. Scroll down and in the Store Configuration, enter 'http://demotenant-travelocity.wso2apps.com/travelocity.com/home.jsp' as the Access URL.
  4. Click Save to add the application details. 
  5. The added application is displayed, and you can delete or edit it by clicking the button next to the application thumbnail name.
  6. Click Go to User Portal.  

  7. Click the added custom application that is in the user portal.

  8. You are directed to travelocity home page (http://demotenant-travelocity.wso2apps.com/travelocity.com/home.jsp) without having to sign in explicitly. This shows SAML based SSO capability for a custom application using Identity Cloud.  
  • No labels