Shibboleth IdPでStoredIDを利用するための設定方法(MySQL)
StoredIDは eduPersonTargetedID (ePTID)を生成する方法の一つです。 ComputedIDと比較して、以下の利点があります。
- 使用中のePTIDを失効させ新しいIDを再生成できる
- 万が一のSHA-1のコリジョンを防ぐことができる
- インシデント発生時に、IdP側でePTIDから個人を特定するのが容易である
...
1. データベース(MySQL)のインストール
MySQL をインストールし初期設定を行います。
以下のコマンドを実行してmysqldの自動起動の設定及びMySQLのrootパスワードの設定を実施してください。
パネル |
---|
|
...
2. データベースにテーブルを作成する
MySQL上にデータベース shibboleth
を作成し、テーブル shibpid を追加します。 データベースにテーブルを作成するMySQL上にデータベース shibboleth
を作成し、以下のテーブルを追加します。
パネル | ||||||
---|---|---|---|---|---|---|
| ||||||
Enter password: ← 設定したrootパスワードを入力 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 46 Server version: 5.1.73 Source distribution Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> CREATE DATABASE shibboleth
|
また、テーブル shibpid にアクセスするためのデータベースユーザを新規作成します。
パネル |
---|
|
※端末のサイズによっては表記がずれる可能性がございます。画面を広くしてご覧ください。
...
23. JDBCのドライバー(mysql-connector-java-5.1.xx-bin.jar)を取得する
...
PGPの署名検証が完了したら、ダウンロードしたZIPファイルを展開してください。中にmysql-connector-java-5.1.xx-bin.jarというJARファイルがあります。
...
34. JDBCドライバーをインストールする
2.で取得したJARファイルを/opt/shibboleth-idp/edit-webapp/WEB-INF/lib/
に配置したあとビルドスクリプトを実行しidp.warを再生成します。
...
※端末のサイズによっては表記がずれる可能性がございます。画面を広くしてご覧ください。
...
45. /opt/shibboleth-idp/conf/global.xml を修正する
...
パネル | ||||||
---|---|---|---|---|---|---|
| ||||||
<!-- Use this file to define any custom beans needed globally. --> |
...
...
6. /opt/shibboleth-idp/conf/saml-nameid.properties を修正する
idp.persistentId.sourceAttribute, idp.persistentId.salt, idp.persistentId.generatorとidp.persistentId.storeを設定します。
idp.persistentId.saltには他人が推測できないランダムな値を指定してください。古いIdPから設定を引き継ぐ場合は同じ値を指定してください。
パネル | ||||||
---|---|---|---|---|---|---|
| ||||||
# For computed IDs, set a source attribute and a secret salt: |
...
...
idp.persistentId.sourceAttributeで指定した属性がLDAPで定義されているのみでconf/attribute-resolver.xmlに対応するresolver:AttributeDefinitionが存在しない場合、
以下のresolver:AttributeDefinitionをアンコメントします。
...
...
<!-- -->
<resolver:AttributeDefinition id="%{idp.persistentId.sourceAttribute}" xsi:type="ad:Simple" sourceAttributeID="%{idp.persistentId.sourceAttribute}">
<resolver:Dependency ref="myLDAP" />
</resolver:AttributeDefinition>
<!-- -->
...
7. /opt/shibboleth-idp/conf/attribute-resolver.xml を修正する2
storedID 用の id="eduPersonTargetedID" の AttributeDefinition と DataConnector をアンコメントします。その際、computedID 用の AttributeDefinition がアンコメントされている場合はコメントアウトします。また、storedID 用の DataConnector をアンコメントします。用のものがアンコメントされている場合はコメントアウトします。
パネル | ||||||
---|---|---|---|---|---|---|
| ||||||
← コメントアウト (省略) <!-- --> <resolver:AttributeDefinition
(省略)
|
※端末のサイズによっては表記がずれる可能性がございます。画面を広くしてご覧ください。
...
8. Tomcatを再起動する
すべての作業が終わりましたらTomcatを再起動してください。
...