# GCP Integration (Old Flow)

### Connect GCP Using Previous Methods

These methods apply to organisations that integrated Google Cloud Platform (GCP) **before the Workload Identity Federation (WIF) upgrade introduced on December 6, 2024**.

The legacy integration uses **service account JSON keys** for authentication. This method requires periodic key rotation and is less secure than the WIF-based integration.

Sprinto recommends migrating to the **Workload Identity Federation (WIF) method** whenever possible.

Before continuing, complete the steps in [**Navigate to the GCP integration in Sprinto**](#step-1-navigate-to-gcp-integration).

***

### Legacy Method 1: Cloud Shell (JSON Key-Based)

This method automatically creates the required service account and permissions using a setup script executed in **Google Cloud Shell**.

#### Step 1: Run Bash Script in Cloud Shell

1. Enter the Project Id.
2. Select the **Use Google Cloud Shell** check box.
3. Click **Continue**.

<figure><img src="/files/7ctfnfHxRZJcvHohNthr" alt="" width="375"><figcaption></figcaption></figure>

10. Copy the provided script.
11. Run it in **Google Cloud Shell**.
12. The script creates:
    * Service account
    * Security Reviewer role assignment
    * Required APIs

<figure><img src="/files/kha0RjFRskROWntToEmF" alt="" width="375"><figcaption></figcaption></figure>

***

#### Step 2: Download JSON Key

When prompted:

* Download the generated JSON private key file.

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

***

#### Step 3: Upload Key in Sprinto

1. Upload the JSON file in Sprinto.
2. The **Connect** button becomes active.
3. Click **Connect**.

<figure><img src="/files/yoOLIUyz1AOSqast2vDb" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="warning" %}

#### Important

Rotate this key every 90 days.
{% endhint %}

***

### Legacy Method 2: Manual (JSON Key-Based)

Use this method if you prefer to create the service account and permissions manually in Google Cloud.

#### Step 1: Create Service Account

1. Enter the Project Id.
2. Select the **Set up service account manually** check box.
3. Click **Continue**.

<figure><img src="/files/LMyJaoDDVfiMO9sbMRiI" alt="" width="375"><figcaption></figcaption></figure>

10. Log in to GCP.
11. Navigate to **IAM & Admin → Service Accounts**.
12. Click **Create service account**.
13. Assign roles:
    * Security Reviewer
    * Compute Viewer
    * Monitoring Editor
14. Click **Done**.

<figure><img src="/files/RRCZgv4jg7grA9h9KGWI" alt="" width="563"><figcaption></figcaption></figure>

***

#### Step 2: Create Access Keys

1. Open the newly created service account.
2. Click **Actions → Manage Keys**.
3. Click **Add Key → Create new key**.
4. Select **JSON**.
5. Click **Create**.

<figure><img src="/files/AYahReZM0kfpvoXMTIOc" alt="" width="563"><figcaption></figcaption></figure>

6. Download the key file.

***

#### Step 3: Enable Required APIs

Enable the required APIs in each production project.

***

#### Step 4: Upload JSON Key in Sprinto

1. Upload the downloaded JSON key file.
2. Click **Connect**.

<figure><img src="/files/Vyxxk6eunAeYKpslNbyL" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="warning" %}

#### Important

Rotate this key every 90 days.
{% endhint %}


---

# 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.sprinto.com/integrations/overview/gcp-integration/gcp-integration-old-flow.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.
