4.2.8.1 証明書を生成するためのサード・パーティCAの使用

次のステップは、証明書の生成にサード・パーティの認証局(CA)を使用する方法を示しています:

  1. 管理コンテナのインストールを実行するノードで、ディレクトリを作成し、そのフォルダに移動します。次に例を示します:
    mkdir <workdir>/oaa_ssl
    export WORKDIR=<workdir>
    cd $WORKDIR/oaa_ssl
  2. サーバー証明書の4096ビット秘密キー(oaa.key) を生成します:
    openssl genrsa -out oaa.key 4096
  3. 証明書署名リクエスト(oaa.csr)を作成します:
    openssl req -new -key oaa.key -out oaa.csr
    求められた場合は、証明書署名リクエスト(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 []:
  4. CSR (oaa.csr)をサード・パーティCAに送信します。
  5. CAから証明書を受信したら、ファイルの名前をoaa.pemに変更し、それを$WORKDIR/oaa_sslディレクトリにコピーします。

    ノート:

    証明書oaa.PEMはPEM形式である必要があります。PEM形式でない場合は、opensslを使用してPEMに変換します。たとえば、DER形式からPEMに変換するには:
    openssl x509 -inform der -in oaa.der -out oaa.pem
  6. 信頼ルートCA証明書(rootca.pem)と、oaa.pemに署名したチェーン内の他のCA証明書(rootca1.pemrootca2.pemなど)を、$WORKDIR/oaa_sslディレクトリにコピーします。前述のとおり、CA証明書はPEM形式である必要があるため、必要に応じて変換します。
  7. CAのチェーンに複数の証明書がある場合は、すべてのCA証明書を含むbundle.pemを作成します:
    cat rootca.pem rootca1.pem rootca2.pem >>bundle.pem
  8. 次のように、信頼証明書PKCS12ファイル(trust.p12)をファイルから作成します:
    openssl pkcs12 -export -out trust.p12 -nokeys -in bundle.pem
    求められた場合は、エクスポート・パスワードを入力して確認します。

    ノート:

    管理者は、次のことに注意する必要があります:
    • エクスポート・パスワードの設定は必須です。
    • CAに証明書チェーンがない場合は、bundle.pemrootca.pemに置き換えます。
  9. 次のように、サーバー証明書PKCS12ファイル(cert.p12)を作成します:
    openssl pkcs12 -export -out cert.p12 -inkey oaa.key -in oaa.pem -chain -CAfile bundle.pem
    求められた場合は、エクスポート・パスワードを入力して確認します。

    ノート:

    管理者は、次のことに注意する必要があります:
    • エクスポート・パスワードの設定は必須です。
    • CAに証明書チェーンがない場合は、bundle.pemrootca.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

これらのパラメータの詳細は、「インストール用のプロパティ・ファイルの準備」を参照してください。