GCP Scanner

The GCP Scanner is a native scanner type that inspects a connected Google Cloud project, folder, or organization, discovering the full inventory of identities, including human and non-human identities such as Google Cloud users and groups, service accounts and their keys, and workload and workforce identity federation principals, along with secrets stored in Secret Manager and certificates managed through Private CA, Certificate Manager, and Compute Engine SSL certificates, as well as the relationships between them. Each discovered object is evaluated against Identity & Secrets Intelligence security policies, which assess its risk posture and surface the resulting findings for review.

What the GCP Scanner Discovers

Each scanner covers one or more object types, selected when the scanner is created:

Object TypeWhat is discovered
SecretsSecret Manager secrets, with their replication and customer-managed encryption key settings, expiration, labels, and version history (version counts by state, and last changed and last rotated dates), plus last-accessed dates from Cloud Audit Logs. Secret values are never read.
CertificatesPrivate CA certificate authorities and issued certificates, Certificate Manager certificates, and global and regional Compute Engine SSL certificates, each with its location, labels, and source-specific details such as CA pool, tier, and revocation status for Private CA, and managed domains and subject alternative names for Google-managed certificates.
IdentitiesUsers, groups, service accounts and their user-managed keys, domains, workload and workforce identity federation principals, and public principals (allUsers and allAuthenticatedUsers), with the IAM roles they hold at the project, folder, and organization levels and on individual secrets and CA pools. Also IAM deny policies, service account impersonation paths, last-activity and last-authentication times, and the organization, folder, and project hierarchy.

The scanner's scope can be set to a single Project, a Folder, or an entire Organization.

Prerequisites

  • An Akeyless account with the Identity & Secrets Intelligence license.
  • A deployed and connected Akeyless Gateway version 4.52.0 and later.
  • A Gateway with Akeyless AI Insights configured.
  • A GCP Target representing the service account that will scan the project, folder, or organization.
  • The service account used by the Target granted the permissions listed under Required GCP Permissions below.
  • Access to configure and run the scanner, granted via:

Required GCP Permissions

The service account used by the Target needs read access to the Google Cloud services behind each object type selected on the scanner. Every table in this section has an Object Type column, so you can grant only what the selected object types need.

There are two ways to grant it:

  • Quick Setup - assign a small set of predefined viewer roles. Fastest to configure, but grants more access than the scanner actually uses.
  • Granular Permissions - assign only the exact permissions the scanner needs, following the principle of least privilege.

Both produce a complete scan, the difference is privilege scope, not scan coverage.

Quick Setup

For each object type selected on the scanner, grant the service account the predefined roles listed below:

Object TypePredefined roles
Secretsroles/secretmanager.viewer, roles/logging.privateLogViewer
Certificatesroles/privateca.auditor, roles/certificatemanager.viewer, roles/compute.viewer
Identitiesroles/browser, roles/iam.securityReviewer, roles/policyanalyzer.activityAnalysisViewer

For Folder or Organization scope, also grant roles/browser on the folder or organization, whatever object types are selected, so the scanner can list the projects and folders underneath it.

ℹ️

Note

For folder or organization scope, grant these roles at the folder or organization level so they inherit to all projects underneath. A project that does not inherit a role is reported as a gap in the scan details.

Granular Permissions

All permissions below are read-only. The scanner never requires write access to your Google Cloud environment, and never reads secret values, only metadata.

Required Permissions

The permissions listed below are required for the scan to complete successfully. If one is missing for an object type selected on the scanner, the scan fails, in the cases described below:

Object TypeUsed forPermissionIf missing
All object typesListing the projects and folders under the scope root (Folder and Organization scope only)resourcemanager.projects.list, resourcemanager.folders.listThe scan fails
SecretsDiscovering Secret Manager secretssecretmanager.secrets.listThe scan fails if the scope is a project; otherwise reported as a gap for that project
CertificatesDiscovering Private CA certificate authorities and certificatesprivateca.locations.list, privateca.caPools.list, privateca.certificateAuthorities.list, privateca.certificates.listSkipped and reported as a gap. Fails if the scope is a project and all three certificate sources are skipped
CertificatesDiscovering Certificate Manager certificatescertificatemanager.locations.list, certificatemanager.certs.listSkipped and reported as a gap. Fails if the scope is a project and all three certificate sources are skipped
CertificatesDiscovering Compute Engine SSL certificatescompute.sslCertificates.list, compute.regionSslCertificates.listSkipped and reported as a gap. Fails if the scope is a project and all three certificate sources are skipped
IdentitiesResolving the project's folder and organization hierarchy (Project scope only)resourcemanager.projects.getThe scan fails
IdentitiesReading the project IAM policy, the foundation of identity discoveryresourcemanager.projects.getIamPolicyThe scan fails if the scope is a project; otherwise reported as a gap for that project

