AWS 整合 G Suite 帳號 SSO

基本上 How to Set Up Federated Single Sign-On to AWS Using Google Apps 這篇講解得非常詳盡,只有在一個地方有小小的問題。
在我依照所有程序執行完畢之後,發現依舊無法正確的透過 Google 單一登入(SSO, Single Sign On)到 AWS 上面;Google 了一段時間才發現在 AWS 的 forum 有這串討論:SSO Setup (SAML) with Google Apps on AWS,其中內容最重要的一段是這個:

基本上 How to Set Up Federated Single Sign-On to AWS Using Google Apps 這篇講解得非常詳盡,只有在一個地方有小小的問題。
在我依照所有程序執行完畢之後,發現依舊無法正確的透過 Google 單一登入(SSO, Single Sign On)到 AWS 上面;Google 了一段時間才發現在 AWS 的 forum 有這串討論:SSO Setup (SAML) with Google Apps on AWS,其中內容最重要的一段是這個:

In any case, I fixed the issue by removing the additional quotes in the custom attribute by using the regular Users admin interface. After this the SSO worked successfully as expected. Hope this helps.

後來我去檢查了一下整個程序,又到 G Suite 的後台介面 double check,果不其然有這樣的狀況,處理掉之後,就可以正確的從 G Suite 帳號 SSO 到 AWS 了!
把問題與解法概略描述如下:
在 How to Set Up Federated Single Sign-On to AWS Using Google Apps 一文當中,中後段有在 Google Apps Admin SDK > Directory API 執行 Users: Patch 的動作,在這個地方會透過 JSON POST 的方式,把你在 AWS IAM 設定的 role ARN 與 provider ARN 放到 Google 帳號的延伸 schema 裡面(延伸 schema 的規格已經在前面幾個步驟做過了),但問題就在這邊,如果你透過 Google 的 API Explorer 把底下的 JSON request 送出,你會發現 response 多出了兩個雙引號(分別用脫逸字元標出):


就是這個多出來的兩個雙引號在作怪,到 G Suite 後台介面去看,還真的是有:

在 G Suite 後台把這兩個雙引號拿掉,就可以使用 Google Account 去 SSO AWS 了!

markkwsu

markkwsu

Add comment