警告 |
---|
本手順は作成中です。最終版までに変更される可能性がありますのでご注意ください。また、手順中のURLはまだ用意されておりません。本ページは2017年に行われたメタデータ署名用証明書の切り替えの際に作成されたものです。内容が古くなっている可能性がありますのでご注意ください。 |
情報 |
---|
SPの設定変更手順
...
新しい署名鍵で署名されたフェデレーションメタデータおよび新しい検証用証明書が公開されておりますので、本手順に従い設定変更を実施してください。
情報 |
---|
本ページに記載している署名検証用証明書およびそのフィンガープリント、メタデータ公開URLは次のページで公開されているものです。 |
注意 |
---|
学認技術ガイドに従って設定した標準的なSP(バージョン2.6.01)の場合の設定です。異なるバージョン、設定の場合には適宜読み替えてください。 |
新しい検証用証明書を以下のURLからダウンロードして「/etc/shibboleth/cert/gakunin-signer-2017.cer
」に置きます。https://metadata.gakunin.nii.ac.jp/gakunin-signer-2017.cer
注意 | ||
---|---|---|
| ||
ダウンロードした署名検証用証明書の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コマンドでは以下のように確認します。 署名検証用証明書およびFingerprintの正式公開場所:https://meatwiki.nii.ac.jp/confluence/x/F4W5 メタデータの公開場所は学認技術運用基準で指定されています。 メタデータ公開URL:https://metadata.gakunin.nii.ac.jp/gakunin-metadata.xml学認技術運用基準:http:/ |
/
...
/etc/shibboleth/shibboleth2.xml
を次のように編集します。
<MetadataProvider>
のuri
を以下の通り修正します。に指定するメタデータダウンロードURLを以下の通り、末尾に?generation=2
を付加します。コード ブロック language diff title 差分(unified diff形式)xml <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
を以下の通り修正します。に指定する署名検証用証明書のファイル名を以下の通り、2010
の部分を2017
に修正します。コード ブロック language diff title 差分(unified diff形式)xml <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>
ヒント バージョン2.6およびそれ以降をお使いの場合、万一設定ミスした場合もしくはダウンロードに失敗した場合の保険として、さらに
verifyBackup="false"
を追加していない場合は追加することをお勧めします。そうでなければ、後述の再起動時、旧署名証明書で署名されたバッキングファイルに対して新署名証明書で検証するため失敗し、当該バッキングファイルが効果を失います。ただし、バッキングファイルが他者によって変更されないことが確実な場合のみこれを行ってください。コード ブロック language diff title 差分(unified diff形式) <MetadataProvider type="XML" validate="true" (......) backingFilePath="federation-metadata.xml" reloadInterval="7200"> - <MetadataFilter type="Signature" certificate="/etc/shibboleth/cert/gakunin-signer-2017.cer"/> + <MetadataFilter type="Signature" certificate="/etc/shibboleth/cert/gakunin-signer-2017.cer" verifyBackup="false"/> (......) </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>
の直前の行が以下のようになっていれば成功です。
コード ブロック | |||
---|---|---|---|
| |||
$ grep -B 1 "/ds:X509Certificate" /var/cache/shibboleth/federation-metadata.xml | head -n 2
nwU/H9ROp1cl
</ds:X509Certificate> |
...
アンカー EnglishVersion EnglishVersion
Procedure for Changing the
...
SP Configuration to Use New GakuNin Signing Certificate
As
警告 |
---|
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 were released, 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. |
TL;DR
You can also skip the latter half of this document because it is Shibboleth specific. |
Download the Download a 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
注意 | ||
---|---|---|
| ||
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:
Official disclosure location of signature verification certificate and Fingerprint Please check the locations of signing certificate and fingerprint in : https://meatwiki.nii.ac.jp/confluence/x/F4W5 The signing certificate URL and its fingerprint and federation metadata URL for publishing is are stipulated in "System Administration Standards for the GakuNin". |
notice:The following description is diff format.
注意 |
---|
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. |
Edit /etc/shibboleth/shibboleth2.xml as follows:
Amend the metadata URL for <MetadataProvider> as follows:
コード ブロック language xml <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:
コード ブロック language xml <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:
コード ブロック | |||
---|---|---|---|
| |||
$ grep -B 1 "/ds:X509Certificate" /var/cache/shibboleth/federation-metadata.xml | head -n 2
nwU/H9ROp1cl
</ds:X509Certificate> |
...
書式設定済み |
---|
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. |
...