...
学認ではシステム運用基準として、アサーション(IdPで生成した利用者の属性等の情報)をSPに送る際には暗号化すべき(SHOULD)であると定めています(*1)が、Google AppsやOffice 365などのように暗号化したアサーションを受け付けないSPも存在します。Shibboleth IdPのデフォルトの挙動は、SPに対して送信するアサーションを暗号化するようになっていますので、そのような特定のSPに対して送信するアサーションを暗号化しないように設定する方法を以下に記載します。
...
2.2) 認証応答
(...略...)さらに,認証アサーションに対して,暗号化をすべきである。
relying-party.xmlの<DefaultRelyingParty>の下に次の設定を追加します。設定内容はIdPにより異なるため、<DefaultRelyingParty>にある内容をコピーして挿入し、encryptAssertionsおよびencryptNameIdsを"never"に変更してください。
コード ブロック | ||||
---|---|---|---|---|
| ||||
<RelyingParty id="SPのentityID" provider="IdPのentityID" defaultSigningCredentialRef="IdPCredential"> ... <ProfileConfiguration xsi:type="saml:SAML2SSOProfile" includeAttributeStatement="true" assertionLifetime="300000" assertionProxyCount="0" signResponses="conditional" signAssertions="never" encryptAssertions="never" encryptNameIds="never" /> ... </RelyingParty> |
...
- 特定のSPへのアサーションを暗号化しないことに関するポリシーの議論:
http://marc.info/?t=136497370800001&r=1&w=2
- 特定のSPへのアサーションを暗号化しないことに関するポリシーの議論:
...
IdPの認証画面に直接アクセスしたときのエラー表示追加方法
...
学認参加のSPで特例として学認外のIdPをDSのリストに表示させるための方法を記載します。 https://meatwiki.nii.ac.jp を例にするとログインするときに表示されるIdPのリストとして、OpenIdPなどの学認外IdPを追加する方法の説明となります。
...
リダイレクトを制限するためのオプションが追加された経緯については下記のリンクを参照ください。
Shibboleth SP 2.5.0からの新機能
...
NativeSPHandlerのページに倣い、SPでeduPersonPrincipalNameとdisplayNameの属性を必須とする場合の具体的な書き方を例示します。
- ApplicationDefaultsに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によって表示されるエラーページを変更することも可能です。
Attribute Checker Handlerに関する詳細は https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPHandler#NativeSPHandler-AttributeCheckerHandlerVersion25andAbove をご参照ください。
...
CentOS 5のphp53パッケージやCentOS 6のphpパッケージなど、PHP 5.3以降を使用しているマシンでGakuNinDSを動かすときには、httpdのエラーログに下記の警告が出力されることがあります。
\[Fri Mar 09 15:26:17 2012\] \ [error\] \ [client xxx.xxx.xxx.xxx\] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Tokyo' for 'JST/9.0/no DST' instead in /var/www/html/GakuNinDS/functions.php on line 484, referer: <span class="nolink">httpshttps://sp.exapmle.com/</span> Wiki マークアップ
上記の警告が出力されていてもGakuNinDSの動作には問題ありませんが、下記のように/etc/php.iniにてdate.timezoneを定義することでこの警告は出力されなくなります。
...