Onboard a Google Cloud Platform Account

A couple methods for onboarding your GCP Accounts (projects in GCP's parlance) are available depending on whether you're a non-admin or admin user.

Resuming cloud onboarding to InsightCloudSec

If you close the interface before completing Account onboarding, you can resume onboarding from the page you were on last.

Non-Admin User Instructions

Ask an admin for required information

As a non-admin user, you need to copy and send a message to the admin asking them to complete specific tasks and provide you with the information needed to complete onboarding.

First-time Users
  1. Login to InsightCloudSec using one of the methods below:
    • In the Insight Platform, click InsightCloudSec to launch the onboarding wizard.
    • Open a browser window to your unique InsightCloudSec URL and login. The onboarding wizard will appear automatically.
  2. On the Welcome screen, review key features and capabilities, then click Onboard a Cloud Account.
  3. On the Cloud Service Providers screen, select Google Cloud Platform.
  4. Select No - Help me identify the details needed, then click Next.
  5. Click the Copy button in the Google Cloud Platform Admin Instructions text box and share them with the admin.
Returning Users
  1. Login to InsightCloudSec using one of the methods below:
    • In the Insight Platform, click the InsightCloudSec tile.
    • Open a browser window to your unique InsightCloudSec URL and login.
  2. Navigate to Cloud > Cloud Accounts in the left-hand navigation menu.
  3. Click the + Add Cloud button in the top right-hand corner.
  4. Click the Google Cloud Platform button.
  5. Click Don't have admin access? in the bottom right-hand corner of the window.
  6. Click the Copy button in the Google Cloud Platform Admin Instructions text box and share them with the admin.

Connect the Account

When your admin has completed their steps and provided the information to you, you can now connect the Account.

First-time Users
  1. Return to InsightCloudSec using one of the methods below:
    • In the Insight Platform, click InsightCloudSec to launch the onboarding wizard.
    • Open a browser window to your unique InsightCloudSec URL and login. The onboarding wizard will appear automatically.
  2. The wizard should automatically return you to the Google Cloud Platform Admin Instructions page.
  3. Enter the following information (provided by your admin):
    1. Copy/paste the Nickname for the Account. This is a unique value that will be used to search Accounts across the system based on an identifiable label.
    2. Copy/paste the API Credentials and Project ID.
    3. Optionally, provide the Email Delegation.
  4. Click Connect Account.
Returning Users
  1. Login to InsightCloudSec using one of the methods below:
    • In the Insight Platform, click the InsightCloudSec tile.
    • Open a browser window to your unique InsightCloudSec URL and login.
  2. Navigate to Cloud > Cloud Accounts in the left-hand navigation menu.
  3. Click the + Add Cloud button in the top right-hand corner.
  4. Click the Google Cloud Platform button.
  5. Click Don't have admin access? in the bottom right-hand corner of the window.
  6. Enter the following information (provided by your admin):
    1. Copy/paste the Nickname for the Account. This is a unique value that will be used to search Accounts across the system based on an identifiable label.
    2. Copy/paste the API Credentials and Project ID.
    3. Optionally, provide the Email Delegation.
  7. Click Connect Account.

Admin User Instructions

As an admin, you must prepare your Account for the connection with InsightCloudSec by creating a new service account & creating and assigning a custom role within GCP.

Providing details to a non-admin user?

If you are providing details to a non-admin user to onboard the Account, ensure that the credentials you share with the non-admin user will include the appropriate access and enable them to connect your GCP project with InsightCloudSec successfully. We recommend using a secure file sharing system to provide credentials to your non-admin user.

GCP Admin Onboarding Prerequisites

  • Domain Admin permissions within InsightCloudSec
  • Appropriate permissions in GCP to create service accounts, roles, and enable APIs within the desired project
    • If enabling Email Delegation/Directory Support, you'll need GCP Super Admin privileges

Prepare GCP for Onboarding

To onboard a single project for GCP you need to complete one of the following set of instructions:

For successful onboarding, the Cloud Resource Manager API, Cloud Asset API, Policy Analyzer API, and Service Usage API are required to be enabled in the project containing the Service Account that will be provisioned. Due to the current GCP harvesting structure in InsightCloudSec, API services will need to be enabled in each project (including the project containing the Service Account) for proper harvesting. See our list of Recommended APIs.

Manual Onboarding using the GCP console

InsightCloudSec onboarding can proceed much more quickly and easily if you have both your InsightCloudSec instance and the GCP console open side-by-side in your preferred browser's windows/tabs.

Step 1: Create a Service Account
  1. Login to your InsightCloudSec instance and open the Cloud Onboarding interface.
    • First-time Users:
      1. On the Welcome screen, review key features and capabilities, then click Onboard a Cloud Account.
      2. On the Cloud Service Providers screen, select Google Cloud Platform.
      3. Select Yes - I have permissions to create service accounts, roles and enable APIs, then click Next.
      4. For your connection journey, click Manual Steps, then click Next.
    • Returning Users:
      1. Navigate to Cloud > Cloud Accounts in the left navigation menu.
      2. Click the + Add Cloud button in the top right corner.
      3. Click the Google Cloud Platform button.
      4. For your connection journey, click Manual Steps.
  2. In a separate browser tab or window, login as an Admin to the GCP Console for the project you want to harvest.

In the GCP Console:

  1. Log in to your GCP account and select the project you want to onboard.
  2. On the project's dashboard, copy and save the Project ID.
  3. Go to IAM & Admin > Service Account, and click Create Service Account.
  4. Complete the service account details. We recommend including ICS or InsightCloudSec in the details for tracking purposes.
  5. Click Done.
  6. Copy and save the Service Account ID for generating a key and for onboarding the account in InsightCloudSec.
Step 2: Generate a Service Account Key

In the GCP Console:

  1. In the newly created Service Account, paste the Service Account ID into the filter input.
  2. Click the email address link to view the details.
  3. In the KEYS section, select ADD KEY.
  4. Select Create New Key.
  5. For the Key Type, select JSON, and then click Create to download the key.
  6. Copy and save this JSON file in a secure place; it contains the only copy of the key, which is required for onboarding the account in InsightCloudSec.

In the InsightCloudSec Cloud Onboarding interface:

  1. For 1. Authentication:
    1. Copy/paste the API Credentials and the Project ID.
    2. Click Next.
Step 3: Create a custom role

In the GCP Console:

  1. Go to IAM & Admin > Roles and click Create Role.
  2. Enter a name and description for the role. We recommend including InsightCloudSec here for tracking purposes.
  3. Click add permissions, and using the filter field provided, select the following permissions:
    • bigquery.tables.get
    • bigquery.tables.list
    • cloudasset.assets.listResource
    • cloudasset.assets.searchAllIamPolicies
    • serviceusage.services.enable
    • storage.buckets.get
    • storage.buckets.getIAMPolicy
  4. Click Add to finalize the permissions.
  5. Click Create to save the role.
Step 4: Assign Roles to the Service Account

In the GCP Console:

  1. Go to IAM & Admin > IAM and on the View by Principals tab, click Grant Access.
  2. In the New principals field, paste the Service Account Email (taken from the Service Account details page).
  3. Add the following roles to the Service Account:
    • Basic > Viewer (Editor to allow InsightCloudSec to have write permissions into GCP).
    • Custom > Custom InsightCloudSec Role created in the previous section.
  4. Click Save.

Manual Onboarding instructions complete!

After completing these steps, you have completed the manual onboarding instructions for GCP. Jump to the Connect the Account in InsightCloudSec instructions.


Automated Onboarding using GCP Cloud Shell

InsightCloudSec onboarding can proceed much more quickly and easily if you have both your InsightCloudSec instance and the GCP console open side-by-side in your preferred browser's windows/tabs.

Step 1: Create a Service Account Automatically
  1. Login to your InsightCloudSec instance and open the Cloud Onboarding interface.
    • First-time Users:
      1. On the Welcome screen, review key features and capabilities, then click Onboard a Cloud Account.
      2. On the Cloud Service Providers screen, select Google Cloud Platform.
      3. Select Yes - I have permissions to create service accounts, roles and enable APIs, then click Next.
      4. For your connection journey, click Google Cloud Platform Script, then click Next.
    • Returning Users:
      1. Navigate to Cloud > Cloud Accounts in the left navigation menu.
      2. Click the + Add Cloud button in the top right corner.
      3. Click the Google Cloud Platform button.
      4. For your connection journey, click Script.
  2. In a separate browser tab or window, login as an Admin to the GCP Console for the project you want to harvest.

In the InsightCloudSec Cloud Onboarding interface:

  1. Select Project.
  2. Click Generate & Download Script.

In the GCP Console:

  1. In the top bar, click Activate Cloud Shell. If this is your first time using the Cloud Shell, you'll be prompted to learn more about the shell and click Continue. Review the GCP documentation for more information.
  2. Click More (vertical ellipsis), then click Upload. and select the onboarding script from its downloaded location.
  3. Optionally, select an alternative destination directory. By default, the file will be uploaded to /home/<username>.
  4. Click Upload.
  5. Ensure you are logged into the Cloud Shell: gcloud auth login.
  6. Run the script (python onboard.py) and follow the prompts to create everything needed to onboard the Account. If you uploaded the onboarding script to somewhere other than the default, you'll need to include the directory location with the command. If you're prompted to authorize the Cloud Shell using your credentials, click Authorize.
    • Provide an GCP Service Account name (or press Enter to use the default).
    • Provide an GCP Service Account display name (or press Enter to use the default).
    • Optionally, provide a GCP Service Account description (or press Enter to use the default).
    • Provide a JSON key filename (or press Enter to use the default).
    • Provide a GCP Role ID (or press Enter to use the default).
    • Optionally, provide a GCP Role description (or press Enter to use the default).
    • The configuration is complete and the key will be saved in the current directory.
  7. Click More (vertical ellipsis), then click Download.
  8. Click the folder icon (Toggle File Browser) to open the file browser for the current directory. Expand the current directory in the browser.
  9. Select the JSON key and click Download.
  10. Open the downloaded JSON key file inside a browser tab/window or text editor.

In the InsightCloudSec Cloud Onboarding interface:

  1. Copy/paste the private_key value from the JSON key file into the API Credentials field.
  2. Copy/paste the project_id value from the JSON key file into the Project ID field.

Cloud Shell Onboarding instructions complete!

After completing these steps, you have completed the automated onboarding instructions for GCP Cloud Shell. Jump to the Connect the Account in InsightCloudSec instructions.

Connect the Account in InsightCloudSec

The GCP onboarding process is nearly complete; all that remains is to setup an account nickname & optional email delegation in InsightCloudSec and verify the account connection.

In the InsightCloudSec Cloud Onboarding interface:

  1. Provide the Nickname for the Account. This is a unique value that will be used to search Accounts across the system based on an identifiable label.
  2. If you performed the Email Delegation/Directory Support section above, provide the email address.
  3. Click Connect Account.