はじめに
oneloginをIDPにしてGCPにログインしてみます。
今回はoneloginのフリートライアルで試してみます。
https://www.onelogin.com/free-trial
設定がない状態でonelogin経由でログインすると以下の様なエラーになります。
oneloginでの設定
Appの設定
Add Appをクリックし、検索ウィンドウでGoogle Cloudと入力して検索する。
SAML2.0の方のGoogle Cloud Platformをクリックします。
ConfigurationでCloud Identityのドメインを指定します。
Assumeを許可して右上のSaveをクリックする。
右上のドロップダウンからCloud Identity側で登録するメタデータ情報をダウンロードする。
Sample
<?xml version="1.0"?>
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" entityID="https://app.onelogin.com/saml/metadata/xxx">
<IDPSSODescriptor xmlns:ds="http://www.w3.org/2000/09/xmldsig#" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
<KeyDescriptor use="signing">
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509Data>
<ds:X509Certificate>xxx</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</KeyDescriptor>
<SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://xxx"/>
<NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</NameIDFormat>
<SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://xxx"/>
<SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://xxx"/>
<SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="https://xxx"/>
</IDPSSODescriptor>
</EntityDescriptor>
Cloud Identityでの設定
Admin consoleでSecurity > Set up single sign-on (SSO) with a third party IdPをクリックする。
Set up SSO with third-party identity providerを有効化
Sign-in page URLに、先程のXMLファイルのSingleSignOnService Binding="urn:oasis:namesSAML:2.0:bindings:HTTP-Redirectの値を記載する
Sign-out page URLに、指定する先程のXMLファイルのSingleLogoutService Binding="urn:oasis:namesSAML:2.0:bindings:HTTP-Redirectの値を記載する
先程のXMLファイルの証明書情報をpemファイルとして保存して、アップロードする。
テスト
oneloginでユーザを作成する。
First nameとLast name、さらにEmailアドレスまたは、Usernameを入力してSave userをクリックする。
Google Cloud Platformを使用するアプリケーションとして追加する。
Applicationをクリックして、右端にある+マークをクリックする。
Google Cloud Platformを選択し、Continueをクリックする。
ログインする
Reasonを入力してAssumeをクリックする。
Google Cloud Platformのアイコンをクリックする。
Cloud Identity側にUserが存在しないのでエラーになる。
以下のYouTubeの動画を見る限り、Provisoning機能があるはずだが、Free trialだからなのか表示されなったので、今回は手動で作成する