比較バージョン

キー

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

...

2. 実習セミナーでは

以下の手順で作業を進めてください。

ContextCheckを有効にする

4.1.0以降では同意機能はモジュール化されており、利用するには有効化操作が必要です。以下のコマンドを実行してください。(当該モジュールがすでに有効化されているかを確認し、有効化されていない場合に有効化するものです)

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

# /opt/shibboleth-idp/bin/module.sh -t idp.intercept.ContextCheck || /opt/shibboleth-idp/bin/module.sh -e idp.intercept.ContextCheck

・relying-party.xmlの修正

/opt/shibboleth-idp/conf/relying-party.xmlにアクセス制限が行えるように設定します。
本メニューでは、送信属性同意機能を有効にした状態でアクセス制限を行う設定とします。 

...

パネル
bgColor#eeeeee

            </property>
        </bean>
        -->
        <bean parent="RelyingPartyByName" c:relyingPartyIds="#{{'https://ex-sp-test01.gakunin.nii.ac.jp/shibboleth-sp'}}">
            <property name="profileConfigurations">
                <list>
                    <!-- SAML 1.1 and SAML 2.0 AttributeQuery are disabled by default. -->
                    <!--

                    <bean parent="Shibboleth.SSO" p:postAuthenticationFlows="#{{'context-check', 'attribute-release'}}" />
                    <ref bean="SAML1.AttributeQuery" />
                    <ref bean="SAML1.ArtifactResolution" />
                    -->
               
   <bean parent="SAML2.SSO" p:postAuthenticationFlows="#{{'context-check', 'attribute-release'}}" />

                    <ref bean="SAML2.ECP" />
                    <ref bean="SAML2.Logout" />
                    <!--
                    <ref bean="SAML2.AttributeQuery" />
                    -->
               
   <ref bean="SAML2.ArtifactResolution" />

                </list>

            </property>
        </bean>
       
    </util:list>

</beans>

情報

複数のSPで制限を行う場合は c:relyingPartyIds="#{{'https://ex-sp-test01.gakunin.nii.ac.jp/shibboleth-sp', 'https://ex-sp-test02.gakunin.nii.ac.jp/shibboleth-sp'}}" のように書くことができます。

注意

relying-party.xmlの前者の設定では、後述のcontext-check-intercept-config.xmlで記述していない他のSPについては全ユーザがアクセスできなくなりますのでご注意ください。SPを限定する記述を取り除くか、アクセスを許容する全てのSPを列挙するようにしてください。
もしくは、上記後者の記述で特定のSPのみに本ContextCheck機能を適用してください。


・context-check-intercept-config.xmlの修正

...

情報

複数のSPにマッチさせる場合は c:candidates="#{{'https://ex-sp-test01.gakunin.nii.ac.jp/shibboleth-sp', 'https://ex-sp-test02.gakunin.nii.ac.jp/shibboleth-sp'}}" のように書くことができます。

・Tomcatの再起動

別の例: https://shibboleth.atlassian.net/wiki/spaces/IDP4/pages/1265631713/ActivationConditions#Examples

・Jettyの再起動

Jettyを再起動して、修正した設定ファイルを読み込ませます。Tomcatを再起動して、修正した設定ファイルを読み込ませます。

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

# systemctl restart tomcat jetty

情報

今後も、context-check-intercept-config.xml を直接編集した場合はreload-service.shによる再読み込みができませんので、更新を反映するためにはJettyを再起動する必要があります。

これを避けるために判定のロジックをattribute-resolver.xmlで実装する、すなわちtrue/falseを表す専用の属性を生成し、context-check-intercept-config.xml では当該属性のみを参照するようにすることをお勧めします。attribute-resolver.xmlの更新であれば

# /opt/shibboleth-idp/bin/reload-service.sh -id shibboleth.AttributeResolverService

により再読み込みすることが可能です。


...

3. 手順書

以下は、英語での情報が記載されたwiki.shibboleth.netのURLです。手順の詳細にご興味がある方はご参照ください。
※送信属性によるアクセス制限の設定については記載されていませんが、 RelyingPartyについてのページのリンクとなります。

参考: RelyingPartyConfiguration


...

4. 動作確認

① 各自が使用するSPの接続確認用ページにアクセスします。

...

⑦ 正しく属性受信の確認ページに表示される事を確認してください。

Prevnextbuttons