【问题标题】:IAP Signed Headers & AppEngine Standard Python 3.7 RuntimeIAP 签名标头和 AppEngine 标准 Python 3.7 运行时
【发布时间】:2018-09-06 14:04:28
【问题描述】:

是否需要在 AppEngine Standard Python 3.7 运行时中验证来自 IAP 的签名标头?

IAP 文档没有提及 Python 3.7 运行时的细节。

IAP documentation 说:

  • AppEngine 标准版应使用用户 API
  • 需要验证才能保护 AppEngine Flex 中的应用程序

用户 API 不适用于 Standard 3.7。签名的标题是。可以验证标题。

我可以看到 AppEngine 环境添加了一些标头。我想知道 X-Appengine- 值是否可以被隐式信任(即 AppEngine 在验证 IAP 的标头后是否附加这些值)?

X-Appengine-User-Id: <user id>
X-Appengine-Auth-Domain: <domain>
X-Appengine-User-Email: <user email>
...
X-Goog-Iap-Jwt-Assertion: <assertion>
X-Goog-Authenticated-User-Email: accounts.google.com:<user email> 
X-Goog-Authenticated-User-Id: accounts.google.com:<user id>

【问题讨论】:

    标签: google-app-engine google-app-engine-python google-iap


    【解决方案1】:

    来自App Engine-specific headers

    对于 login:adminlogin:required 中指定的处理程序 app.yaml,App Engine 还提供以下一组标头:

    • X-AppEngine-User-Email,带有示例标题:“ange@example.com”
    • X-AppEngine-Auth-Domain,带有示例标题:“example.com”
    • X-AppEngine-User-ID,带有示例标题:“100979712376541954724”

    因此可以相信他们不会来自 GAE 外部。但我不确定它们与 IAP 基础架构有何关系。

    由于不支持用户 API,我会遵循灵活环境的建议,从这个角度来看,它似乎更接近 Python3 运行时 - 我会验证签名的标头。

    【讨论】:

      猜你喜欢
      • 2019-02-08
      • 1970-01-01
      • 1970-01-01
      • 2021-05-28
      • 1970-01-01
      • 2018-07-27
      • 1970-01-01
      • 1970-01-01
      • 2019-10-16
      相关资源
      最近更新 更多