Przejdź do treści

GCP connector

What this connector reads

The GCP connector enumerates AI workloads in your Google Cloud projects: Vertex AI endpoints and Vertex AI Workbench notebook instances across the regions you list. We see resource names, display names, regions, machine specs, and deployment metadata — the same fields shown on the Vertex AI console list pages.

A passive twin (passive-gcp) is created automatically alongside the active connection. It reads Cloud Logging audit log entries for AI service calls over a 90-day lookback, picking up shadow-AI usage that the active inventory cannot see — for example, a service in one project calling Translation API or Document AI without a registered Vertex resource. The passive collector requires roles/logging.viewer on each project; if you do not grant it, the active connector still works and the passive twin returns nothing.

What you (the customer) need to do

You will need a Google Cloud project owner or organisation admin.

  1. In Secruna, open Connections → Connect GCP. (screenshot placeholder TODO)
  2. You are redirected to accounts.google.com and shown the OAuth consent screen. Sign in with the account that has access to the projects you want covered. The scopes requested are listed below — review them.
  3. Click Allow. You are redirected back to Secruna; the connection is active and the passive twin is created.
  4. (Required for inventory to return data) Grant our service account roles/aiplatform.viewer and roles/notebooks.viewer on each project you want scanned. The OAuth scopes give us permission to call the APIs, but the API only returns resources we have IAM access to in the resolved project.
  5. (Required for shadow-AI passive collector) Grant roles/logging.viewer on the same projects.

Status note (2026-05). The GCP connector requires GOOGLE_OAUTH_CLIENT_ID configuration in our control plane. Until that is published in production, Connect GCP returns a 503 with a friendly message. Confirm with the project team before pointing a customer at this flow.

Permissions / scopes requested

Scope Why we need it
https://www.googleapis.com/auth/cloud-platform.read-only Resource Manager and billing-adjacent read APIs needed to enumerate projects you have access to.
https://www.googleapis.com/auth/aiplatform.read-only Vertex AI list endpoints / notebooks.

Additionally, IAM roles that need to be granted in your project or organisation (these are not OAuth scopes — Google requires both the OAuth grant and IAM):

IAM role Granted on Used by
roles/aiplatform.viewer each project Active connector
roles/notebooks.viewer each project Active connector
roles/logging.viewer each project Passive collector (shadow-AI)

The passive collector filters Cloud Logging to these AI service names only:

aiplatform.googleapis.com           generativelanguage.googleapis.com
speech.googleapis.com               vision.googleapis.com
translate.googleapis.com            language.googleapis.com
documentai.googleapis.com           discoveryengine.googleapis.com
dialogflow.googleapis.com           automl.googleapis.com
ml.googleapis.com                   videointelligence.googleapis.com

By default the active connector scans us-central1, europe-west4, and asia-southeast1. Contact support to change this list.

What we do NOT touch

  • Vertex AI prediction request / response payloads. We list endpoints, not the data flowing through them.
  • Notebook contents, datasets, or training jobs. We list notebooks; we do not read their .ipynb files or attached buckets.
  • BigQuery, Cloud Storage, Compute Engine, or any non-AI service.
  • GKE workloads. We do not enumerate clusters or pods even if they run inference workloads — the active connector relies on Vertex registration.
  • IAM policies. We never call getIamPolicy on your projects.
  • Cloud Logging entries from non-AI services — the filter is pinned to the service-name list above.

How to revoke access

  1. In Google Cloud Console → IAM & Admin → Service Accounts (or Settings → Authorized apps for the user-consent token), revoke access for the Secruna OAuth client. This invalidates our refresh token immediately.
  2. Optionally, remove the IAM role bindings (aiplatform.viewer, notebooks.viewer, logging.viewer) from each project.
  3. In Secruna, open Connections and click Disconnect on the GCP row. The passive twin is disconnected at the same time.
  4. Within 90 days every artefact collected through this connection is purged. See data retention policy.

Troubleshooting

Error you see Likely cause Fix
503: GCP connector not configured Our control plane does not have a Google OAuth client registered yet. Email support — this is a Secruna-side issue, not yours.
Google did not return a refresh_token The OAuth flow did not request offline access (e.g., the user previously consented and Google skipped the consent screen). Re-run the connect flow; we force prompt=consent and access_type=offline, but a stale browser session can still strip the refresh token in rare cases. Revoke the prior grant in myaccount.google.com/permissions first.
Connection active but no Vertex endpoints listed OAuth granted but IAM role missing on the project. Grant roles/aiplatform.viewer on every project you want covered. Re-run discovery.
Passive twin always reports 0 events Missing roles/logging.viewer on each project, or genuinely no AI usage in 90 days. Grant the role. If still empty, that's an honest signal.
403: Project ... does not have AI Platform API enabled The Vertex AI API isn't enabled on that project. Enable in the Cloud Console → APIs & Services. We tolerate the 403 so it's a warning, not a hard fail.
  • Subprocessor list — Google Cloud is a controller-controlled subprocessor for your data plane; the GCP project itself remains under your control.
  • DPA template — Annex II covers the metadata categories produced by this connector.