...
- 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"/> <SessionInitiator ...>...</SessionInitiator> </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> <SessionInitiator ...>...</SessionInitiator> </Sessions>
eduPersonPrincipalNameとdisplayNameのどちらか一方の属性を必須とする場合(OR条件)
書式設定済み <Sessions> (...略...) <Handler type="AttributeChecker" Location="/AttrChecker" template="attrChecker.html" flushSession="true"> <OR> <Rule require="eppn"/> <Rule require="displayName"/> </OR> </Handler> <SessionInitiator ...>...</SessionInitiator> </Sessions>
チェック対象の eppn
や displayName
といった属性名は /etc/shibboleth/attribute-map.xml
で定義されている内容に従って記述する必要があります。
この他に template="attrChecker.html"
の部分に template="/var/www/html/Error.html"
のようにローカルのファイルを指定することで、Attribute Checkerによって表示されるエラーページを変更することも可能です。
Attribute Checker Handlerに関する詳細は https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPHandler#NativeSPHandler-AttributeCheckerHandlerVersion25andAbove をご参照ください。
...