【问题标题】:Restrict API key access to only one API in Google Cloud Endpoints限制对 Google Cloud Endpoints 中的一个 API 的 API 密钥访问
【发布时间】:2018-05-22 08:51:39
【问题描述】:

我部署了一个带有 apiKeyRequired = AnnotationBoolean.TRUE 的 Google Cloud Endpoints v2 API,以限制拥有 api 密钥的客户端的访问权限。我在云平台的凭证页面中创建了一个api密钥,我可以使用密钥访问api。

我现在想将此 API 密钥提供给第三方消费者,但由于我已经使用 Google Cloud Endpoints 部署了多个 API,因此我只想让他们访问其中一个。 我怎样才能做到这一点?

【问题讨论】:

    标签: security google-app-engine google-cloud-platform api-key google-cloud-endpoints-v2


    【解决方案1】:

    看看这个article。基本上,客户应该使用自己的 API 密钥,并且您应该通过 Cloud Console 授予对 API 的访问权限。

    【讨论】:

    • 如果每个客户都必须创建一个 Google Cloud 项目来使用我们的 API,这会使 Google Cloud Endpoints 对我们毫无用处。是否有其他更简单的方法可以让我们访问 API?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-11-16
    • 2017-12-24
    • 1970-01-01
    • 2017-08-13
    • 1970-01-01
    • 1970-01-01
    • 2020-10-24
    相关资源
    最近更新 更多