【问题标题】:Secure Google Cloud Storage bucket with credentials使用凭据保护 Google Cloud Storage 存储分区
【发布时间】:2017-12-23 10:46:06
【问题描述】:

我想使用凭据(类似于 Apache 上的 htaccess)来保护 Google Cloud Storage 存储桶。需要访问特定 GCS 存储桶的用户是公司外部的。推荐的方法是什么?

【问题讨论】:

    标签: security amazon-s3 google-cloud-storage


    【解决方案1】:

    使用云存储 API 进行身份验证

    link Mike shared 详细讨论了如何使用 Cloud Storage API 进行身份验证。您有 2 个主要选择 - 使用 User Account credentials 或使用 Service account credentials

    一旦您弄清楚用户将使用哪种身份验证,您就可以查看如何控制对存储桶和存储在存储桶中的对象的访问。

    云存储提供了 2 种主要的访问控制方式 - IAM 角色和 ACL。

    IAM 角色

    我建议查看可用于 Cloud Storage 的 IAM permissionsIAM roles。这些提供了项目和存储桶级别的控制。

    访问控制列表 (ACL)

    另外,你可以使用ACLs to control permissions at the object level within the bucket

    【讨论】:

    • 我选择使用服务帐户凭据来执行此操作,因为自动化程序将访问数据。
    【解决方案2】:

    Google Cloud Storage 身份验证的文档位于https://cloud.google.com/storage/docs/authentication

    【讨论】:

      猜你喜欢
      • 2014-01-05
      • 2017-11-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-07
      • 2017-07-07
      • 2019-03-31
      • 2019-06-17
      相关资源
      最近更新 更多