簡體   English   中英

IAP 為 App Engine 和 Compute Engine 訪問打開兩個會話

[英]IAP opens two sessions for App Engine and Compute Engine access

語境

我在 GCP 中運行了 3 個服務。 其中之一是在 AppEngine 中運行的 SPA,另外兩個是在 Compute Engine 中運行的 API。 我在它們前面配置了 HTTPS 負載均衡器,並啟用了 IAP(使用 Identity Platform 方法)。

問題

問題是我在成功登錄后獲得的 cookie 僅適用於 AppEngine 請求,所有對計算引擎的請求都以 302 結尾。有沒有辦法讓它適用於所有受 IAP 保護的服務?

更多信息

當我直接訪問 Compute Engine 資源時,IAP 沒有檢測到通過 AppEngine 資源打開的 session,所以我必須重新登錄,然后 AppEngine 和 ComputeEngine 服務都可以正常工作。

首次登錄后的 Cookie(App Engine 資源) Cookie App Engine

第二次登錄后的 Cookie(Compute Engine 資源) Cookie App Engine + Compute Engine

看起來 IAP 設置了兩個不同的會話,即使域相同。 除了編碼的有效負載之外,我找不到這兩個 cookies 之間的任何區別。

原來問題在於 IAP 中的 App Engine 和 Compute Engine 服務具有不同的客戶端 ID,因此修復方法是手動更改它,以便所有服務具有相同的 client_id。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM