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.
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 standards-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.
The following is a video of this tutorial that is done using Google. The steps in this tutorial differ from the video as this tutorial uses a sample web application.
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.
Download the travelocity.com.war file. Before you deploy the application, you may need to download metadata.xml and edit the travelocity.properties file.Expand to see how to download IdP metadata configuration xml
Expand to see how to edit the travelocity.properties file
- Log in to WSO2 Identity Cloud.
Click the menu icon on the top, left corner of the screen and click Applications:
Alternatively, click Overview on the menu bar and click View Applications.
- Click DOWNLOAD IDP METADATA to download the IDP metadata file. (This file gets downloaded to a local folder.)
- Open command prompt.
- Go to the folder where you have downloaded the travelocity.com.war file.
- Create a new directory (e.g.,
- 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
- Navigate to the ..
Edit the travelocity.properties file (see sample below) found inside the ..
/WEB-INF/classesdirectory.Expand to see the sample of travelocity.properties.xml file
A unique identifier for this SAML 2.0 Service Provider application.
The URL of the SAML 2.0 Assertion Consumer. Note: organization_domain should be replaced by actual tenant created.
The URL of the SAML 2.0 Identity Provider. The value for SAML2.IdPURL is taken from 'SingleSignOnService' element in downloaded metadata xml file. (See sample below)Sample of WSO2IdentityCloudMetadata.xml
Save the file.
- Navigate to the
- Create the travelocity.com.war file (e.g.,
jar -cvf travelocity.com.war *. ).
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
- Log in to Identity Cloud admin portal.
- Click the Settings menu at the top right corner and navigate to Integration Cloud.
- Click Create Application.
- Scroll down and click on Java Web Application in Services.
- Under Deploy an artifact, select the Local File System option and click Continue.
- Enter an Application Name and click Browse to select the travelocity.com.war file.
You see the travelocity.com.war getting loaded.
- 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
- Once you enter the application name, the following page is displayed with Standards-based Federation and SAML2 Web SSO is selected by default as App type and Security Protocol. Make sure the Configure Manually button is selected.
- Scroll down and enter Issuer as 'travelocity.com' and provide the Assertion Consumer URL as ' click Add to add the link. Select Enable Response Signing.
- Scroll down. In Store Configuration, enter ' as the Access URL.
Note that the tenant name demotenant should be replaced by the name of the tenant you have created.
- Click Save to add the application details.
- The added application is displayed, and you can delete or edit it by clicking the button next to the application thumbnail name.
- Click Go to User Portal.
- Click the added custom application that is in the user portal.
- You are directed to travelocity home page () without having to sign in explicitly. This shows SAML based SSO capability for a custom application using Identity Cloud.