Quick Start Guide
WSO2 Identity Server (WSO2 IS) provides identity management across many platforms such as enterprise applications, services, and APIs. In other words, it provides a comprehensive solution that allows you to manage the identity and access management (IAM) activities of an enterprise. The Quick Start Guide takes you on a quick tour of WSO2 IS to help you understand what you can achieve using this product.
Let us consider a fictional cab company called Pickup, where WSO2 IS is used as the identity and access management solution to cater to many of its identity use cases. Pickup has several identities to manage, many sets of credentials per person for each application, identify security vulnerabilities, permission levels and many more. Cameron, a manager at Pickup, is responsible for implementing WSO2 IS to find solutions to these IAM related issues.
Introducing the sample
This QSG describes some common use cases that Cameron comes across and how WSO2 IS is used to address each of these use cases. Each business use case (scenario) is demonstrated using a sample that contains two web apps - Dispatch and Swift that are configured and run using a command line utility. A brief description of these two apps are given below:
Dispatch - A management application used to manage the overall operations at Pickup.
Swift - A vehicle allocation application used to allocate drivers to vehicles at Pickup.
Assume you are Cameron and you are assigned to find solutions to the various identity-related use cases. Let's see how this QSG can guide you to demonstrate these use cases and how you can use WSO2 IS to resolve them.
Prerequisites
First, you need to make sure that the following requirements are met:
Download and install OpenJDK 8 or Oracle JDK 1.8.*.
Download and install cURL.
To try out multi-factor authentication or federated authentication, you must first create a Twitter application.
Go to https://twitter.com/ and create an account.
Register a new application on Twitter at https://apps.twitter.com. For more information, see Create Twitter Application.
You can use the following URL as the Callback URL for your twitter app: https://localhost:9443/commonauth.Note down the API key and secret for later use.
Open
/etc/hostsfile, add the following entry and restart the machine.127.0.0.1 localhost.com
Deploying and starting the sample applications
Now, follow the steps below to configure and run the samples:
Download the samples from here.
Unzip
is-samples-1.0.0.zip.Navigate to
is-samples-1.0.0/samples/OIDC-APPSand copyDispatch.warandSwift.warto tomcat webapps directory.Navigate to
is-samples-1.0.0/samples/SAML2-APPSand copysaml2-web-app-dispatch.com.warandsaml2-web-app-swift.com.warto tomcat webapps directory.Navigate to
<IS_HOME>/binin the command line and start the server by executingwso2server.sh(for Linux) orwso2server.bin(for Windows).Navigate to
<TOMCAT_HOME>/binand start the Tomcat server by executingcatalina.sh(for Linux) orcatalina.bat(for Windows).Navigate to
is-samples-1.0.0/samples/QSG-bundle/QSG/binand start the Quick Start Guide by executingqsg.sh(for Linux) orqsg.bat(for Windows).
The samples are deployed and the WSO2 Identity Server is up and running. Now you can use the command line utility to demonstrate each of the identity use case scenarios.
Single sign-on
Problem scenario
The first problem that Pickup faces is that the web apps are separate, and each user must have two separate credentials to log in to each application.
When the number of applications increase, having different credentials for each application is not a scalable solution. You realize that the best way to overcome this situation is to have a solution where the users who get authenticated and given access to one application are also authenticated to other applications automatically. In other words, it needs a single sign-on (SSO) solution that enables authentication of the user for both applications using a single set of credentials. You decide to use WSO2 IS to configure SSO.
You can use the command line utility to configure SAML SSO for the web apps as described in the steps below (if SAML2 is used as the authentication protocol for both apps).
Configuring single sign-on with SAML2
Enter 1 as scenario number.
Enter the paths to your WSO2 IS pack and the Tomcat pack.
Running scenario 1:creates two users - Cameron and Alex
creates the role 'manager' and assigns that role to Cameron
creates service providers for two web apps
configures SAML2 web SSO for Dispatch and Swift
Once the above step is done, it displays the following screen:
Now you can open the web applications by entering the following URL in a web browser.
Dispatch: http://localhost:8080/saml2-web-app-dispatch.com/
Swift: http://localhost:8080/saml2-web-app-swift.com/
The following Login screen is displayed:Click Log in and use the following credentials:Manager
Username: cameron
Password: cameron123Give your consent by selecting the attribute you want to give access to as part of sharing your profile information and click Approve.
The following page is displayed for the Dispatch application and can be accessed at http://localhost:8080/saml2-web-app-dispatch.com/.
Now open a new tab in your browser and access http://localhost:8080/saml2-web-app-swift.com/. You see the following page for the Swift application.
The Swift application opens without having to enter the user credentials again.
Configuring single sign-on with OIDC
If the two applications are using OIDC as their authentication protocol, You can follow the steps below:
Enter 2 as the scenario number.
Enter the paths to your WSO2 IS pack and the Apache Tomcat pack.
Running scenario 2, creates two users (Cameron and Alex), a role as 'manager' and assigns the role to Cameron. It also creates service providers for each application and configures SSO for them.
Once this scenario is run, the following screen is displayed:Once you open the web applications by entering the following URL in a web browser (Dispatch: http://localhost:8080/Dispatch/ or Swift: http://localhost:8080/Swift/), the following login screen appears:
Click Log in and sign in to the web application you accessed using any of the following credentials:Manager
Username: cameron
Password: cameron123In the OPENID USER CLAIMS page, select the approval type and give the consent by selecting the attribute you wish to share with the service provider and click Continue.
The following page appears if you accessed http://localhost:8080/Dispatch/. The Swift application opens if you attempted to access that instead.Now open a new tab in your browser and access the other web application. For example, http://localhost:8080/Swift/. The following screen appears.