【问题标题】:Restrict access to AppEngine so that only another AppEngine service from another Google Cloud Project can access it限制对 App Engine 的访问,以便只有来自另一个 Google Cloud 项目的另一个 App Engine 服务可以访问它
【发布时间】:2022-01-04 15:17:50
【问题描述】:

我有一个调用另一个 API(项目 2 中的 AppEngine)的 API(项目 1 中的 AppEngine)。是否可以在项目 2 的 AppEngine 中限制对 API 的访问,使其只能从项目 1 的 AppEngine 中调用。

【问题讨论】:

    标签: api google-app-engine google-cloud-platform


    【解决方案1】:

    您必须激活IAP on App Engine,然后选择要激活它的服务。

    然后,当您在 App Engine 上部署服务时,您现在可以define an identity, i.e. the service account which is used by App Engine 生成身份令牌。

    由于身份对于服务(例如项目 1)是唯一的,因此您只能授予该身份访问项目 2 上的 App Engine 的能力。

    注意:您可以为每个服务而不是每个项目定义服务帐户。这里我提到项目是因为它是你的例子,但它可以是服务 1 在同一个项目中调用服务 2,并且只有服务 2 受 IAP 保护

    【讨论】:

      猜你喜欢
      • 2015-04-07
      • 2021-11-14
      • 2015-06-08
      • 1970-01-01
      • 1970-01-01
      • 2021-07-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多