> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oleria.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Cloud Platform

Oleria provides identity security and access management teams with visibility and intelligence into who has access to what, where they got that access, how they use it, and whether they should even have it. As part of that promise, we deeply integrate your Google Cloud Platform environment into the Oleria platform. This document provides step-by-step guidance for integrating GCP - at either the organization level or project level - with your Oleria workspace.

## Prerequisites

* **GCP Organization Admin** or **Project Owner** role to grant IAM roles to the connector service account
* **Google Workspace Super Admin** role to configure domain-wide delegation

<Note>Use a service account (and not an employee account) with the suggested privileges for the integration to ensure continuity.</Note>

## Integration Approaches

Oleria supports two integration scopes. Follow the one most appropriate for your organization.

* **[Organization (Recommended)](#integrate-gcp-organization)** - Oleria sees all projects, folders, and resources across your entire GCP org, including org-level IAM policies and cross-project bindings. Recommended for full visibility.
* **[Project](#integrate-gcp-project)** - Oleria is scoped to IAM bindings, resources, and storage within a single project only. Use this if you don't have org-level access or only want to connect a specific project.

***

## Integrate GCP Organization

<Steps>
  <Step title="Create a Connector Service Account">
    1. Log in to the [Google Cloud Console](https://console.cloud.google.com) and navigate to **IAM & Admin** → **Service Accounts**.

           <img src="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-1.png?fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=6fbdb506c1b9b856ed84df8cb918f3ec" alt="Google Cloud Console showing IAM & Admin > Service Accounts navigation" data-og-width="1568" width="1568" data-og-height="192" height="192" data-path="images/integrations/gcp/step-1.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-1.png?w=280&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=5530fb7e400302377e6fc25b85246dc1 280w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-1.png?w=560&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=3804c740b7857a8b2cae6d6fcb7a3f82 560w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-1.png?w=840&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=2ce61f51c688099b7d2e75b421849e44 840w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-1.png?w=1100&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=02a10be4c27b8c54741ce185f1a4116e 1100w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-1.png?w=1650&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=31950dcc9034e5e482db279448799754 1650w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-1.png?w=2500&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=0203ccafe1e6303d4161d0ba32d5ea71 2500w" />

    2. Select **Create Service Account**. Provide a name such as `oleria-connector` and select **Create and Continue**.

           <img src="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-2.png?fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=9df534d3a3793d687da073cfbf32b75f" alt="Select Create Service Account. Provide a name such as oleria-connector and click Create and Continue" width="1090" height="1156" data-path="images/integrations/gcp/step-2.png" />

    3. Skip the optional role grant and user access steps. Select **Done**.
  </Step>

  <Step title="Enable Required GCP APIs">
    The connector calls a number of Google Cloud APIs. Each one must be enabled in the **host project** of the connector service account; if any are disabled, authentication or sync will fail.

    **Option A: Using the Google Cloud Console**

    1. In the Google Cloud Console, select the project that owns the connector service account from the resource picker.
    2. Navigate to **APIs & Services** → **Enabled APIs & services** → **Enable APIs and Services**.
    3. Search for and enable each of the following:

       * Cloud Resource Manager API
       * Identity and Access Management (IAM) API
       * Cloud Asset API
       * Cloud Identity API
       * Admin SDK API
       * Cloud Storage API
       * Cloud Logging API

    **Option B: Using the gcloud CLI**

    ```bash theme={null}
    gcloud services enable \
      cloudresourcemanager.googleapis.com \
      iam.googleapis.com \
      cloudasset.googleapis.com \
      cloudidentity.googleapis.com \
      admin.googleapis.com \
      storage.googleapis.com \
      logging.googleapis.com \
      --project=YOUR_PROJECT_ID
    ```

    <Note>`YOUR_PROJECT_ID` is the project that owns the connector service account. API enablement on this single project is sufficient - the connector calls these APIs on behalf of resources across the whole organization.</Note>
  </Step>

  <Step title="Grant IAM Roles at the Organization Level">
    1. In the Google Cloud Console, click the project selector at the top of the page and select your **Organization** from the resource picker.

           <img src="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-3.png?fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=eb3ef0ce8d7a1aba33a39cc99e6a1406" alt="Google Cloud Console project selector with Organization highlighted in resource picker" width="1596" height="532" data-path="images/integrations/gcp/step-3.png" />

    2. Navigate to **IAM & Admin** → **IAM** and select **Grant Access**.

           <img src="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-4.png?fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=e8333869d124ffe55f489d919e00b169" alt="Navigate to IAM & Admin →IAM and click Grant Access" width="770" height="244" data-path="images/integrations/gcp/step-4.png" />

    3. Enter the connector service account email and assign the following roles:

    ```
    roles/iam.securityReviewer
    roles/resourcemanager.organizationViewer
    roles/resourcemanager.folderViewer
    roles/storage.objectViewer
    roles/logging.viewer
    ```

    <Note>`roles/logging.viewer` is required for activity sync via Cloud Audit Logs.</Note>
  </Step>

  <Step title="Generate a Service Account Key">
    1. In **IAM & Admin** → **Service Accounts**, select the service account you created in the first step.

    2. Navigate to the **Keys** tab and select **Add Key** → **Create new key**.

           <img src="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-5.png?fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=bed7982f1c43f5e2ed0ec94c33a578d9" alt="Service account Keys tab with Add Key > Create new key option" data-og-width="316" width="316" data-og-height="238" height="238" data-path="images/integrations/gcp/step-5.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-5.png?w=280&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=0859b4bec3fca541e1e55d6d2b908754 280w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-5.png?w=560&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=f236d6eb97bdfcc9096ed96c7bc4fe0a 560w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-5.png?w=840&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=7e4e97ecba53bb556243c0c1d3bc9267 840w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-5.png?w=1100&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=98747289f3a3430b834438fa10c141f0 1100w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-5.png?w=1650&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=88012542acda347341bb7852d2483c8c 1650w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-5.png?w=2500&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=93552101549a7513ba7aa168778284c0 2500w" />

    3. Select **JSON** format and select **Create**. The key file will be downloaded to your machine. Keep this file secure - you will provide it to Oleria in the final step.

           <img src="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-6.png?fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=7a5d7c7b36fbf94eb8599808043536e9" alt="Service account key creation dialog with JSON format selected" width="1126" height="668" data-path="images/integrations/gcp/step-6.png" />
  </Step>

  <Step title="Configure Domain-Wide Delegation in Google Workspace">
    Domain-wide delegation allows the connector service account to enumerate Google Workspace users and groups on behalf of a delegated admin.

    1. Log in to the [Google Workspace Admin Console](https://admin.google.com) and navigate to **Security** → **Access and data control** → **API controls**. Under **Domain-wide delegation**, select **Manage Domain Wide Delegation**.

           <img src="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-7.png?fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=5c53f5419f9409af17e5cf664d77f6f6" alt="Google Workspace Admin Console Security > API Controls > Domain-wide Delegation" data-og-width="2116" width="2116" data-og-height="328" height="328" data-path="images/integrations/gcp/step-7.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-7.png?w=280&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=9ad6e979a13fa7cdc686320b2e3d5407 280w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-7.png?w=560&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=fe0d5f6d498123b1bcb0b068a6a51d62 560w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-7.png?w=840&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=fcd97cae596a6eb69218c07fd00597dc 840w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-7.png?w=1100&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=2fd3cb01832f9b6e4c16cc0d8a251e31 1100w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-7.png?w=1650&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=1adc44b02d981aba371964d3d65fcad5 1650w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-7.png?w=2500&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=951a1d9f8d7220a651d5992c91eefc0d 2500w" />

    2. Select **Add new**.

    3. Provide the **Client ID** of the service account (found under **IAM & Admin** → **Service Accounts** → select the SA → **Details** tab → **Unique ID**) and add the following OAuth scopes:

    ```
    https://www.googleapis.com/auth/admin.directory.user.readonly
    https://www.googleapis.com/auth/cloud-identity.groups.readonly
    ```

    <img src="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-8.png?fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=8df3cc76e8d7b872884c0f3f2f1cc8ba" alt="Domain-wide delegation dialog with Client ID and OAuth scopes fields completed" width="928" height="824" data-path="images/integrations/gcp/step-8.png" />

    4. Select **Authorize**.

    <Note>The Google Workspace admin email provided as the Workspace Delegate Email in the final step must have at least read access to user and group directories.</Note>
  </Step>

  <Step title="Set Up Audit Log Export for Activity Sync">
    This step enables Oleria to ingest Cloud Audit Logs for user activity insights.

    <Note>Choose a globally unique name for your audit log bucket - you'll use it as `YOUR_AUDIT_BUCKET` throughout this step.</Note>

    **Option A: Using the Google Cloud Console**

    1. In the Google Cloud Console, ensure your **Organization** is selected in the resource picker, then navigate to **Cloud Storage** → **Buckets** and select **Create**.
    2. Provide a globally unique bucket name (this will be your `YOUR_AUDIT_BUCKET`).
    3. Choose a location and accept the defaults for the remaining options.
    4. Select **Create**.
    5. Navigate to **Logging** → **Log Router** and confirm the resource scope is set to your **Organization**. Select **Create Sink**.
    6. On the **Sink details** step, enter `audit-log-sink` as the sink name and select **Next**.
    7. On the **Sink destination** step, select **Cloud Storage bucket**, then choose the bucket created above. Select **Next**.
    8. On the **Choose logs to include in sink** step, enter the following inclusion filter and select **Next**:

    ```
    logName=~"cloudaudit.googleapis.com"
    ```

    9. Skip the exclusion filters step and select **Create Sink**. Ensure **include logs from children** (sub-folders and projects) is enabled so that audit logs from the entire organization are exported.
    10. After the sink is created, open it from the Log Router page and copy the **Writer Identity** service account email (e.g. `serviceAccount:p123456789-xxxxxx@gcp-sa-logging.iam.gserviceaccount.com`).
    11. Navigate to **Cloud Storage** → **Buckets**, select the audit log bucket, open the **Permissions** tab, and select **Grant Access**. Add two principals:
        * The sink **Writer Identity** with the role **Storage Object Creator** (`roles/storage.objectCreator`)
        * The connector service account (`oleria-connector@YOUR_PROJECT_ID.iam.gserviceaccount.com`) with the role **Storage Object Viewer** (`roles/storage.objectViewer`)

    Select **Save**.

    **Option B: Using the gcloud CLI**

    1. Create a GCS bucket to receive audit logs:

    ```bash theme={null}
    gsutil mb -p YOUR_PROJECT_ID gs://YOUR_AUDIT_BUCKET
    ```

    2. Create a Log Sink that exports organization-wide audit logs to the bucket:

    ```bash theme={null}
    gcloud logging sinks create audit-log-sink \
      storage.googleapis.com/YOUR_AUDIT_BUCKET \
      --log-filter='logName=~"cloudaudit.googleapis.com"' \
      --include-children \
      --organization=YOUR_ORG_ID
    ```

    3. Grant the sink's writer service account write access to the bucket:

    ```bash theme={null}
    SINK_SA=$(gcloud logging sinks describe audit-log-sink \
      --organization=YOUR_ORG_ID --format='value(writerIdentity)')

    gsutil iam ch ${SINK_SA}:objectCreator gs://YOUR_AUDIT_BUCKET
    ```

    4. Grant the connector service account read access to the bucket:

    ```bash theme={null}
    gsutil iam ch serviceAccount:oleria-connector@YOUR_PROJECT_ID.iam.gserviceaccount.com:objectViewer \
      gs://YOUR_AUDIT_BUCKET
    ```

    <Note>Oleria automatically discovers the audit log bucket by inspecting Log Sinks - no additional configuration is needed in the Oleria workspace.</Note>
  </Step>

  <Step title="Connect GCP Organization to Oleria">
    1. Log in to your Oleria workspace, select **Integrations** → select **Google Cloud Platform**. A side panel opens. Select **Organization (Recommended)** from the **Connector Scope** dropdown.

           <img src="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-9.png?fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=72100ee2422a36a6fa8270168c01e206" alt="Oleria workspace GCP integration panel with Organization scope selected" width="886" height="326" data-path="images/integrations/gcp/step-9.png" />

    2. Provide the following and select **Authenticate**:

    * **Organization ID** - your numeric GCP Organization ID (e.g. `123456789012`). Found under **IAM & Admin** → **Settings** in the Cloud Console.
    * **Workspace Delegate Email** - email address of the Google Workspace admin whose permissions will be used to enumerate users and groups
    * **Service Account Credentials** - paste the full contents of the JSON key file downloaded above

    3. Find the newly integrated GCP Organization in your Oleria workspace connected integrations.
  </Step>
</Steps>

***

## Integrate GCP Project

<Steps>
  <Step title="Create a Connector Service Account">
    1. Log in to the [Google Cloud Console](https://console.cloud.google.com), select the target project, and navigate to **IAM & Admin** → **Service Accounts**.

           <img src="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-1.png?fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=6fbdb506c1b9b856ed84df8cb918f3ec" alt="Google Cloud Console showing IAM & Admin > Service Accounts for the target project" data-og-width="1568" width="1568" data-og-height="192" height="192" data-path="images/integrations/gcp/step-1.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-1.png?w=280&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=5530fb7e400302377e6fc25b85246dc1 280w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-1.png?w=560&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=3804c740b7857a8b2cae6d6fcb7a3f82 560w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-1.png?w=840&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=2ce61f51c688099b7d2e75b421849e44 840w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-1.png?w=1100&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=02a10be4c27b8c54741ce185f1a4116e 1100w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-1.png?w=1650&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=31950dcc9034e5e482db279448799754 1650w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-1.png?w=2500&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=0203ccafe1e6303d4161d0ba32d5ea71 2500w" />

    2. Select **Create Service Account**. Provide a name such as `oleria-connector` and select **Create and Continue**.

           <img src="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-2.png?fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=9df534d3a3793d687da073cfbf32b75f" alt="Select Create Service Account. Provide a name such as oleria-connector and click Create and Continue" width="1090" height="1156" data-path="images/integrations/gcp/step-2.png" />

    3. Skip the optional role grant and user access steps. Select **Done**.
  </Step>

  <Step title="Enable Required GCP APIs">
    The connector calls a number of Google Cloud APIs. Each one must be enabled in the **host project** of the connector service account; if any are disabled, authentication or sync will fail.

    **Option A: Using the Google Cloud Console**

    1. In the Google Cloud Console, select the project that owns the connector service account from the resource picker.
    2. Navigate to **APIs & Services** → **Enabled APIs & services** → **Enable APIs and Services**.
    3. Search for and enable each of the following:

       * Cloud Resource Manager API
       * Identity and Access Management (IAM) API
       * Cloud Identity API
       * Admin SDK API
       * Cloud Storage API
       * Cloud Logging API

    **Option B: Using the gcloud CLI**

    ```bash theme={null}
    gcloud services enable \
      cloudresourcemanager.googleapis.com \
      iam.googleapis.com \
      cloudidentity.googleapis.com \
      admin.googleapis.com \
      storage.googleapis.com \
      logging.googleapis.com \
      --project=YOUR_PROJECT_ID
    ```

    <Note>`YOUR_PROJECT_ID` is the project that owns the connector service account, which is also the target project for this integration.</Note>
  </Step>

  <Step title="Grant IAM Roles at the Project Level">
    1. In the Google Cloud Console, navigate to **IAM & Admin** → **IAM** for the target project and select **Grant Access**.

           <img src="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-4.png?fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=e8333869d124ffe55f489d919e00b169" alt="Google Cloud Console project IAM page with Grant Access button highlighted" width="770" height="244" data-path="images/integrations/gcp/step-4.png" />

    2. Enter the connector service account email and assign the following roles:

    ```
    roles/iam.securityReviewer
    roles/storage.objectViewer
    roles/logging.viewer
    ```

    <Note>`roles/logging.viewer` is required for activity sync via Cloud Audit Logs.</Note>
  </Step>

  <Step title="Generate a Service Account Key">
    1. In **IAM & Admin** → **Service Accounts**, select the service account you created in the first step.

    2. Navigate to the **Keys** tab and select **Add Key** → **Create new key**.

           <img src="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-5.png?fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=bed7982f1c43f5e2ed0ec94c33a578d9" alt="Service account Keys tab with Add Key > Create new key option" data-og-width="316" width="316" data-og-height="238" height="238" data-path="images/integrations/gcp/step-5.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-5.png?w=280&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=0859b4bec3fca541e1e55d6d2b908754 280w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-5.png?w=560&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=f236d6eb97bdfcc9096ed96c7bc4fe0a 560w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-5.png?w=840&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=7e4e97ecba53bb556243c0c1d3bc9267 840w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-5.png?w=1100&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=98747289f3a3430b834438fa10c141f0 1100w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-5.png?w=1650&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=88012542acda347341bb7852d2483c8c 1650w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-5.png?w=2500&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=93552101549a7513ba7aa168778284c0 2500w" />

    3. Select **JSON** format and select **Create**. The key file will be downloaded to your machine. Keep this file secure - you will provide it to Oleria in the final step.

           <img src="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-6.png?fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=7a5d7c7b36fbf94eb8599808043536e9" alt="Service account key creation dialog with JSON format selected" width="1126" height="668" data-path="images/integrations/gcp/step-6.png" />
  </Step>

  <Step title="Configure Domain-Wide Delegation in Google Workspace">
    Domain-wide delegation allows the connector service account to enumerate Google Workspace users and groups on behalf of a delegated admin.

    1. Log in to the [Google Workspace Admin Console](https://admin.google.com) and navigate to **Security** → **Access and data control** → **API controls**. Under **Domain-wide delegation**, select **Manage Domain Wide Delegation**.

           <img src="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-7.png?fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=5c53f5419f9409af17e5cf664d77f6f6" alt="Google Workspace Admin Console Security > API Controls > Domain-wide Delegation" data-og-width="2116" width="2116" data-og-height="328" height="328" data-path="images/integrations/gcp/step-7.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-7.png?w=280&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=9ad6e979a13fa7cdc686320b2e3d5407 280w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-7.png?w=560&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=fe0d5f6d498123b1bcb0b068a6a51d62 560w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-7.png?w=840&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=fcd97cae596a6eb69218c07fd00597dc 840w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-7.png?w=1100&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=2fd3cb01832f9b6e4c16cc0d8a251e31 1100w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-7.png?w=1650&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=1adc44b02d981aba371964d3d65fcad5 1650w, https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-7.png?w=2500&fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=951a1d9f8d7220a651d5992c91eefc0d 2500w" />

    2. Select **Add new**.

    3. Provide the **Client ID** of the service account (found under **IAM & Admin** → **Service Accounts** → select the SA → **Details** tab → **Unique ID**) and add the following OAuth scopes:

    ```
    https://www.googleapis.com/auth/admin.directory.user.readonly
    https://www.googleapis.com/auth/cloud-identity.groups.readonly
    ```

    <img src="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-8.png?fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=8df3cc76e8d7b872884c0f3f2f1cc8ba" alt="Domain-wide delegation dialog with Client ID and OAuth scopes fields completed" width="928" height="824" data-path="images/integrations/gcp/step-8.png" />

    4. Select **Authorize**.

    <Note>The Google Workspace admin email provided as the Workspace Delegate Email in the final step must have at least read access to user and group directories.</Note>
  </Step>

  <Step title="Set Up Audit Log Export for Activity Sync">
    This step enables Oleria to ingest Cloud Audit Logs for user activity insights.

    <Note>Choose a globally unique name for your audit log bucket - you'll use it as `YOUR_AUDIT_BUCKET` throughout this step.</Note>

    **Option A: Using the Google Cloud Console**

    1. In the Google Cloud Console, ensure the target **Project** is selected in the resource picker, then navigate to **Cloud Storage** → **Buckets** and select **Create**.
    2. Provide a globally unique bucket name (this will be your `YOUR_AUDIT_BUCKET`).
    3. Choose a location and accept the defaults for the remaining options.
    4. Select **Create**.
    5. Navigate to **Logging** → **Log Router** and confirm the resource scope is set to your target **Project**. Select **Create Sink**.
    6. On the **Sink details** step, enter `audit-log-sink` as the sink name and select **Next**.
    7. On the **Sink destination** step, select **Cloud Storage bucket**, then choose the bucket created above. Select **Next**.
    8. On the **Choose logs to include in sink** step, enter the following inclusion filter and select **Next**:

    ```
    logName=~"cloudaudit.googleapis.com"
    ```

    9. Skip the exclusion filters step and select **Create Sink**.
    10. After the sink is created, open it from the Log Router page and copy the **Writer Identity** service account email (e.g. `serviceAccount:p123456789-xxxxxx@gcp-sa-logging.iam.gserviceaccount.com`).
    11. Navigate to **Cloud Storage** → **Buckets**, select the audit log bucket, open the **Permissions** tab, and select **Grant Access**. Add two principals:
        * The sink **Writer Identity** with the role **Storage Object Creator** (`roles/storage.objectCreator`)
        * The connector service account (`oleria-connector@YOUR_PROJECT_ID.iam.gserviceaccount.com`) with the role **Storage Object Viewer** (`roles/storage.objectViewer`)

    Select **Save**.

    **Option B: Using the gcloud CLI**

    1. Create a GCS bucket to receive audit logs:

    ```bash theme={null}
    gsutil mb -p YOUR_PROJECT_ID gs://YOUR_AUDIT_BUCKET
    ```

    2. Create a Log Sink that exports project-level audit logs to the bucket:

    ```bash theme={null}
    gcloud logging sinks create audit-log-sink \
      storage.googleapis.com/YOUR_AUDIT_BUCKET \
      --log-filter='logName=~"cloudaudit.googleapis.com"' \
      --project=YOUR_PROJECT_ID
    ```

    3. Grant the sink's writer service account write access to the bucket:

    ```bash theme={null}
    SINK_SA=$(gcloud logging sinks describe audit-log-sink \
      --project=YOUR_PROJECT_ID --format='value(writerIdentity)')

    gsutil iam ch ${SINK_SA}:objectCreator gs://YOUR_AUDIT_BUCKET
    ```

    4. Grant the connector service account read access to the bucket:

    ```bash theme={null}
    gsutil iam ch serviceAccount:oleria-connector@YOUR_PROJECT_ID.iam.gserviceaccount.com:objectViewer \
      gs://YOUR_AUDIT_BUCKET
    ```

    <Note>Oleria automatically discovers the audit log bucket by inspecting Log Sinks - no additional configuration is needed in the Oleria workspace.</Note>
  </Step>

  <Step title="Connect GCP Project to Oleria">
    1. Log in to your Oleria workspace, select **Integrations** → select **Google Cloud Platform**. A side panel opens. Select **Project** from the **Connector Scope** dropdown.

           <img src="https://mintcdn.com/oleria/9JqkTE08dtMglr5Z/images/integrations/gcp/step-10.png?fit=max&auto=format&n=9JqkTE08dtMglr5Z&q=85&s=40a80025c68f82555743b0803b86b111" alt="Oleria workspace GCP integration panel with Project scope selected" width="858" height="322" data-path="images/integrations/gcp/step-10.png" />

    2. Provide the following and select **Authenticate**:

    * **Project ID** - your GCP Project ID (e.g. `my-project`). Found in the Cloud Console project selector at the top of the page.
    * **Workspace Delegate Email** - email address of the Google Workspace admin whose permissions will be used to enumerate users and groups
    * **Service Account Credentials** - paste the full contents of the JSON key file downloaded above

    3. Find the newly integrated GCP Project in your Oleria workspace connected integrations.
  </Step>
</Steps>

***

## Enable Remediations (Optional)

Remediations allow Oleria to take automated or one-click corrective actions - such as revoking an IAM binding, removing a group member, or disabling a service account - directly from the Oleria workspace.

To allow Oleria to take remediation actions in your GCP environment, grant the connector service account the following additional roles:

* To **revoke an IAM binding at the project level**, grant `roles/resourcemanager.projectIamAdmin` on the project.
* To **revoke an IAM binding at the organization level**, grant `roles/resourcemanager.organizationIamAdmin` on the organization.
* To **remove a member from a Cloud Identity group**, grant `roles/cloudidentity.groups.editor`.
* To **disable a service account**, grant `roles/iam.serviceAccountAdmin` on the project that owns the service account.

## Contact us

For questions about this integration, contact us at [support@oleria.com](mailto:support@oleria.com).
