4.2.8.1 証明書を生成するためのサード・パーティCAの使用
次のステップは、証明書の生成にサード・パーティの認証局(CA)を使用する方法を示しています:
- 管理コンテナのインストールを実行するノードで、ディレクトリを作成し、そのフォルダに移動します。次に例を示します:
mkdir <workdir>/oaa_ssl export WORKDIR=<workdir> cd $WORKDIR/oaa_ssl
- サーバー証明書の4096ビット秘密キー(
oaa.key
) を生成します:openssl genrsa -out oaa.key 4096
- 証明書署名リクエスト(
oaa.csr
)を作成します:
求められた場合は、証明書署名リクエスト(CSR)作成の詳細を入力します。たとえば:openssl req -new -key oaa.key -out oaa.csr
You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [XX]:US State or Province Name (full name) []:California Locality Name (eg, city) [Default City]:Redwood City Organization Name (eg, company) [Default Company Ltd]:Example Company Organizational Unit Name (eg, section) []:Security Common Name (eg, your name or your server's hostname) []:oaa.example.com Email Address []: Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []:
- CSR (
oaa.csr
)をサード・パーティCAに送信します。 - CAから証明書を受信したら、ファイルの名前を
oaa.pem
に変更し、それを$WORKDIR/oaa_ssl
ディレクトリにコピーします。ノート:
証明書oaa.PEM
はPEM形式である必要があります。PEM形式でない場合は、opensslを使用してPEMに変換します。たとえば、DER形式からPEMに変換するには:openssl x509 -inform der -in oaa.der -out oaa.pem
- 信頼ルートCA証明書(
rootca.pem
)と、oaa.pem
に署名したチェーン内の他のCA証明書(rootca1.pem
、rootca2.pem
など)を、$WORKDIR/oaa_ssl
ディレクトリにコピーします。前述のとおり、CA証明書はPEM形式である必要があるため、必要に応じて変換します。 - CAのチェーンに複数の証明書がある場合は、すべてのCA証明書を含む
bundle.pem
を作成します:cat rootca.pem rootca1.pem rootca2.pem >>bundle.pem
- 次のように、信頼証明書PKCS12ファイル(
trust.p12
)をファイルから作成します:
求められた場合は、エクスポート・パスワードを入力して確認します。openssl pkcs12 -export -out trust.p12 -nokeys -in bundle.pem
ノート:
管理者は、次のことに注意する必要があります:- エクスポート・パスワードの設定は必須です。
- CAに証明書チェーンがない場合は、
bundle.pem
をrootca.pem
に置き換えます。
- 次のように、サーバー証明書PKCS12ファイル(
cert.p12
)を作成します:
求められた場合は、エクスポート・パスワードを入力して確認します。openssl pkcs12 -export -out cert.p12 -inkey oaa.key -in oaa.pem -chain -CAfile bundle.pem
ノート:
管理者は、次のことに注意する必要があります:- エクスポート・パスワードの設定は必須です。
- CAに証明書チェーンがない場合は、
bundle.pem
をrootca.pem
に置き換えます。
その他の情報
上で生成したファイルとパスワードは、後で
installOAA.properties
で使用します。たとえば:
common.deployment.sslcert=cert.p12
common.deployment.trustcert=trust.p12
common.deployment.keystorepassphrase=<password>
。ここで、<password>
は、cert.p12
のパスワードですcommon.deployment.truststorepassphrase=<password>
。ここで、<password>
は、trust.p12
のパスワードですcommon.local.sslcert=<PATH_TO>/cert.p12
common.local.trustcert=<PATH_TO>/trust.p12
これらのパラメータの詳細は、「インストール用のプロパティ・ファイルの準備」を参照してください。