Skip to content
Documentation

Getting started

Connect a Google Cloud project or organisation

The service account key or identity federation, the roles to grant, organisation mode and what Ctadel reads.

This page describes the identity to give Ctadel on Google Cloud, in single-project or organisation mode, the roles to grant it and what the collector reads.

What you need

A JSON credential file of one of two kinds:

KindWhen to choose it
Service account keyThe usual case. The file holds a private key and the project id of the service account.
external_account file (workload identity federation)When your organisation forbids creating service account keys (the iam.disableServiceAccountKeyCreation constraint). The file holds neither a private key nor a project id.

The file is pasted as is into the "Service Account Key (JSON)" field. The credentials are not checked when the account is saved: the application only reads the project identifier from the file, without calling Google Cloud. The collector requests the cloud-platform scope at the first scan; a refused file then shows in the account's state.

Single project or organisation

The "Organization ID" field decides the mode:

  • empty: Ctadel reads the service account's project, the one named in the file;
  • organizations/<number>: Ctadel searches every active project the identity can see, walks its folder ancestry up to the organisation, and reads those that belong to it. Projects that are visible but belong to another organisation are skipped. The IAM policies of the folders met on the way are read, since a role granted on a folder applies to every project below it.

An id that is not an organisation number (a folder, a domain) is refused rather than ignored.

Roles to grant

At organisation level in organisation mode, at project level in single-project mode:

RoleWhat it gives
roles/viewerThe general inventory, including VPC firewall rules and global and regional network firewall policies.
roles/iam.securityReviewerIAM policies of projects, folders and the organisation, service accounts.
roles/browserThe organisation hierarchy: project search and folder reads. Organisation mode only.
roles/monitoring.viewer, roles/logging.viewerAlert policies and log sinks.
roles/accessapproval.viewerAccess approval settings.
roles/policyanalyzer.activityAnalysisViewerLast authentication of service accounts, to detect dormant ones.
roles/serviceusage.serviceUsageViewerThe list of enabled APIs per project.

Enable on the service account's host project the cloudresourcemanager, compute, container, iam, logging, monitoring, dns, cloudkms, cloudfunctions, run, sqladmin, storage, bigquery, accessapproval, essentialcontacts, policyanalyzer, serviceusage and securitycenter APIs, plus those of the services you use.

Content analyses

AnalysisPermissions to grantWhat Ctadel does
Virtual machine disksroles/compute.storageAdmin restricted by condition to the ctadel-managed label, and roles/compute.instanceAdmin.v1 on the project hosting the scanner machine.A snapshot of the disk, labelled ctadel-managed, is mounted on a temporary scanner machine, then deleted.
Cloud SQL databasesCloud SQL administration rights on the instance's project: cloning, changing authorised networks, deletion.The instance is cloned as ctadel-dspm-<timestamp>, the clone accepts only the egress address of your Ctadel instance, it is read then deleted. The original instance is not modified.
Cloud Storage bucketsAn object read role on the buckets.Objects are read in place with the same credential file.
BigQuery datasetsroles/bigquery.dataViewer on the datasets.The first hundred rows of each table are read in place through the read-only API; no query is run and nothing is copied.
GKE clustersA read role on the clusters.A kubeconfig is built with a short-lived OAuth2 token of the service account, then the cluster objects are read.

Declaring the account in Ctadel

  1. Open "Settings", tab "Integrations", sub-tab "Cloud Providers", then "Add account" on the Google Cloud Platform row.
  2. Enter a "Label".
  3. Leave "Organization ID" empty, or enter organizations/<number>.
  4. Paste the JSON file into "Service Account Key (JSON)".
  5. Click "Create".

"Discover" makes no call to Google Cloud: it shows the project id read from the file.

What the collector reads

FamilyResources read
Organisation and projectsOrganisation settings, access approval, IAM policies of the organisation, folders and projects, project metadata, enabled APIs, Security Command Center.
IdentitiesService accounts, their keys and their last authentication.
ComputeCompute Engine instances and their disks, GKE clusters, Cloud Functions, Cloud Run, Cloud Build, Artifact Registry.
NetworkVPC networks and subnets, firewall rules and network firewall policies, load balancers, Cloud Armor, DNS zones.
DataCloud Storage buckets, Cloud SQL instances, BigQuery, Memorystore, Pub/Sub, Dataflow, Dataproc, Composer.
Keys and logsCloud KMS keys, log sinks, Monitoring alert policies.
AIVertex AI: models, endpoints and related resources, per location.

Limitations

  • Hierarchical firewall policies (organisation, folder) are not read; only global and regional network policies are.
  • With an identity federation file, single-project mode is not possible: the file carries no project id and the form does not ask for one. Enter an "Organization ID".
  • A service account's dormancy is derived from the age of its oldest user-managed key; an account without such a key stays "unknown".
  • If the IAM policy of a bucket or an Artifact Registry repository cannot be read, its visibility stays unknown, unless an ACL declares it public.
  • A Vertex AI location that refuses the call (API not enabled, product unavailable) is skipped; a permission refusal is reported as such, not as "nothing".
  • A folder that cannot be read while walking the hierarchy does not exclude the project below it.
  • Reading audit logs for detection (roles/logging.privateLogViewer role) is under internal validation, not available to customers.