比較バージョン

キー

  • この行は追加されました。
  • この行は削除されました。
  • 書式設定が変更されました。
コメント: incomplete

...

  • 使用中のePTIDを失効させ新しいIDを再生成できる
  • 万が一のSHA-1のコリジョンを防ぐことができる
  • インシデント発生時に、IdP側でePTIDから個人を特定するのが容易である

 


...

目次

目次
exclude目次

 


ヒント

データベースの設定方法やePTIDの送信方法については以下にも情報がありますので、適宜参照してください。

1. データベース(

...

MariaDB)のインストール

MySQL MariaDB をインストールし初期設定を行います。
以下のコマンドを実行してmysqldの自動起動の設定及びMySQLのrootパスワードの設定を実施してください。 以下のコマンドを実行してmariadbの自動起動の設定及びMariaDBのrootパスワードの設定を実施してください。


パネル
bgColor#eeeeee

# yum install

mysql mysql

mariadb mariadb-server
#

chkconfig mysqld on

systemctl enable mariadb ← 自動起動を設定
#

chkconfig --list mysqld
mysqld             0:off    1:off    2:on    3:on    4:on    5:on    6:off ← 3、4、5がonになっていることを確認
# /etc/init.d/mysqld start

systemctl start mariadb
# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQLMariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL MariaDB to secure it, we'll need the current

password for the root user.  If you've just installed MySQLMariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): ← そのままEnter入力
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQLMariaDB
root user without the proper authorisation.

You already have a root password set, so you can safely answer 'n'.

Change the root password? [Y/n] ← rootパスワードを設定
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!


By default, a MySQL MariaDB installation has an anonymous user, allowing anyone
to log into MySQL MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] ← そのままEnter入力
... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] ← そのままEnter入力
... Success!

By default, MySQL MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n]
← そのままEnter入力
- Dropping test database...

... Success!

- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] ← そのままEnter入力
... Success!

Cleaning up...



All done!  If you've completed all of the above steps, your MySQLMariaDB
installation should now be secure.

Thanks for using MySQLMariaDB!

...



...

2. データベースにテーブルを作成する

MySQL上にデータベース MariaDB上にデータベース shibboleth を作成し、テーブル shibpid を追加します。

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
# mysql -u root -p
Enter password: ← 設定したrootパスワードを入力
Welcome to the MySQL MariaDB monitor.  Commands end with ; or \g.
Your MySQL MariaDB connection id is 46
Server version: 5.1.73 Source distribution5.60-MariaDB MariaDB Server

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
owners2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> MariaDB [(none)]> CREATE DATABASE shibboleth
mysql> ;
MariaDB [(none)]> CONNECT shibboleth
mysql> MariaDB [shibboleth]>
CREATE TABLE shibpid (
    ->         localEntity VARCHAR(255) NOT NULL,
    ->         peerEntity VARCHAR(255) NOT NULL,
    ->         persistentId VARCHAR(50) NOT NULL,
    ->         principalName VARCHAR(50) NOT NULL,
    ->         localId VARCHAR(50) NOT NULL,
    ->         peerProvidedId VARCHAR(50) NULL,
    ->         creationDate TIMESTAMP NOT NULL,
    ->         deactivationDate TIMESTAMP NULL,
    ->         PRIMARY KEY (localEntity, peerEntity, persistentId)
    -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

また、テーブル shibpid にアクセスするためのデータベースユーザを新規作成します。

パネル
bgColor#eeeeee

mysql> MariaDB [shibboleth]> CREATE USER 'データベースユーザ名'@'localhost' IDENTIFIED BY 'データベースパスワード';
mysql> MariaDB [shibboleth]> GRANT INSERT, SELECT, UPDATE, DELETE ON shibboleth.* TO 'データベースユーザ名'@'localhost';
mysql> MariaDB [shibboleth]> FLUSH PRIVILEGES;

※端末のサイズによっては表記がずれる可能性がございます。画面を広くしてご覧ください。

MariaDB [shibboleth]> quit

※端末のサイズによっては表記がずれる可能性がございます。画面を広くしてご覧ください。 


...

3. JDBCのドライバー(mysql-connector-

...

javaパッケージ)を取得する

MySQL Connector/Jのダウンロードページ(https://dev.mysql.com/downloads/connector/j/)より mysql-connector-java-5.1.xx.zip をダウンロードしてください。

...

 
PGPの署名検証が完了したら、ダウンロードしたZIPファイルを展開してください。中にmysql-connector-java-5.1.xx-bin.jarというJARファイルがあります。 


...

4. JDBCドライバーをインストールする 

...

※端末のサイズによっては表記がずれる可能性がございます。画面を広くしてご覧ください。  


...

5. /opt/shibboleth-idp/conf/global.xml を修正する

...

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
# For computed IDs, set a source attribute and a secret salt:
idp.persistentId.sourceAttribute = uid  アンコメントして修正
#idp.persistentId.useUnfilteredAttributes = true
# Do *NOT* share the salt with other people, it's like divulging your private key.
#idp.persistentId.algorithm = SHA
idp.persistentId.salt = XXXXXXXXXXXXXXXX   アンコメントして修正

# To use a database, use shibboleth.StoredPersistentIdGenerator
idp.persistentId.generator = shibboleth.StoredPersistentIdGenerator  ← アンコメントして修正
# For basic use, set this to a JDBC DataSource bean name:
idp.persistentId.dataSource = MyDataSource   アンコメントして修正
# For advanced use, set to a bean inherited from shibboleth.JDBCPersistentIdStore
#idp.persistentId.store = MyPersistentIdStore

 

...



...

7. /opt/shibboleth-idp/conf/attribute-resolver.xml を修正する

...