> For the complete documentation index, see [llms.txt](https://docs.stoik.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stoik.io/help/help-nl/preventietools/cloud-scan/gcp.md).

# Installatie: GCP

Geef Cloud scan alleen-lezen toegang tot een Google Cloud-project door een service-account aan te maken dat Stoïk kan gebruiken.

## Vereisten

* Voor deze implementatie is een beheerdersaccount vereist.
* Voor voortdurende supervisie en het verhelpen van kwetsbaarheden is een technisch adviseur vereist.
* Eén persoon voert de hele installatie uit, van begin tot eind: een Stoïk Protect-gebruiker die preventietools mag bewerken en die ook beheerder is van het GCP-project.

## Installatie

{% stepper %}
{% step %}

### Selecteer Google Cloud Platform

Ga naar `Cloud Scan` > `Instellingen`, klik op `Nieuwe provider`, en selecteer `Google Cloud Platform`.

<figure><img src="https://2067006134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2FDw2b46xxHQFAG4OCkigt%2FScreenshot%202026-04-07%20at%2018.57.56.png?alt=media&amp;token=72ccef3f-3cb8-4f54-b98b-6c748f5e3e92" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Open je Cloud Console

Ga naar de [Google Cloud Console](https://console.cloud.google.com/) en meld je aan met je beheerdersaccount.

<figure><img src="https://2067006134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2FUTcz9AktGTD9Cczz9KPB%2Fcloud-scan-google-cloud-console.png?alt=media&amp;token=4f6d18c5-3eec-4040-9d46-12ae365c6dd7" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Open de API-bibliotheek

Ga naar `API's & services` > `Bibliotheek` in het linkermenu.

<figure><img src="https://2067006134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2FH7VRpz11JW2ppKogPQ4y%2Fcloud-scan-console-api-services-library.png?alt=media&amp;token=e0153ae0-5695-4746-b3bc-da256ee2d1bb" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Zoek de Cloud Resource Manager API

Zoek naar `Cloud Resource Manager API` en klik erop.

<figure><img src="https://2067006134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2F4f8FTY2S563Lm31xK7Np%2Fcloud-scan-cloud-resource-manager-api.png?alt=media&amp;token=0aafc7a8-1d1d-40fc-b08d-b6eb064cb3d1" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Schakel de API in

Klik op `Inschakelen`.

<figure><img src="https://2067006134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2FqHVrHGykLoST9s0PycrJ%2Fcloud-scan-resource-manager-api-enable.png?alt=media&amp;token=20c69a92-2c79-4568-a5c9-86c5806db366" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Open de serviceaccounts

Ga naar `IAM & beheer` > `Serviceaccounts` in het linkermenu.

<figure><img src="https://2067006134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2FskzJLLEd9DokDw9pHIJF%2Fcloud-scan-iam-admin-service-accounts.png?alt=media&amp;token=c83333e7-9f3c-4fc9-9678-ff91daec5658" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Maak het serviceaccount aan

Klik op `Serviceaccount aanmaken`.

<figure><img src="https://2067006134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2FBTbAgGb6fSK20BVXuuSz%2Fcloud-scan-create-service-account.png?alt=media&amp;token=168d4f6e-46ff-4420-a503-9002c33b3f2a" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Geef het serviceaccount een naam

Voer `stoik-scanner` als naam van het serviceaccount in en klik vervolgens op `Maken en doorgaan`.

<figure><img src="https://2067006134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2F6whuJGKh4PNGgftwZqLV%2Fcloud-scan-create-service-account-name.png?alt=media&amp;token=d00f2170-bd90-455f-a9f3-94da30e44b62" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Rollen toewijzen

Voeg de volgende 3 rollen toe: `Viewer`, `Security Reviewer`, `Stackdriver Accounts Viewer`.

<figure><img src="https://2067006134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2FCChwue8tVQSHKCpMIlCe%2Fcloud-scan-create-service-account-permissions.png?alt=media&amp;token=26b9ac91-e109-412d-8cd8-37548092f78b" alt=""><figcaption></figcaption></figure>

Laat stap 3 leeg en klik op `Gereed`.
{% endstep %}

{% step %}

### Open het serviceaccount

Klik op het serviceaccount dat je zojuist hebt gemaakt en klik vervolgens op `Principals met toegang`.

<figure><img src="https://2067006134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2Ft4z2qlijQGNNDA4ISbLi%2Fcloud-scan-open-service-account.png?alt=media&amp;token=94f014b7-d982-4152-bfd9-8d3af5436de8" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2067006134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2FiCKjOoUMiZUKJDD9lcDz%2Fcloud-scan-service-account-grant-access.png?alt=media&amp;token=362b9a8b-d905-4d37-ad5f-b8017951ebe0" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Toegang verlenen

1. Selecteer je serviceaccount en klik op `Toegang verlenen`.
2. Voer `stoik-scanner@stoik-gcp-scan-prod.iam.gserviceaccount.com` in het `Nieuwe principals` veld.
3. Wijs de `Service Account Token Creator` rol toe en klik vervolgens op `Opslaan`.

<figure><img src="https://2067006134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2FtA2nkzIqHpx65ok06gqr%2Fcloud-scan-service-account-add-principals.png?alt=media&amp;token=f1c62da6-496e-4804-9afc-161d71df3c2b" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Kopieer het e-mailadres van het serviceaccount

1. Klik op `Details` in GCP.
2. Kopieer het e-mailadres van het aangemaakte serviceaccount.

<figure><img src="https://2067006134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2FBbOUrFQXlScFI32CxLgR%2Fcloud-scan-service-account-copy-email.png?alt=media&amp;token=4fa17999-bb77-4764-bfff-99c2a20735f6" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Voltooi de installatie

<figure><img src="https://2067006134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2F6yEDTO51V6cbdB8McEz4%2FScreenshot%202026-04-07%20at%2018.59.05.png?alt=media&amp;token=1568ad28-5e33-4283-8b3c-d415d7606fce" alt=""><figcaption></figcaption></figure>

1. Plak het e-mailadres van het serviceaccount in het `E-mailadres van serviceaccount` veld in Stoïk Protect.
2. Klik op `Voltooi de installatie`.

{% hint style="info" %}
Vernieuw de Stoïk Protect-pagina indien nodig.
{% endhint %}
{% endstep %}
{% endstepper %}

## Projecten om te scannen

Stel de projecten in die je servers en databases bevatten: een project dat speciaal voor Stoïk is aangemaakt, is leeg, dus er valt niets te scannen. De API moet per project afzonderlijk worden ingeschakeld.

## Probleemoplossing

<details>

<summary>De installatie is mislukt en werkte daarna wel toen ik het opnieuw probeerde</summary>

Nieuwe rollen, machtigingen en API's hebben een paar minuten nodig om van kracht te worden. Wacht 5 minuten en klik opnieuw.

</details>

<details>

<summary>"role/stackdriver.accounts.viewer moet worden toegewezen"</summary>

`Stackdriver Viewer` en `Stackdriver Accounts Viewer` zijn twee verschillende rollen. Het serviceaccount heeft precies `Viewer`, `Security Reviewer` en `Stackdriver Accounts Viewer`.

</details>

<details>

<summary>"behoren niet tot een toegestane klant"</summary>

Je organisatiebeleid **Domeingebonden delen** (`iam.allowedPolicyMemberDomains`) blokkeert het Stoïk-serviceaccount. Je beheerder voegt Stoïks klant-ID `C01isw1kw` toe aan de toegestane waarden, in `IAM & beheer` > `Organisatiebeleid`. Hiervoor is de `Organization Policy Administrator` rol op organisatieniveau vereist: eigenaar zijn van het project is niet genoeg.

</details>

<details>

<summary>"Integratie met GCP mislukt" / getAccessToken geweigerd</summary>

Twee gebruikelijke oorzaken:

* De Cloud Resource Manager API is niet ingeschakeld, of is slechts een paar minuten geleden ingeschakeld.
* `stoik-scanner@stoik-gcp-scan-prod.iam.gserviceaccount.com` heeft de `Service Account Token Creator` rol op je serviceaccount niet gekregen.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stoik.io/help/help-nl/preventietools/cloud-scan/gcp.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
