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

# Google Users

> Connect ThreatAware to Google Cloud to monitor cloud infrastructure and instances

## Overview

The Google Users integration enables ThreatAware to collect infrastructure and instance data from your Google Cloud Platform projects. This integration provides visibility into your cloud infrastructure and helps validate cloud resource security and compliance controls.

<Info>
  **Connection Method**: OAuth / Service Account
  **Setup Time**: 20 minutes
  **Access Required**: Google Cloud Project with appropriate IAM permissions
</Info>

## Data collected

The Google Users integration provides:

* Google Cloud Compute instances and VMs
* Instance configuration and metadata
* Network and security settings
* Resource organisation and inventory

## Use cases

<CardGroup cols={2}>
  <Card title="Cloud Infrastructure Visibility" icon="cloud">
    Monitor all Compute instances across your Google Cloud projects
  </Card>

  <Card title="Multi-Project Management" icon="sitemap">
    Track infrastructure across multiple Google Cloud projects
  </Card>

  <Card title="Security Posture Assessment" icon="shield-check">
    Validate cloud instance security configurations and compliance
  </Card>

  <Card title="Compliance Reporting" icon="file-check">
    Generate reports showing cloud infrastructure coverage and compliance
  </Card>
</CardGroup>

## Setup instructions

<Steps>
  <Step title="Log in to ThreatAware">
    Access the ThreatAware dashboard.

    * Navigate to **Settings** > **Systems**
    * Search for "Google" in the search bar
    * Click **Connect** to start the integration
  </Step>

  <Step title="Enable Google Cloud Compute API">
    Log in to your Google Cloud Platform console.

    * Select your desired **Project**
    * Navigate to **APIs & Services** > **Library**
    * Search for "Google Cloud Compute API"
    * Click **Enable** to activate the API for your project

    <Tip>
      You must enable this API for each project you want to monitor. If monitoring multiple projects, repeat this step for each project ID.
    </Tip>
  </Step>

  <Step title="Create a Custom Role">
    In the Google Cloud Console:

    * Navigate to **IAM & Admin** > **Roles**
    * Click **Create Role**
    * Enter the following details:
      * **Title**: `ThreatAware_Role` (or similar)
      * **ID**: Auto-populated (e.g., `threataware_role`)
      * **Description**: "Role for ThreatAware integration"
  </Step>

  <Step title="Add Permissions to Role">
    In the role creation dialog:

    * Click **Add Permissions**
    * Add these required permissions:
      * `compute.instances.get`
      * `compute.instances.list`
    * Verify both permissions are listed
    * Click **Create** to finalize the role
  </Step>

  <Step title="Configure IAM Access">
    In the Google Cloud Console:

    * Navigate to **IAM & Admin** > **IAM**
    * Click **Add** at the top of the page
    * Under **New members**, add this service account:
      ```text theme={null}
      threataware-cloud-connector@threataware-cloud-connector.iam.gserviceaccount.com
      ```
    * Select **Role** and choose the custom role created in step 3
    * Click **Save** to grant access
  </Step>

  <Step title="Retrieve Project ID">
    Obtain your Google Cloud Project ID:

    * Navigate to **Home** > **Dashboard** in the Google Cloud Console
    * Locate the **Project Info** section
    * Copy the **Project ID** displayed
    * If monitoring multiple projects, note the Project ID for each

    <Tip>
      The Project ID is a unique identifier for each Google Cloud project. It differs from the Project Name and is required for integration.
    </Tip>
  </Step>

  <Step title="Input Project IDs in ThreatAware">
    Return to the ThreatAware connection dialog:

    * Click **Authorize** to proceed with authorization
    * Enter your Google Cloud **Project ID**
    * If monitoring multiple projects, separate Project IDs with commas
    * Click **Connect** or **Authorize** to complete the integration
  </Step>

  <Step title="Verify Connection">
    After connecting, verify the integration is working correctly.

    * Check that the authorization status shows as **successful**
    * Navigate to ThreatAware's device or infrastructure list
    * Wait 5-10 minutes for initial data synchronization
    * Verify Google Cloud instances are appearing
  </Step>
</Steps>

## Required credentials

<AccordionGroup>
  <Accordion title="Google Cloud Project ID" icon="key">
    **Field Name**: Google Cloud Project ID
    **Type**: String
    **Description**: The unique identifier for your Google Cloud project

    **Format**: Alphanumeric with hyphens (e.g., `my-project-123456`)
    **Where to find**: Google Cloud Console > Home > Project Info
    **Multiple projects**: Separate with commas (e.g., `project-1,project-2,project-3`)

    <Tip>
      Do not confuse the Project ID with the Project Name. The ID is what you need for the integration.
    </Tip>
  </Accordion>
