本手順は作成中です。最終版までに変更される可能性がありますのでご注意ください。また、手順中のURLはまだ用意されておりません。
SPの設定変更手順
新しい署名鍵で署名されたフェデレーションメタデータおよび新しい検証用証明書の公開後、本手順に従い設定変更を実施してください。
学認技術ガイドに従って設定した標準的なSP(バージョン2.6.0)の場合の設定です。異なるバージョン、設定の場合には適宜読み替えてください。
新しい検証用証明書を以下のURLからダウンロードして「/etc/shibboleth/cert/gakunin-signer-2017.cer
」に置きます。https://metadata.gakunin.nii.ac.jp/gakunin-signer-2017.cer
証明書のfingerprint確認
ダウンロードした署名検証用証明書のfingerprintを確認し、以下と一致するか確認してください。
SHA256 Fingerprint=5E:D6:A8:C5:E9:30:49:3F:B4:BA:77:54:6A:FB:66:BA:14:7D:CB:50:5B:EF:0F:D9:7C:26:04:C2:D9:36:FD:81
OpenSSLコマンドでは以下のように確認します。
> openssl x509 -in gakunin-signer-2017.cer -fingerprint -sha256 -noout
署名検証用証明書およびFingerprintの正式公開場所:https://meatwiki.nii.ac.jp/confluence/x/F4W5
メタデータの公開場所は学認技術運用基準で指定されています。
メタデータ公開URL:https://metadata.gakunin.nii.ac.jp/gakunin-metadata.xml
学認技術運用基準:http://id.nii.ac.jp/1149/00000212/
/etc/shibboleth/shibboleth2.xml
を次のように編集します。
<MetadataProvider>
のuri
を以下の通り修正します。<MetadataProvider type="XML" validate="true" - uri="https://metadata.gakunin.nii.ac.jp/gakunin-metadata.xml" + uri="https://metadata.gakunin.nii.ac.jp/gakunin-metadata.xml?generation=2" backingFilePath="federation-metadata.xml" reloadInterval="7200"> (......)
<MetadataFilter>
のcertifiate
を以下の通り修正します。<MetadataProvider type="XML" validate="true" (......) backingFilePath="federation-metadata.xml" reloadInterval="7200"> - <MetadataFilter type="Signature" certificate="/etc/shibboleth/cert/gakunin-signer-2010.cer"/> + <MetadataFilter type="Signature" certificate="/etc/shibboleth/cert/gakunin-signer-2017.cer"/> (......) </MetadataProvider>
shibdを再起動し、設定を再読み込みします。
(CentOS 7の場合) $ sudo systemctl restart shibd (CentOS 6の場合) $ sudo service shibd restart
一定時間の経過後、新しい署名鍵で署名されたメタデータがダウンロードされているか、保存されたメタデータファイル(/var/cache/shibboleth/federation-metadata.xml
もしくはshibboleth2.xml
の<MetadataProvider>
のbackingFilePath
で指定されたパス)を確認してください。
メタデータファイルの先頭から検索し、最初にマッチする</ds:X509Certificate>
の直前の行が以下のようになっていれば成功です。
nwU/H9ROp1cl </ds:X509Certificate>
以下のようになっている場合は古い署名鍵で署名されたものですので、ログ(/var/log/shibboleth/shibd.log
)でメタデータのダウンロードが行われているか、ダウンロードURLが ?generation=2
付きになっているかを確認してください。
7NVe3mIUWLcYEtdbC8Ip5OA2TXvA </ds:X509Certificate>
また、エラーログ(/var/log/shibboleth/shibd_warn.log
)に以下のように記録されている場合は署名検証に失敗しておりますので、shibboleth2.xmlの証明書ファイルの指定が -2017
のほうになっているか、および上述の証明書のフィンガープリントを今一度確認してください。
2017-11-16 14:19:44 WARN OpenSAML.MetadataFilter.Signature : filtering out group at root of instance after failed signature check: CredentialResolver did not supply any candidate keys.
Procedure for Changing the Shibboleth SP Configuration to use new GakuNin signing certificate
This manual is a work-in-progress. Please note that it may be changed in the final version. The URL mentioned in here is not prepared yet.
After the publication of new federation metadata signed by a new signing key and corresponding certificate, please change the configuration according to the procedure outlined here.
This manual is for the standard Shibboleth SP configuration set according to version 2.6.0. If you are using a different version or configuration, please replace and read it accordingly.
Download the new signing certificate from the URL below and place it in: /etc/shibboleth/cert/gakunin-signer-2017.cer
https://metadata.gakunin.nii.ac.jp/gakunin-signer-2017.cer
Confirmation of certificate fingerprint
Please confirm that the fingerprint of the downloaded certificate matches the following:
SHA256 Fingerprint=5E:D6:A8:C5:E9:30:49:3F:B4:BA:77:54:6A:FB:66:BA:14:7D:CB:50:5B:EF:0F:D9:7C:26:04:C2:D9:36:FD:81
OpenSSL command is as follows:
> openssl x509 -in gakunin-signer-2017.cer -fingerprint -sha256 -noout
Official disclosure location of signature verification certificate and Fingerprint : https://meatwiki.nii.ac.jp/confluence/x/F4W5
The federation metadata URL for publishing is stipulated in "System Administration Standards for the GakuNin".
Metadata Publishing URL : https://metadata.gakunin.nii.ac.jp/gakunin-metadata.xml
System Administration Standards for the GakuNin : http://id.nii.ac.jp/1149/00000219/
notice:The following description is diff format.
Edit /etc/shibboleth/shibboleth2.xml as follows:
Amend the metadata URL for <MetadataProvider> as follows:
<MetadataProvider type="XML" validate="true" - uri="https://metadata.gakunin.nii.ac.jp/gakunin-metadata.xml" + uri="https://metadata.gakunin.nii.ac.jp/gakunin-metadata.xml?generation=2" backingFilePath="federation-metadata.xml" reloadInterval="7200"> (......)
Amend the certifiate for <MetadataFilter> as follows:
<MetadataProvider type="XML" validate="true" (......) backingFilePath="federation-metadata.xml" reloadInterval="7200"> - <MetadataFilter type="Signature" certificate="/etc/shibboleth/cert/gakunin-signer-2010.cer"/> + <MetadataFilter type="Signature" certificate="/etc/shibboleth/cert/gakunin-signer-2017.cer"/> (......) </MetadataProvider>
Restart shibd and refresh the configuration.
(For CentOS 7) $ sudo systemctl restart shibd (For CentOS 6) $ sudo service shibd restart
After a sufficient amount of time, please make sure that the signed metadata with the new signing key is downloaded.
It is success that just before the first match "</ds:X509Certificate>" of the GakuNin metadata backing file (/var/cache/shibboleth/federation-metadata.xml
or similar) is as follows:
nwU/H9ROp1cl </ds:X509Certificate>
If it looks like as follows, it is the metadata with a signature by the OLD signing key. You should check the log file to confirm that a metadata was downloaded and also check your configuration of download URL has a query string "?generation=2".
7NVe3mIUWLcYEtdbC8Ip5OA2TXvA </ds:X509Certificate>
Furthermore, if your log file (/var/log/shibboleth/shibd_warn.log
) has following lines, it failed signature verification. You should check that your configuration of certificate path contains "-2017"
and also check the fingerprint of the certificate again.
2017-11-16 14:19:44 WARN OpenSAML.MetadataFilter.Signature : filtering out group at root of instance after failed signature check: CredentialResolver did not supply any candidate keys.