# Google

This article outlines the steps to configure **SSO in OvalEdge using Google OAuth2**.

Single Sign-On (SSO) is a user authentication method that enables access to multiple applications using a single set of credentials. Integrating SSO enhances user experience and reduces the overhead of managing multiple usernames and passwords across platforms.

## Purpose

The purpose of this document is to provide a **step-by-step guide** for configuring Google OAuth2 as the identity provider for SSO in OvalEdge. This includes:

* Creating a Google project
* Generating OAuth credentials
* Updating the OvalEdge configuration files
* Setting Tomcat runtime environment variables
* Restarting the OvalEdge application server

## Prerequisites

* **Access to Google Cloud Console**
* **Admin privileges** in the OvalEdge application server
* **Valid domain name and redirect URL** for OvalEdge (e.g., `https://<your-domain>/ovaledge/oauth2/code/google`)
* **Access to modify** the `oasis.properties` file

## Configuration Steps

1. **Create a Project in Google Cloud Console**
   * Navigate to: [Google Cloud Console](https://console.developers.google.com?utm_source=chatgpt.com)
   * Click **Open project picker** in the top navigation bar.

     <figure><img src="/files/PrWvUnIvnORdyXc8Y6df" alt=""><figcaption></figcaption></figure>
   * Select **Resource** → click **New Project**.\
     ![](/files/foWGDLWecROaoWwpjDzR)
   * Enter a **Project Name** → click **Create**.\
     ![](/files/rrQ3XhaJtK6LbbdCmiVs)
   * After creation, click **Select Project** to open the newly created project.

     <figure><img src="/files/S890Kx2Rxx6AesDRmJ12" alt=""><figcaption></figcaption></figure>

2. **Enable OAuth2 and Configure Consent Screen**
   * Navigate to **APIs & Services > Credentials**.

     <figure><img src="/files/nXsLjxPOlii0HkwZo9uN" alt=""><figcaption></figcaption></figure>
   * Click **+ CREATE CREDENTIALS → OAuth client ID**.

     <figure><img src="/files/YJj5fj7BoaJvWTTlFC8q" alt=""><figcaption></figcaption></figure>
   * Configure consent screen:

     <figure><img src="/files/po9bWIlamm6lmYEtzUMV" alt=""><figcaption></figcaption></figure>

     * Click **Create** to start a new consent screen.
     * Click **Getting Started**.

       <figure><img src="/files/CcNXgdD8BZMO5ZY10csx" alt=""><figcaption></figcaption></figure>
     * Provide **App Name** and **Support Email** → click **Next**.

       <figure><img src="/files/Oj0knQYHMAx0Ocw9d9hK" alt=""><figcaption></figcaption></figure>
     * Select **Internal** as the user type (recommended for organizations).

       <figure><img src="/files/jEZbWQDulQN6VPhs53gC" alt=""><figcaption></figcaption></figure>
     * Add a **Contact Email address** → click **Next**.

       <figure><img src="/files/hig7EWmcmbXAqV4VrHng" alt=""><figcaption></figcaption></figure>
     * Select **I agree** and click **Continue**.\
       ![](/files/f780b8Ssh1VHmsTHfP8C)
     * Once all sections show a checkmark (**App Information, Audience, Contact Information, Finish**), click **Create**.

       <figure><img src="/files/14PV4mSTSWFY7MdoDMP2" alt=""><figcaption></figcaption></figure>

3. **Create OAuth Client ID**
   * From the **Credentials tab**, click **+ CREATE CREDENTIALS → OAuth client ID**.

     <figure><img src="/files/13XYqYBwvye2mQ5vFPmJ" alt=""><figcaption></figcaption></figure>
   * Choose **Application type = Web application**.

     <figure><img src="/files/wOM34LcyjLniD86LyctD" alt=""><figcaption></figcaption></figure>
   * Enter a **Name** (e.g., `OvalEdgeSSO`).
   * Under **Authorized JavaScript origins**, add:

     ```
     https://<your-domain>
     ```
   * Under **Authorized redirect URIs**, add:

     ```
     https://<your-domain>/ovaledge/oauth2/code/google
     ```
   * Click **Create**.

     <figure><img src="/files/0UltJi5nyvSlw74550WU" alt=""><figcaption></figcaption></figure>
   * Copy the **Client ID** and click **OK**.\
     ![](/files/qAAQeFjfyuI9GvlFLgwc)
   * Navigate to **Clients** and click on the **OAuth2.0 Client ID**.

     <figure><img src="/files/HM9iYXlI03RFxlMkYBAN" alt=""><figcaption></figcaption></figure>
   * From the Additional Information section, copy the **Client ID** and **Client Secret**. These will be used in the OvalEdge configuration.

     <figure><img src="/files/K86U9WOXe5UAPverUU3c" alt=""><figcaption></figcaption></figure>

4. **Update OvalEdge Configuration**
   * Edit the `oasis.properties` file and add the following lines:

     ```properties
     spring.security.oauth2.client.registration.google.clientId=<Your-Client-ID>
     spring.security.oauth2.client.registration.google.clientSecret=<Your-Client-Secret>
     ```

     <figure><img src="/files/KMfzP1p1kW5jsqQBsrvg" alt=""><figcaption></figcaption></figure>

5. **Enable OAuth2 in the OvalEdge Server**
   * For Windows (Tomcat)
     * Navigate to the `Tomcat/bin` directory.
     * Create a file named `setenv.bat` with the following content:

       ```bat
       set CATALINA_OPTS=-DOVALEDGE_SECURITY_TYPE=oauth2
       ```

       <figure><img src="/files/ZRWuxo1hxjfRknvnMogM" alt=""><figcaption></figcaption></figure>
   * For Linux/Unix (Tomcat)

     * Navigate to the `Tomcat/bin` directory.
     * Create a file named `setenv.sh` with the following content:

       ```bash
       export CATALINA_OPTS="-DOVALEDGE_SECURITY_TYPE=oauth2"
       ```

       <figure><img src="/files/eAYbYWdxp7isbRu5RirF" alt=""><figcaption></figcaption></figure>
     * Make the script executable:

       ```bash
       chmod +x setenv.sh
       ```

6. **Restart the Server**
   * Restart the Tomcat server to apply the changes.
   * Once the server is up, navigate to the **OvalEdge application URL**.

     <figure><img src="/files/bVjLZJ5DOtnMr3n0TSOA" alt=""><figcaption></figcaption></figure>
   * Click **Continue with Google**.

     <figure><img src="/files/sRdKkTzJ9KQOyjmhKIy7" alt=""><figcaption></figcaption></figure>
   * Select a **Google OAuth 2.0 account**.
   * After successful validation, the **OvalEdge Home page** will appear.

     <figure><img src="/files/dJACNbwRzExJdHQRxiC9" alt=""><figcaption></figcaption></figure>

***

Copyright © 2025, OvalEdge LLC, Peachtree Corners, GA, USA.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ovaledge.com/release8.1/installation-and-settings/authentication-and-sso-setup/google.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
