I have a GCP cloud setup by someone else through the GCP console with the default permissions. There are some buckets, compute engine vms and cloud run services in there. I am moving it to terraform deployments, and want to tighten down the permissions. I see that by default, there are a number of default service accounts that have role bindings at the project level, which means they have those permissions for everything within the project. For instance the Compute Engine Service Agent role has
storage.objects.create storage.objects.get storage.objects.list storage.objects.update
and the Cloud Run Service Agent role has
storage.managedFolders.get storage.managedFolders.list storage.objects.get storage.objects.list
If I understand the permission system correctly, this seems to contradict the least privilege principle that google seems to advocate.
So I have the following questions about it:
Hello @dolfandringa ,
To answer your inquiries:
roles/editor
) on your project. This role includes a very large number of permissions. We strongly recommend that you either disable the automatic role grant by adding a constraint to your organization policy, or revoke the Editor role manually. If you disable or revoke the role grant, you must decide which roles to grant to the default service accounts, then grant these roles yourself.