Try WSO2 Cloud for Free
Sign in

All docs This doc
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 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.

  1. Download the file. Before you deploy the application, you may need to download metadata.xml and edit the file.

     Expand to see how to download IdP metadata configuration xml
    1. Log in to WSO2 Identity Cloud.  
    2. 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.

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

       Expand to see the sample of file
      Sample of file
      #  Copyright (c) WSO2 Inc. ( All Rights Reserved.
      #  WSO2 Inc. licenses this file to you under the Apache License,
      #  Version 2.0 (the "License"); you may not use this file except
      #  in compliance with the License.
      #  You may obtain a copy of the License at
      #  Unless required by applicable law or agreed to in writing,
      #  software distributed under the License is distributed on an
      #  KIND, either express or implied.  See the License for the
      #  specific language governing permissions and limitations
      #  under the License.
      #Url to do send SAML2 SSO AuthnRequest
      #Url to do initiate OAuth2 SAML2 Grant Request
      #Url to initiate OpenID Authentication Request
      #URIs to skip SSOAgentFilter; comma separated values
      #A unique identifier for this SAML 2.0 Service Provider application
      #The URL of the SAML 2.0 Assertion Consumer
      #A unique identifier for this SAML 2.0 Service Provider application
      #The URL of the SAML 2.0 Identity Provider
      #Identifier given for the Service Provider for SAML 2.0 attributes 
      #Specify if SingleLogout is enabled/disabled
      #This is the URL that is used for SLO
      #Specify if SAMLResponse element is signed
      #Specify if SAMLAssertion element is signed
      #Specify if SAMLAssertion element is encrypted
      #Specify if AuthnRequests and LogoutRequests should be signed
      #Password of the KeyStore for SAML and OpenID
      #Alias of the IdP's public certificate
      #Alias of the SP's private key 
      #Private key password to retrieve the private key used to sign 
      #AuthnRequest and LogoutRequest messages
      #OAuth2 token endpoint URL
      #OAuth2 Client ID
      #OAuth2 Client Secret
      #OpenId Provider Url
      #openid.return_to parameter
      #Custom SAML post binding request page
      #Additional request parameters
      #Specify whether the consumer requests user attributes from the provider
      #Specify whether the consumer runs in dumb mode
      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

    7. Save the file.

    8. Navigate to the MyTest directory.
    9. Create the file (e.g., jar -cvf *. ).
  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 file.

      You see the 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 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.

  2. Scroll down and enter Issuer as '' and provide the Assertion Consumer URL as '' and click Add to add the link. Select Enable Response Signing
  3. 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.

  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 ( without having to sign in explicitly. This shows SAML based SSO capability for a custom application using Identity Cloud.  
  • No labels