子ページ
  • Full SLO(Single Logout)の設定方法

このページの古いバージョンを表示しています。現在のバージョンを表示します。

現在のバージョンとの相違点 ページ履歴を表示

« 前のバージョン バージョン 2 次のバージョン »

ShibbolethにおけるSLOの設定方法を記載します。

前提

IdP/SPはそれぞれ以下のバージョンであることを前提とします。

  • IdP: 3.2.1
  • SP : 2.6.0

IdPの設定

メタデータへ<SingleLogoutService>を追加

IdP のメタデータに<IDPSSODescriptor>の子要素として<SingleLogoutService>を追加します。 LocationのIdPのホスト名部分は適宜読み替え適切に設定して下さい。IdPが特殊な設定でなければ、ホスト名部分のみ合わせれば問題ありません。

       </ds:KeyInfo>
    </KeyDescriptor>
    <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://IdPのホスト名/idp/profile/SAML2/POST/SLO"/> ← 追加
    <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://IdPのホスト名/idp/profile/SAML2/Redirect/SLO"/> ← 追加
    <NameIDFormat>urn:mace:shibboleth:1.0:nameIdentifier</NameIDFormat>
    <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</NameIDFormat>
    <SingleSignOnService Binding="urn:mace:shibboleth:1.0:profiles:AuthnRequest" Location="https://IdPのホスト名/idp/profile/Shibboleth/SSO"/>
    <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://IdPのホスト名/profile/SAML2/POST/SSO"/>
    <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://IdPのホスト名/idp/profile/SAML2/Redirect/SSO"/>
  </IDPSSODescriptor>

メタデータ内の要素は並び順が決まっているものがありますので注意してください。特に<IDPSSODescriptor>の子要素については下記の順番となるように<SingleLogoutService>を挿入してください。

  • <KeyDescriptor>
  • <ArtifactResolutionService>
  • <SingleLogoutService>
  • <NameIDFormat>
  • <SingleSignOnService>
idp.propertiesの変更

idp.propertiesの以下の箇所を変更します。

/opt/shibboleth-idp/conf/idp.properties の設定

# Configuration of client- and server-side storage plugins
#idp.storage.cleanupInterval = PT10M
idp.storage.htmlLocalStorage = true ← アンコメントして変更

# Set to true to expose more detailed errors in responses to SPs
(省略)

# Track information about SPs logged into
idp.session.trackSPSessions = true ← アンコメントして変更
# Support lookup by SP for SAML logout
idp.session.secondaryServiceIndex = true ← アンコメントして変更
# Length of time to track SP sessions
#idp.session.defaultSPlifetime = PT2H

SPの設定

shibboleth2.xmlの設定

shibboleth2.xmlのSessions要素内のLogout要素に以下のように"SAML2"が設定されている必要があります。デフォルト設定ですので、変更していない場合は追加設定は不要です。"SAML2"の部分が削除されている場合は追加してください。

            <!-- SAML and local-only logout. -->
            <Logout>SAML2 Local</Logout>

メタデータへ<SingleLogoutService>を追加

SP のメタデータに<SPSSODescriptor>の子要素として<SingleLogoutService>を追加します。 LocationのSPのホスト名部分は適宜読み替え適切に設定して下さい。IdPが特殊な設定でなければ、ホスト名部分のみ合わせれば問題ありませ ん。

      </ds:KeyInfo>
    </KeyDescriptor>
    <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://SPのホスト名/Shibboleth.sso/SLO/POST"/> ← 追加
    <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://SPのホスト名/Shibboleth.sso/SLO/Redirect"/> ← 追加
    <AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://SPのホスト名/Shibboleth.sso/SAML2/POST" index="1" isDefault="true"/>
    <AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign" Location="https://SPのホスト名/Shibboleth.sso/SAML2/POST-SimpleSign" index="2"/>
    <AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" Location="https://SPのホスト名/Shibboleth.sso/SAML2/Artifact" index="3"/>
    <AssertionConsumerService Binding="urn:oasis:names:tc:SAML:1.0:profiles:browser-post" Location="https://SPのホスト名/Shibboleth.sso/SAML/POST" index="4"/>
    <AssertionConsumerService Binding="urn:oasis:names:tc:SAML:1.0:profiles:artifact-01" Location="https://SPのホスト名/Shibboleth.sso/SAML/Artifact" index="5"/>
    <AttributeConsumingService index="1" isDefault="true">
(省略)
  </SPSSODescriptor>

メタデータ内の要素は並び順が決まっているものがありますので注意してください。特に<SPSSODescriptor>の子要素については下記の順番となるように<SingleLogoutService>を挿入してください。

  • <KeyDescriptor>
  • <SingleLogoutService>
  • <NameIDFormat>
  • <AssertionConsumerService>
  • <AttributeConsumingService>

SLOの実行

SP-initiatedのSLO

ログインしているSPの次のURLにアクセスすることで、接続しているIdP、及びIdPとの間に認証セッションが確立している全てのSPからログアウトします。

https://SPのホスト名/Shibboleth.sso/Logout

この操作によりIdPからログアウトするためには、前述したIdPのメタデータへの<SingleLogoutService>の追加が必要です。

また、他のSPからログアウトするためには、そのSP側で、前述したSPのメタデータへの<SingleLogoutService>の追加が実施されている必要があります。

IdP-initiatedのSLO

ログインしているIdPの次のURLにアクセスすることで、アクセスしたIdP、及びIdPとの間に認証セッションが確立している全てのSPからログアウトします。

https://IdPのホスト名/idp/profile/Logout

この操作によりSPからログアウトするためには、SP側で、前述したSPのメタデータへの<SingleLogoutService>の追加が実施されている必要があります。

IdP 3.2.1時点では上記操作実行後Webブラウザが次のエラーメッセージを表示する画面へ遷移し、SPからのログアウトが実施されません。(IdPからはログアウトされています)

本件はIdP 3.3.0リリースで修正される予定です。

参考: IDP-892IDP-956

Web Login Service - Uncaught Exception

A software error was encountered that prevents normal operation:


java.lang.IllegalStateException: Exception occurred rendering view org.springframework.web.servlet.view.velocity.VelocityView: name 'logout'; URL [logout.vm]


Please report this problem to your Help Desk or administrative staff. It has also been logged for an administrator to review.

 

参考:

  • ラベルがありません