我需要为 GCP 中的服务帐户设置非常细粒度的访问控制。我看到这个错误:
"user SERVICE_ACCOUNT does not have bigquery.jobs.create permission in project PROJECT_ID".
我知道通过 UI/gcloud util 我可以给它角色 roles/bigquery。 用户,但它有很多我不希望此服务帐户拥有的其他权限。
如何通过 gcloud/UI 或其他方式授予个人权限?
最佳答案
您可以直接在 Google Cloud Console 中配置 IAM:
https://console.cloud.google.com/iam-admin/iam/
服务帐户旨在用于服务器端应用程序,例如VM、AppEngine 等。换句话说:
[It's] an account that belongs to your application instead of to an individual end user. Your application calls Google APIs on behalf of the service account, so users aren't directly involved.
https://developers.google.com/identity/protocols/OAuth2ServiceAccount
服务帐户可以通过控制台分配不同的 BigQuery IAM 角色,如下所示:
您还可以使用控制台将个人用户(由 Google 帐户支持的电子邮件)添加到 IAM,然后选择他们在 BigQuery 中应分别拥有的权限,如下所示:
BigQuery 权限和角色已定义 here .
关于google-app-engine - 如何在 Google Cloud Platform 中为 BigQuery 用户授予个人权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42569095/