• 検索結果がありません。

4-2.事前準備

ドキュメント内 システム管理マニュアル (ページ 46-50)

4-2-1.証明書の準備

1. 第三者認証機関が承認した証明書を.pfx 形式でエクスポートします。

証明書を取得する一般的な方法には、以下の 3 種類があります。(※詳細は認証局の設定手順にしたがってく ださい。)

2. Certreq.exe を使用した証明書の取得(Windows)

https://azure.microsoft.com/ja-jp/documentation/articles/web-sites-configure-ssl-certificate/#bkmk_certreq 3. IIS マネージャーを使用した証明書の取得(Windows)

https://azure.microsoft.com/ja-jp/documentation/articles/web-sites-configure-ssl-certificate/#bkmk_iismgr 4. OpenSSL を使用した証明書の取得(Linux)

https://azure.microsoft.com/ja-jp/documentation/articles/web-sites-configure-ssl-certificate/#bkmk_openssl

4-2-2.tomcat に証明書をインストールする

1. pfx ファイルをサーバーに設置します。

2. pfx ファイルを jks 形式に変換します。以下のコマンドを実行します。

3. tomcat の設定ファイル(conf/server.xml)を開き、赤字部分を追記します。

4. tomcat を再起動します。

$ cd /path/to/tomcat/conf/ # tomcat 設定ディレクトリに移動します。

$ keytool -importkeystore \

-srckeystore /path/to/ <IdP サーバーのアドレス>.pfx \ #設置した pfx ファイルのパスを指定します。

-srcstoretype pkcs12 \ -destkeystore keystore.jks \ -deststoretype jks

Enter destination keystore password: # キーストアのパスワードを入力します。

Re-enter new password: # パスワードを再入力します。

Enter source keystore password: # pfx に設定されているパスワードを入力します。

Entry for alias openam-idp successfully imported.

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"

maxThreads="150" scheme="https" secure="true"

keystoreFile="/path/to/tomcat/conf/keystore.jks" # キーストアのパスを入力します。

keystorePass="xxxxx" # キーストアのパスワードを入力します。

clientAuth="false" sslProtocol="TLS" />

4-2-3.署名鍵の作成

1. 以下のコマンドを実行し、キーストアを作成します。

2. パスワードファイルを作成します。

OpenAM に管理者ユーザーでログインします。

ブラウザにて下記 URL にアクセスします。

キーストアのパスワードを入力し、「符号化」をクリックします。

$ mkdir /root/openam/openam/private

$ keytool -genkeypair -alias newkey -keyalg RSA -keysize 1024 -validity 730 -storetype JKS -keystore /root/openam/openam/private/mykeystore.jks Enter keystore password:

Re-enter new password:

What is your first and last name?

[Unknown]: <IdP サーバーのアドレス>

What is the name of your organizational unit?

[Unknown]: XXXXX

What is the name of your organization?

[Unknown]: XXXXX

What is the name of your City or Locality?

[Unknown]: XXXXX

What is the name of your State or Province?

[Unknown]: XXXXX

What is the two-letter country code for this unit?

[Unknown]: JP

Is CN= <IdP サーバーのアドレス>, OU=XXXXX, O=XXXXX, L=XXXXX, ST=XXXXX, C=JP correct?

[no]: yes

Enter key password for <newkey>

(RETURN if same as keystore password):

Re-enter new password:

https://<IdP サーバーのアドレス>:8443/openam/encode.jsp

下記のファイルに符号化されたキーストアのパスワードを入力して保存します。

署名鍵のパスワードについても、同様の手順で符号化後のパスワードを下記のファイルに保存します。

3. OpenAM のキーストア設定を変更

OpenAM に管理者ユーザーでログインします。

「設定」>「サーバーおよびサイト」>「デフォルトのサーバー設定値」をクリックします。

「セキュリティ」をクリックし、「キーストア」項を編集し、保存します。

・キーストアファイル:「%BASE_DIR%/%SERVER_URI%/private/mykeystore.jks」を入力します。

・キーストアパスワードファイル:「%BASE_DIR%/%SERVER_URI%/private/.storepass」を入力 します。

・非公開鍵パスワードファイル:「%BASE_DIR%/%SERVER_URI%/private/.keypass」を入力します。

$ vi /root/openam/openam/private/.storepass

$ vi /root/openam/openam/private/.keypass

ドキュメント内 システム管理マニュアル (ページ 46-50)

関連したドキュメント