[英]How to list all permissions granted to a specific principal on GCP?
GCP IAM page displays project-wide permissions and principals. GCP IAM 页面显示项目范围的权限和主体。
I've granted Object Admin permission to user@example.com to a specific GCS bucket.我已向 user@example.com 授予特定 GCS 存储桶的 Object 管理员权限。 This permission is not visible on the IAM page.此权限在 IAM 页面上不可见。
How do I list all permissions granted to user@example.com across all resources using console or gcloud
CLI?如何使用控制台或gcloud
CLI 列出所有资源中授予 user@example.com 的所有权限?
It seems like this can be done with the gcloud asset command: https://cloud.google.com/sdk/gcloud/reference/asset/search-all-iam-policies这似乎可以通过 gcloud asset 命令完成: https://cloud.google.com/sdk/gcloud/reference/asset/search-all-iam-policies
Eg.例如。 a basic example query for a single project:单个项目的基本示例查询:
gcloud asset search-all-iam-policies --scope=projects/<project> --query="policy:<email>"
The output is quite verbose, but does what you want, I think. output 非常冗长,但我认为它可以满足您的需求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.