简体   繁体   English

如何授予数据存储访问服务帐户的权限?

[英]How to grant datastore access to a service account?

I can't use cloud datastore with a service account. 我无法通过服务帐户使用云数据存储。 However it works when using sdk default credentials method (gcloud auth login). 但是,当使用sdk默认凭据方法(gcloud auth登录)时,它可以工作。

The error is Error rpc error: code = 7 desc = Not authorized. 错误为Error rpc error: code = 7 desc = Not authorized. . I was able to grant access to a storage bucket, but I can't find anything like this for datastore. 我能够授予对存储桶的访问权限,但是找不到用于数据存储的类似内容。

How do I grant cloud storage access to a service account? 如何授予云存储访问服务帐户的权限?

ps. ps。 I need this because I want to use datastore outside of app engine. 我需要这样做,因为我想在应用程序引擎之外使用数据存储区。

Looks like I found the solution: 看起来我找到了解决方案:

  1. Create a service account from IAM & Admin console 从IAM和管理控制台创建服务帐户
  2. Add service account as a member to IAM 将服务帐户添加为IAM成员
  3. Grant Project > Editor role to newly added member 项目> 编辑者角色授予新添加的成员

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用Objectify和服务帐户凭据访问GAE数据存储? - How to access GAE datastore with Objectify and service account credentials? 谷歌云数据存储:StatusCode.PERMISSION_DENIED 与所有者服务帐户 - Google Cloud Datastore: StatusCode.PERMISSION_DENIED with owner service account 如何授予对ServiceAccount的读取权限 - How to grant read access to a ServiceAccount 如何创建可访问单个数据集的Google BigQuery服务帐户? - How to create a Google BigQuery service account with access to a single dataset? 如何使用服务帐户跨项目访问GCS存储桶对象? - How to access GCS bucket objects across projects using service account? 如何授予帐户列出已启用 API 的权限? - How can I grant the account permission to list enabled APIs? 如何在Python中授予对Google Appengine页面的访问权限? - How to grant access to google appengine page in Python? 如何使用php访问Google Cloud数据存储区? - How to access Google Cloud datastore with php? 如何访问数据存储信息(交互式控制台)? - How to access datastore information (Interactive Console)? 在Google服务帐户中将访问令牌获取为Null - Getting access token as Null in Google service account
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM