Authentication Setup

Step by Step guide to SSO Setup with Google

Single sign-on (SSO) is a session and user authentication service that permits a user to use one set of login credentials. 

Example: name and password - to access multiple applications.

SSO can be used by enterprises, smaller organizations and individuals to ease the management of various usernames and passwords.

How to do OAuth2 Configuration? 

Follow the below steps for OAuth2 configuration: 
  1. Go to https://console.developers.google.com/
  2. Click on CREATE PROJECT to create a new project.
    API
  3. To create a project, enter the Project Name and click CREATE
    5-1
    After successfully creating a project, the below screen will be displayed. 
    6-1

  4. Click on the project name and select the project and click OPEN.
  5. Select Credentials and then click on CREATE CREDENTIALS.
  6. Select OAuth Client ID as shown below:

    7-1
  7. Select Configure consent screen
    8-1
  8. Select CREATE to create a consent screen.
    Note: Select the appropriate type for the organization (Recommended Internal).
     
    8CREATE
  9. Enter the Application name, Application logo, Support email, and Authorized domain, and then click Save.
    9-1
    10
  10. Repeat steps 5 and 6. 
  11. Select Web application from the Application type. 
    10Application
  12. Enter Name for Web Client. 
  13. In the Authorized JavaScript origins, enter http://localhost:8080 (domain may change in your case) 
  14. In the Authorized redirect URIs, enter http://localhost:8080/ovaledge/oauth2/code/google (Domain may change in your case)
  15. Click CREATE.
    11-2
  16. Copy Client ID and Client Secret and enter them in oasis.properties with keys. 
    12CopyclientID
    After clicking on the Ok button, we get the below screen:
    12-1

In oasis.properties file, 

spring.security.oauth2.client.registration.google.clientId=your client id 

spring.security.oauth2.client.registration.google.clientSecret=your client secret 

13-1

To Enable OAuth2 in OvalEdge 

Use -DOVALEDGE_SECURITY_TYPE=oauth2 as VM Argument 

Tomcat changes 

A. Windows platform

Create a setenv.bat file in the tomcat bin directory and add this to setenv.bat and save it as shown below: 

14Tomcat

set CATALINA_OPTS="-DOVALEDGE_SECURITY_TYPE=oauth2" 

B. Linux / Unix platform

Create a file with name setenv.sh and add the following line:

export CATALINA_OPTS="-DOVALEDGE_SECURITY_TYPE=oauth2" 

14-1

17. Start the server. Now you have connected with the Ovaledge application.

15-4

2-2

3-2

1-4