1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

oneloginをIDPにしてGCPにログイン

Last updated at Posted at 2021-02-10

はじめに

oneloginをIDPにしてGCPにログインしてみます。
今回はoneloginのフリートライアルで試してみます。
https://www.onelogin.com/free-trial

設定がない状態でonelogin経由でログインすると以下の様なエラーになります。
image.png

oneloginでの設定

Appの設定

Add Appをクリックし、検索ウィンドウでGoogle Cloudと入力して検索する。
image.png

SAML2.0の方のGoogle Cloud Platformをクリックします。
image.png

ConfigurationでCloud Identityのドメインを指定します。
image.png

Assumeを許可して右上のSaveをクリックする。

image.png

右上のドロップダウンからCloud Identity側で登録するメタデータ情報をダウンロードする。

image.png

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をクリックする。
image.png

Set up SSO with third-party identity providerを有効化
Sign-in page URLに、先程のXMLファイルのSingleSignOnService Binding="urn:oasis:names:flag_tc:SAML:2.0:bindings:HTTP-Redirectの値を記載する
Sign-out page URLに、指定する先程のXMLファイルのSingleLogoutService Binding="urn:oasis:names:flag_tc:SAML:2.0:bindings:HTTP-Redirectの値を記載する
先程のXMLファイルの証明書情報をpemファイルとして保存して、アップロードする。

テスト

oneloginでユーザを作成する。

User>New User をクリック。
image.png

First nameとLast name、さらにEmailアドレスまたは、Usernameを入力してSave userをクリックする。
image.png

Google Cloud Platformを使用するアプリケーションとして追加する。

Applicationをクリックして、右端にある+マークをクリックする。
image.png

Google Cloud Platformを選択し、Continueをクリックする。
image.png

Emailアドレスを入力しSaveをクリックする。
image.png

ログインする

作成したUserにAssume userする。
image.png

Reasonを入力してAssumeをクリックする。

image.png

Google Cloud Platformのアイコンをクリックする。
image.png

Cloud Identity側にUserが存在しないのでエラーになる。
image.png

以下のYouTubeの動画を見る限り、Provisoning機能があるはずだが、Free trialだからなのか表示されなったので、今回は手動で作成する
image.png

以下のようにProvisoningタブが見当たらない。
image.png

Cloud Identityでユーザを作成する。

image.png

GCP ConsoleのIAM画面でAdd memberする。

image.png

再度oneloginからログインする。

Continue
image.png

Accept
image.png

Userがoneloginで指定したUserであることを確認する。
image.png

組織を選択して、GCPのリソースが操作できることを確認する。
image.png

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?