</AccordionGroup>

## Verification and testing

After setup, verify the integration is working correctly:

1. **Check Authorization Status**
   * Navigate to **Settings** > **Systems** in ThreatAware
   * Confirm the Google Users integration shows **Active** or **Connected** status
   * Check the last sync timestamp

2. **Verify Data Collection**
   * Wait 10 minutes for the initial data poll
   * Look for Google Cloud Compute instances appearing in ThreatAware
   * Verify instance information is accurate and complete
   * Check that all specified projects are included

3. **Test Multi-Project Setup**
   * If using multiple projects, verify instances from each project appear
   * Confirm instance counts match your Google Cloud environment

## Troubleshooting

<AccordionGroup>
  <Accordion title="API Not Enabled Error" icon="triangle-exclamation">
    **Symptoms**: Integration fails with message about Compute API

    **Solutions**:

    * Verify you've enabled the Google Cloud Compute API
    * Navigate to **APIs & Services** > **Library**
    * Search for "Google Cloud Compute API"
    * Ensure **Enable** status shows it's active
    * Wait a few minutes for API activation to complete
    * Try connecting again after API is enabled
  </Accordion>

  <Accordion title="Permission Denied / Access Error" icon="ban">
    **Symptoms**: Authorization fails or permissions are insufficient

    **Solutions**:

    * Verify the custom role has both required permissions:
      * `compute.instances.get`
      * `compute.instances.list`
    * Confirm the service account is assigned to the role via IAM
    * Check that the service account was granted access in step 5
    * Review IAM settings to ensure role is applied correctly
    * Verify you're using the correct service account email
  </Accordion>

  <Accordion title="Invalid Project ID" icon="database">
    **Symptoms**: Connection fails with invalid project error

    **Solutions**:

    * Verify the Project ID format (alphanumeric with hyphens)
    * Do not use the Project Name - use the Project ID only
    * Check Project ID in Google Cloud Console > Home > Project Info
    * Ensure Project ID is correctly spelled without extra spaces
    * For multiple projects, use correct format: `project-1,project-2`
    * Test each Project ID individually if issues occur
  </Accordion>

  <Accordion title="No Instances Appearing" icon="server">
    **Symptoms**: Integration connects but no Google Cloud instances appear

    **Solutions**:

    * Verify Compute instances actually exist in your project
    * Wait at least 10 minutes for initial data synchronization
    * Confirm the Compute API is enabled for the specified project
    * Check that the custom role has the required `compute.instances.list` permission
    * Verify instances are in a region supported by Google Cloud
    * Review instance count in Google Cloud Console to confirm data exists
  </Accordion>

  <Accordion title="Authorization Errors" icon="shield">
    **Symptoms**: OAuth authorization fails or times out

    **Solutions**:

    * Verify your Google account has access to the Google Cloud project
    * Check that you're authenticating with the correct Google account
    * Ensure popup windows are allowed in your browser
    * Clear browser cookies and try authorization again
    * Verify internet connectivity to Google services
    * Try using an incognito/private browser window
  </Accordion>
</AccordionGroup>

## API permissions reference

The custom role should include these permissions:

* `compute.instances.get` - Read individual instance details
* `compute.instances.list` - List all instances in a project

For detailed permission information, refer to the [Google Cloud Compute Documentation](https://cloud.google.com/compute/docs/reference/rest/v1).

## Additional resources

<CardGroup cols={2}>
  <Card title="Google Cloud Compute Documentation" icon="book" href="https://cloud.google.com/compute/docs/reference/rest/v1">
    Official Google Cloud documentation for API configuration and permissions
  </Card>

  <Card title="ThreatAware Support" icon="life-ring" href="mailto:help@threataware.com">
    Contact ThreatAware support for integration assistance
  </Card>
</CardGroup>

## Best practices

<Tip>
  **Project Organisation**

  * Start by enabling the Compute API for one test project
  * Create the custom role following the documented permissions
  * Test integration with the first project before adding more
  * Document all Project IDs being monitored
  * Review authorization settings quarterly
</Tip>

<Tip>
  **Security Considerations**

  * Only grant the minimum required permissions (`compute.instances.get` and `list`)
  * Restrict access to the custom role
  * Avoid using Owner or Editor roles for integrations
  * Follow Google Cloud's least privilege principles
  * Monitor service account activity in Cloud Audit Logs
  * Rotate or review service account credentials regularly
</Tip>
