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

比較バージョン

キー

  • この行は追加されました。
  • この行は削除されました。
  • 書式設定が変更されました。

...

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

IdP のメタデータに<IDPSSODescriptor>の子要素として<SingleLogoutService>を追加します。 LocationのIdPのホスト名部分は適宜読み替え適切に設定して下さい。IdPが特殊な設定でなければ、ホスト名部分のみ合わせれば問題ありません。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>
展開
title全子要素の並び順...
  • (ds:Signature)
  • md:Extensions
  • md:KeyDescriptor
  • (md:Organization)
  • (md:ContactPerson)
  • md:ArtifactResolutionService
  • md:SingleLogoutService
  • md:ManageNameIDService
  • md:NameIDFormat
  • md:SingleSignOnService
  • md:NameIDMappingService
  • md:AssertionIDRequestService
  • md:AttributeProfile
  • saml:Attribute
idp.propertiesの変更

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

パネル
title/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の設定

shibboleth2SPでのログアウトをトリガーとしてSLOを駆動するためには、shibboleth2.xmlのSessions要素内のLogout要素に以下のように"SAML2"が設定されている必要があります。デフォルト設定ですので、変更していない場合は追加設定は不要です。"SAML2"の部分が削除されている場合は追加してください。

...

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

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

パネル

      </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>
展開
title全子要素の並び順...
  • (ds:Signature)
  • md:Extensions
  • md:KeyDescriptor
  • (md:Organization)
  • (md:ContactPerson)
  • md:ArtifactResolutionService
  • md:SingleLogoutService
  • md:ManageNameIDService
  • md:NameIDFormat
  • md:AssertionConsumerService
  • md:AttributeConsumingService

SLOの実行

SP-initiatedのSLO

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

...

注意

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.

注意

SPのSLO対応について、Shibbolethセッションを使ってWebアプリケーションを構成している場合はこの手順で完了ですが、Webアプリケーションで独自のセッションを管理している場合、Shibbolethセッションと連動させるためにいくつかの改修が必要です。

  1. アプリケーションセッション中でもShibbolethセッションがなくなっていればセッションを終了させる。
  2. Webアプリケーションにおけるログアウトのタイミングで/Shibboleth.sso/Logoutを呼ぶ。
    参考: GakuNinShare - 設定・運用・カスタマイズ - WebアプリケーションのログアウトフローへのShibbolethログアウト処理の挿入
  3. (SLOの通知を受けセッションを破棄する)
    参考: https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPNotify
    ※これがなくても次回アクセス時に1.の処理でセッションは破棄されるはずです。厳密なセッション管理を行うなら。

参考: https://wiki.shibboleth.net/confluence/display/SHIB2/SLOWebappAdaptation

 

参考: