Google Cloud
Connect Google Cloud projects to AccessRoot with scoped, read-only permissions and see access through inheritance, service accounts and impersonation.
The Google Cloud connection lets AccessRoot read how access is granted across your resource hierarchy, so you can see what a service account can really reach and review the effect of IAM changes before they merge. Like every cloud connection, it is read-only.
What AccessRoot reads
For the projects you connect, AccessRoot reads:
- service accounts;
- IAM bindings, including the bindings inherited from organizations, folders and projects;
- service account impersonation relationships;
- workload identity, including Workload Identity Federation used by CI/CD.
Together these answer a question a list of role bindings cannot: what is reachable once inheritance and impersonation are taken into account. A service account can reach more than its own role suggests, because another principal may be allowed to create tokens for it.
Connect projects
You need permission to create a service account and grant read access in the projects you want to analyze.
- Open Settings › Connections and choose Google Cloud under Cloud environments.
- Follow the setup to create a scoped service account for AccessRoot and grant it read permissions on the projects, folders or organization you want analyzed. The setup shows which read permissions to grant and how AccessRoot authenticates.
- Select the projects to analyze. In the sample workspace there are two:
platform-prodandcustomer-prod. - Save the connection.
The connection is listed as Read-only, for example “Google Cloud · 2 projects”, with the description Scoped service account, read permissions. Connect only the projects you want in the model. Access that crosses into an unconnected project cannot be traced to its end.
Example: one binding, a new path
The sample workspace shows why impersonation matters. In platform-prod, the deploy.yml workflow authenticates as the ci-deploy service account through Workload Identity Federation. In customer-prod, the records-exporter service account already reads objects in the gs://customer-records-prod bucket (storage.objects.get).
Pull request #207 changes infra/gcp/identity.tf:
resource "google_service_account_iam_member" "ci_deploy_token" {
service_account_id = google_service_account.records_exporter.name
role = "roles/iam.serviceAccountTokenCreator"
member = "serviceAccount:[email protected]"
}
The binding looks small. It lets ci-deploy create access tokens for records-exporter, so the workflow can now reach a production bucket it could not reach before. Access Diff reports it on the pull request as a new path to sensitive production customer exports. The finding is based on the proposed binding. It describes what becomes possible, not that the workflow used it.
| Field | Value |
|---|---|
| Role | roles/iam.serviceAccountTokenCreator |
| Principal | [email protected] |
| Target | [email protected] |
The recommended review question is whether the deployment workload needs to impersonate records-exporter at all. If not, remove the Token Creator binding and leave the service account’s own access unchanged.
What you can do once it is connected
- Trace impersonation paths, including paths that cross project boundaries. See Access Graph.
- Review proposed Terraform or OpenTofu changes to IAM bindings. See Access Diff and Terraform and OpenTofu.
- Prepare a targeted fix as a pull request. See Remediation.
- Check that production still matches the approved configuration. See Access Drift.
Change or remove the connection
Administrators can add or remove projects, or revoke the connection, under Settings › Connections. Revoking stops new collection through that connection, and already collected metadata follows your retention and deletion settings. Changes are recorded in Settings › Audit log. See Workspace and audit.
Related
- Permissions and data explains the scope of each connection.
- The Google Cloud integration page gives the product overview.