Skip to content
Least Privilege Principle

Least privilege for Cloud Storage means Storage Object Viewer on one bucket, with uniform bucket-level access

Cloud Storage grants access through IAM roles on projects, buckets or managed folders. Google's documentation, read 16 Nov 2026, lists Storage Object Viewer, Creator, User and Admin, warns that basic roles confer legacy bucket roles, and ties IAM Conditions to uniform bucket-level access.

Open the calculator ยท All services

Cloud Storage permissions come from IAM roles at project, bucket or managed folder level

Google's documentation says the Cloud Storage roles can be applied to projects, buckets or managed folders, except the legacy roles, which can be granted only on individual buckets. A role applied to a bucket controls only that bucket and the objects in it.

Four predefined roles cover most work. Storage Object Viewer (roles/storage.objectViewer) views objects and metadata, excluding ACLs, and lists objects. Storage Object Creator (roles/storage.objectCreator) creates objects but cannot view, delete or overwrite them. Storage Object User (roles/storage.objectUser) creates, reads, updates and deletes objects. Storage Admin (roles/storage.admin) has full control of objects and buckets.

The identities that call this service (people, services, workloads, third parties) are covered in the Google Cloud service identities guide and the workload identities guide.

Roles to avoid, with the documented reason

Basic roles and legacy roles bring more than the name suggests.

  • Basic roles Owner, Editor and Viewer: Google's documentation says principals granted them gain legacy bucket roles through convenience values. Viewer gains Storage Legacy Bucket Reader and Legacy Object Reader. Editor and Owner gain Legacy Bucket Owner and Legacy Object Owner on the project's buckets.
  • Storage Admin at project scope: Google describes full control of objects and buckets, and applied to a project it covers every bucket.
  • Storage Object User where read is enough: it adds create, update, delete and multipart upload permissions that a reader never exercises.
  • Google's IAM overview adds that basic roles include thousands of permissions across all services and should not be granted in production unless there is no alternative.

A minimal binding for a job that uploads files to one bucket

A producer that writes new files and never reads or overwrites needs only the creator role, on the bucket.

TaskPredefined roleLevelDocumented effect
Upload new objects onlyroles/storage.objectCreatorBucketCreate objects; no view, delete or overwrite
Read and list objectsroles/storage.objectViewerBucket or managed folderstorage.objects.get and storage.objects.list
Read, write and delete objectsroles/storage.objectUserBucketCreate, read, update, delete objects and multipart uploads
Manage buckets and objectsroles/storage.adminBucket (few people)Full control

Uniform bucket-level access, managed folders and IAM Conditions narrow access

Google's IAM Conditions page says that to use conditions in the allow policy of a bucket you must enable uniform bucket-level access; where you cannot, add the conditional grant at a higher level such as the project. Its example expression scopes access with resource.name.startsWith('projects/_/buckets/exampleco-site-assets/').

Managed folders let a role be granted below the bucket for a prefix of objects. Remove the convenience-value access that basic roles confer by editing the bucket's IAM policy once the bucket exists, as Google's documentation describes.

Checking what is used

Google's IAM recommender generates policy insights by comparing a principal's permissions with those used in the last 90 days, and suggests removing or replacing roles that give excess permissions. If the role was granted fewer than 90 days ago, it looks at usage since the grant.

Review recommendations for storage roles at project scope, then repeat at bucket level for the buckets that hold sensitive data.

Sources

  1. IAM roles for Cloud Storage, read 16 Nov 2026
  2. IAM roles overview, read 16 Nov 2026
  3. IAM Conditions overview, read 16 Nov 2026
  4. Role recommendations overview, read 16 Nov 2026

Last reviewed 16 Nov 2026.