4

我正在尝试连接到 Google AppEngine 上的 IAP 安全服务,当我验证我的服务帐户时,我从服务器收到 401 Unauthorized 响应,并且在标头中我将x-goog-iap-generated-response标头设置为 true。这是否意味着 IAP 授权了通信,并且服务器不允许我与之通信或什么?

4

1 回答 1

5

The header is inserted whenever IAP itself generates a page. It is not inserted (at least, not by IAP: we don't stop applications from adding it! :>) when the application protected by IAP generates a page. It's intended for use in troubleshooting, e.g. distinguishing whether an error message or a redirect comes from IAP or the application. It can also be used in automation, e.g. if you have some scripting that wants to detect that an application redirected into an OAuth flow because of IAP (so that it can retry the request with added credentials.)

--Matthew, Google Cloud IAP engineering

于 2019-01-24T20:18:03.550 回答