Under Folder or Organization scope, a failure in one project is reported as a gap for that project, and the scan continues with the remaining projects.

Additional Permissions for Complete Coverage

These permissions are optional. If missing, the scan still completes, but with reduced visibility, and the policies that depend on them are not evaluated. Each gap is listed under Required Permissions For Full Scan in the scan details.

Object TypePermissionWhat it adds
Secretssecretmanager.versions.listLast changed and rotated dates, and version counts
Secretslogging.logEntries.listLast-accessed dates, from the last 90 days of audit logs. Requires Data Access audit logs, see Prerequisites Beyond IAM
Secretslogging.privateLogEntries.listReading the Data Access audit logs that record secret access. If missing, no gap is reported, and last-accessed dates stay empty
CertificatesAny certificate source not granted aboveCoverage across all three certificate sources
Identitiesresourcemanager.folders.get,
resourcemanager.organizations.get
The folder and organization hierarchy (Project scope). If missing, no gap is reported
Identitiesresourcemanager.folders.getIamPolicy, resourcemanager.organizations.getIamPolicyAccess inherited from folder and organization bindings
Identitiesiam.serviceAccounts.list,
iam.serviceAccountKeys.list
Service accounts and their keys: key age, stale keys
Identitiesiam.serviceAccounts.getIamPolicyService account impersonation paths
Identitiesiam.denypolicies.listDeny policies, so the graph doesn't overstate access
Identitiesiam.roles.getCustom role definitions
Identitiessecretmanager.secrets.list,
secretmanager.secrets.getIamPolicy
Secret-level access bindings
Identitiesprivateca.caPools.getIamPolicy,
plus the Private CA permissions under Required Permissions
CA pool access bindings. If a list permission other than privateca.locations.list is missing, no gap is reported
Identitieslogging.logEntries.listLast-activity dates, from the last 90 days of audit logs
Identitieslogging.privateLogEntries.listActivity recorded in Data Access audit logs. If missing, no gap is reported
Identitiespolicyanalyzer.
serviceAccountLastAuthenticationActivities.query, policyanalyzer.
serviceAccountKeyLastAuthenticationActivities.query
Service account and key last-authentication times (billing-enabled projects only)
Identitiesadmin.directory.group.member.readonly (Workspace scope)Google Workspace group membership, see Prerequisites Beyond IAM

Prerequisites Beyond IAM

Granting the permissions above is not sufficient on its own, the following must also be in place:

  • APIs enabled per scanned project: Cloud Resource Manager, IAM, Secret Manager, and (per capability) Cloud Logging, Private CA, Certificate Manager, Compute Engine, Policy Analyzer. A disabled API is reported as a warning, granting a role does not fix it.
  • Data Access audit logs: secret last-accessed dates require a DATA_READ audit-log configuration for Secret Manager (or all services) in the project.
  • Workspace groups: group expansion requires domain-wide delegation configured in the Google Workspace Admin Console, plus a Workspace admin email set in the scanner settings.

Create a GCP Scanner

  1. Log in to the Akeyless Console, and go to Products > Identity & Secrets Intelligence > Scanners.
  2. Click New, and select the scanner type GCP, then click Next.
  3. Define a Name for the scanner.
  4. Select the Gateway that will execute the scans, and Target representing the project, folder, or organization to scan, then click Next.
  5. Use the Object Type drop-down list to select the scanner's scope, and click Finish.

Run a Scan

  1. Log in to the Akeyless Console, and go to Products > Identity & Secrets Intelligence > Scanners.
  2. Click the GCP scanner.
  3. Click Start Scan.

Once the scan completes, results appear in Inventory for review.


Did this page help you?
Footer Section