【问题标题】:how can I set google cloud storage ACL to give READ permission only to GAE apps?如何将谷歌云存储 ACL 设置为仅向 GAE 应用程序授予读取权限?
【发布时间】:2012-08-21 04:26:35
【问题描述】:

存储桶是项目私有的。到目前为止,我设法通过 gsutil CLI 更新了存储桶的 ACL。问题是只有所有者(写入/上传文件的应用程序)有权访问。当我尝试读取或列出存储桶内容时,存储桶 ACL 中指定的其他应用程序出现权限错误。我错过了什么吗?

  <Entry>
        <Scope type="UserByEmail">
            <EmailAddress>
                application-id@appspot.gserviceaccount.com
            </EmailAddress>
        </Scope>
        <Permission>
            READ
        </Permission>
    </Entry>
 <Entry>
        <Scope type="UserByEmail">
            <EmailAddress>
                anotherapp-id@appspot.gserviceaccount.com
            </EmailAddress>
        </Scope>
        <Permission>
            READ
        </Permission>
    </Entry>

【问题讨论】:

标签: google-app-engine google-cloud-storage


【解决方案1】:

尝试将您应用的服务帐号添加到您的项目团队,如本教程所示:https://developers.google.com/appengine/articles/prediction_service_accounts。该教程侧重于将应用引擎与 Google Prediction API 结合使用,但是,在向 App Engine 应用提供对 Google Cloud Storage 资源的访问权限时,启用对应用服务帐户的访问权限的概念同样适用。

【讨论】:

  • 这是不可能的,因为 Google Apps 域之外的帐户无法添加到项目团队。 appspot.gserviceaccount.com 不是我们的域名,所以我们不能添加它。
  • 错误是@appspot.gserviceaccount.com 可能未添加到项目“API 项目”中。只能添加来自域 ourdomain.com 的成员。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2015-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-08-01
  • 2023-04-08
相关资源
最近更新 更多