【问题标题】:Bypass Google Cloud Endpoints ESP for same project but different service on App Engine为同一项目绕过 Google Cloud Endpoints ESP,但在 App Engine 上使用不同的服务
【发布时间】:2019-12-16 14:13:22
【问题描述】:

我们有一个应用引擎服务,它公开了几个由 GCP 云端点保护的 API,下面是开放的 API 定义 YAML 文件仅供参考,而不是实际的。 我们需要从其他应用引擎服务调用此服务的端点,有没有办法绕过来自端点 ESP 的相同项目和网络的流量?

x-google-allow: all
swagger: '2.0'
info:
  description: 'Sample app'
  version: 0.1.0
host: service-api-server-project-id.appspot.com
schemes:
 - https
paths
  "/metrics":
    get:
      tags:
        - metrics
      summary: Query for  metrics data
      description: Application metrics
      operationId: metrics
      produces:
        - application/json
      responses:
        '200':
          description: successful retrieval of metrics
      security:
        - google_id_token_ic: []
securityDefinitions:
  google_id_token_cor:
    authorizationUrl: ""
    flow: "implicit"
    type: "oauth2"
    x-google-issuer: "<placeholder>"
    x-google-jwks_uri: "<placeholder>"
    x-google-audiences: "<placeholder>"

注意:从项目网络和需要保护的 GCP 外部调用相同的 API。

【问题讨论】:

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


    【解决方案1】:

    在研究和浏览论坛和architecture diagram 的设置后,我认为这是不可能的。

    我能找到的最接近的是dispatch rules,它可以让您将两个服务连接在一起,但我认为请求仍会通过 ESP。

    【讨论】:

    • 谢谢,@Oliver,我会探索调度规则,看看是否可以在不使用任何 JWT 或验证的情况下调用其他服务的 API。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-06-28
    • 2014-12-25
    • 2015-04-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多