...
注意 |
---|
この問題は SP 2.5.1 で修正予定です。 https://issues.shibboleth.net/jira/browse/SSPCPP-518 |
shibboleth2.xml
Attribute Checker Handler
Shibboleth SP 2.5よりAttribute Checker Handlerが実装されました。同じくShibboleth SP 2.5からの機能であるsessionHookと合わせて利用することで、IdPから必要な属性が渡されているかチェックすることができます。ApplicationDefaultの属性としてsessionHookを設定し、Sessionsの末尾にAttribute checker Handlerを追加することでこの機能を利用できます。
NativeSPHandlerのページに倣い、SPでeduPersonPrincipalNameとdisplayNameの属性を必須とする場合の具体的な書き方を例示します。
- ApplicationDefaultにsessionHookの設定を追加(共通)
書式設定済み <ApplicationDefaults id="default" policyId="default" entityID="https://sp.example.ac.jp/shibboleth-sp" REMOTE_USER="eppn persistent-id targeted-id" - signing="false" encryption="false"> + signing="false" encryption="false" sessionHook="/Shibboleth.sso/AttrChecker">
- Sessionsの末尾にAttribute checker Handlerを追加(利用用途に合わせて選択)
- eduPersonPrincipalNameとdisplayNameの属性を必須とする(AND条件)
書式設定済み <Sessions> (...略...) <!-- Checks for required attribute(s) before login completes. --> <Handler type="AttributeChecker" Location="/AttrChecker" template="attrChecker.html" attributes="eppn displayName" flushSession="true"/> </Sessions>
書式設定済み <Sessions> (...略...) <!-- Checks for required attribute(s) before login completes. --> <Handler type="AttributeChecker" Location="/AttrChecker" template="attrChecker.html" flushSession="true"> <AND> <Rule require="eppn"/> <Rule require="displayName"/> </AND> </Handler> </Sessions>
- eduPersonPrincipalNameとdisplayNameのどちらか一方の属性を必須とする場合(OR条件)
書式設定済み <Sessions> (...略...) <Handler type="AttributeChecker" Location="/AttrChecker" template="attrChecker.html" flushSession="true"> <OR> <Rule require="eppn"/> <Rule require="displayName"/> </OR> </Handler> </Sessions>
- eduPersonPrincipalNameとdisplayNameの属性を必須とする(AND条件)
eppn
や displayName
といった属性値は /etc/shibboleth/attribute-map.xml
で定義されている内容に従って記述する必要があります。
この他に template="attrChecker.html"
に template="/var/www/html/Error.html"
のようなローカルのファイルを指定することで、Attribute Checkerによって表示されるエラーページを変更することも可能です。
DS関連情報
PHP
CentOS 5標準のphpパッケージを用いた場合に/WAYF/IDProviders.jsonにアクセスするとエラー
CentOS 5標準のphpパッケージはPHP 5.1系であるため、GakuNinDSの https://ds.example.ac.jp/WAYF/IDProviders.json にアクセスすると下記のエラーが出力されます。
...