For the complete documentation index, see llms.txt. This page is also available as Markdown.

Setup: GCP

Give the Cloud scan read-only access to a Google Cloud project by creating a service account that Stoïk can use.

Prerequisites

  • An administrator account is required to perform this deployment.

  • A technical advisor is required for ongoing supervision and vulnerability remediation.

  • One person does the whole setup, from start to finish: a Stoïk Protect user allowed to edit prevention tools, who is also an administrator of the GCP project.

Setup

1

Select Google Cloud Platform

Go to Cloud Scan > Settings, click New Provider, and select Google Cloud Platform.

2

Open your Cloud Console

Go to the Google Cloud Console and log in with your administrator account.

3

Open the API library

Go to APIs & Services > Library in the left-hand menu.

4

Find the Cloud Resource Manager API

Search for Cloud Resource Manager API and click on it.

5

Enable the API

Click Enable.

6

Open the service accounts

Go to IAM & Admin > Service Accounts in the left-hand menu.

7

Create the service account

Click Create Service Account.

8

Name the service account

Enter stoik-scanner as the service account name, then click Create and continue.

9

Assign roles

Add the following 3 roles: Viewer, Security Reviewer, Stackdriver Accounts Viewer.

Leave step 3 empty and click Done.

10

Open the service account

Click on the service account you just created, then click Principals with access.

11

Grant access

  1. Select your service account and click Grant access.

  2. Enter stoik-scanner@stoik-gcp-scan-prod.iam.gserviceaccount.com in the New principals field.

  3. Assign the Service Account Token Creator role, then click Save.

12

Copy the service account email

  1. Click Details in GCP.

  2. Copy the email address of the created service account.

13

Complete setup

  1. Paste the service account email address into the Service Account Email field in Stoïk Protect.

  2. Click Complete setup.

Refresh the Stoïk Protect page if necessary.

Projects to scan

Set up the projects that hold your servers and databases: a project created just for Stoïk is empty, so there is nothing to scan. The API must be enabled one project at a time.

Troubleshooting

The setup failed, then worked when I retried

New roles, permissions and APIs take a few minutes to apply. Wait 5 minutes and click again.

"role/stackdriver.accounts.viewer must be assigned"

Stackdriver Viewer and Stackdriver Accounts Viewer are two different roles. The service account needs exactly Viewer, Security Reviewer and Stackdriver Accounts Viewer.

"do not belong to a permitted customer"

Your organization policy Domain restricted sharing (iam.allowedPolicyMemberDomains) blocks the Stoïk service account. Your admin adds Stoïk's customer ID C01isw1kw to the allowed values, in IAM & Admin > Organization Policies. This requires the Organization Policy Administrator role at the organization level: being Owner of the project is not enough.

"Integration with GCP failed" / getAccessToken denied

Two usual causes:

  • The Cloud Resource Manager API is not enabled, or was enabled only a few minutes ago.

  • stoik-scanner@stoik-gcp-scan-prod.iam.gserviceaccount.com did not get the Service Account Token Creator role on your service account.

Last updated