简体   繁体   中英

GCS 'Storage Object Viewer' role cannot view objects

I am trying to give a user read access to a Google Cloud Storage bucket. The user has the "Storage Object Viewer" role

角色:存储对象查看器

but the user cannot see the items in the bucket:

错误信息

The project ID is valid andaccording to the docs the "Storage Object Viewer" role includes the storage.buckets.list permission(EDIT: This is incorrect, see https://cloud.google.com/storage/docs/access-control/iam-roles#standard-roles ).

The user can access the bucket if I give him the "Storage Object Admin" role, but then he also has write access. How do I just grant read access?

According to docs , Storage Object Viewer does not have storage.buckets.list permission. it only contains the following 4 permissions (see the screenshot).

在此处输入图像描述

This means that the identity that has this role can only list/view objects inside a bucket and will not be allowed to list buckets and/or view bucket details.


if you need the identity to also list/view buckets, there is another predefined legacy role that you can use named Storage Legacy Bucket Reader . See here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM