7.10. TKS インスタンスの作成と設定
このセクションでは、SubCA に対する TKS インスタンスのインストールと設定を説明します。
TKS システム証明書は SubCA によって発行され、TKS は SubCA セキュリティードメインに参加します。
この例では、TKS は rhcs10.example.com にインストールされ、その内部ディレクトリーサーバーは rhds11.example.com にあります。
/opt/pki_rsa/ca-chain.pem
ファイルに完全な CA 証明書チェーン (SubCA 証明書と RootCA 証明書) が含まれていることを確認します。
ls -l /opt/pki_rsa/ca-chain.pem cat /opt/pki_rsa/ca-chain.pem
# ls -l /opt/pki_rsa/ca-chain.pem
# cat /opt/pki_rsa/ca-chain.pem
7.10.1. 一時 DS 証明書を置き換える (TKS)
TKS をインストールする前に、TKS の Directory Server の公式 SSL サーバー証明書を発行します。これは一時的なブートストラップ証明書を置き換えるためのものです。そのためには、まず Directory Server 証明書の証明書署名要求 (CSR) を作成し、次にこの要求を CA に送信します。
必ず DS サーバーの FQDN (例: cn=rhds11.example.com
/ host=rhds11.example.com
) を使用してください。
実際の DS 証明書の CSR を生成する
rhds11.example.com で、実際の DS 証明書の PKCS10 証明書署名要求を生成します。
DS を停止します。
dsctl slapd-CC-RSA-TKS-LDAP stop
# dsctl slapd-CC-RSA-TKS-LDAP stop
Copy to Clipboard Copied! certutil
ツールを使用して CSR を生成します。certutil -R -d /etc/dirsrv/slapd-CC-RSA-TKS-LDAP -s "CN=rhds11.example.com" -g 2048 -f /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/pwdfile.txt -a -o /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/Server-Cert-tks.csr -z /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/noise.txt
# certutil -R -d /etc/dirsrv/slapd-CC-RSA-TKS-LDAP -s "CN=rhds11.example.com" -g 2048 -f /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/pwdfile.txt -a -o /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/Server-Cert-tks.csr -z /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/noise.txt
Copy to Clipboard Copied! 重要上記で取得した
Server-Cert-tks.csr
出力ファイルを編集して、"Begin Certificate Request" の前の数行を削除します。以下に例を示します。
vi /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/Server-Cert-tks.csr
# vi /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/Server-Cert-tks.csr
Copy to Clipboard Copied! CSR ファイルは、"-----BEGIN CERTIFICATE REQUEST-----" の行で始まり、"-----END CERTIFICATE REQUEST-----" の行で終わる必要があります。
Server-Cert-tks.csr
ファイルを CA が存在するシステムにリモートコピーします。以下に例を示します。scp /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/Server-Cert-tks.csr root@rhcs10.example.com:/root/.dogtag/pki_rsa_bootstrap/certs_db/Server-Cert-tks.csr
# scp /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/Server-Cert-tks.csr root@rhcs10.example.com:/root/.dogtag/pki_rsa_bootstrap/certs_db/Server-Cert-tks.csr
Copy to Clipboard Copied!
実際の DS 証明書を発行する
rhcs10.example.com で、実際の SSL サーバー証明書を発行します。
CMC 要求を生成します。
CMCRequest
設定ファイルを作成します。以下に例を示します。vim /root/.dogtag/pki_rsa_bootstrap/certs_db/cmc.dirsrv-tks_pkcs10.cfg
# vim /root/.dogtag/pki_rsa_bootstrap/certs_db/cmc.dirsrv-tks_pkcs10.cfg
Copy to Clipboard Copied! ### numRequests: Total number of PKCS10 requests or CRMF requests. numRequests=1 ### input: full path for the PKCS10 request or CRMF request, ### The content must be in Base-64 encoded format. ### Multiple files are supported. They must be separated by a space. ### For input on a different host, specify where to find the CSR. input=/root/.dogtag/pki_rsa_bootstrap/certs_db/Server-Cert-tks.csr ### output: full path for the CMC request in binary format ### For output on a different host, specify the destination. output=/root/.dogtag/pki_rsa_bootstrap/certs_db/cmc.dirsrv-tks_pkcs10.req ### tokenname: name of the token where the agent signing cert can be found (default is internal) tokenname=internal ### nickname: nickname for the agent certificate that will be used to sign the CMC full request. nickname=PKI Bootstrap Administrator for RSA-SubCA ### dbdir: directory for cert8.db, key3.db and secmod.db dbdir=/root/.dogtag/pki_rsa_bootstrap/certs_db ### password: password for cert8.db that stores the agent certificate password=SECret.123 ### format: request format, either pkcs10 or crmf format=pkcs10
### numRequests: Total number of PKCS10 requests or CRMF requests. numRequests=1 ### input: full path for the PKCS10 request or CRMF request, ### The content must be in Base-64 encoded format. ### Multiple files are supported. They must be separated by a space. ### For input on a different host, specify where to find the CSR. input=/root/.dogtag/pki_rsa_bootstrap/certs_db/Server-Cert-tks.csr ### output: full path for the CMC request in binary format ### For output on a different host, specify the destination. output=/root/.dogtag/pki_rsa_bootstrap/certs_db/cmc.dirsrv-tks_pkcs10.req ### tokenname: name of the token where the agent signing cert can be found (default is internal) tokenname=internal ### nickname: nickname for the agent certificate that will be used to sign the CMC full request. nickname=PKI Bootstrap Administrator for RSA-SubCA ### dbdir: directory for cert8.db, key3.db and secmod.db dbdir=/root/.dogtag/pki_rsa_bootstrap/certs_db ### password: password for cert8.db that stores the agent certificate password=SECret.123 ### format: request format, either pkcs10 or crmf format=pkcs10
Copy to Clipboard Copied! CMCRequest
コマンドを使用してリクエストを生成します。CMCRequest /root/.dogtag/pki_rsa_bootstrap/certs_db/cmc.dirsrv-tks_pkcs10.cfg
# CMCRequest /root/.dogtag/pki_rsa_bootstrap/certs_db/cmc.dirsrv-tks_pkcs10.cfg cert/key prefix = path = /root/.dogtag/pki_rsa_bootstrap/certs_db CryptoManger initialized token internal logged in... got signerCert: PKI Bootstrap Administrator for RSA-SubCA createPKIData: begins k=0 createPKIData: format: pkcs10 useSharedSecret is false... signData: begins: getPrivateKey: got signing cert signData: got signer privKey createSignedData: begins getSigningAlgFromPrivate: begins. getSigningAlgFromPrivate: found signingKeyType=RSA getSigningAlgFromPrivate: using SignatureAlgorithm: RSASignatureWithSHA256Digest createSignedData: digest created for pkidata createSignedData: digest algorithm =RSASignatureWithSHA256Digest createSignedData: building cert chain signData: signed request generated. getCMCBlob: begins getCMCBlob: generating signed data The CMC enrollment request in base-64 encoded format: . . . Output omitted . . . The CMC enrollment request in binary format is stored in /root/.dogtag/pki_rsa_bootstrap/certs_db/cmc.dirsrv-tks_pkcs10.req
Copy to Clipboard Copied!
CMC 要求を送信します。
HttpClient
設定ファイルを作成します。以下に例を示します。vim /root/.dogtag/pki_rsa_bootstrap/certs_db/HttpClient_dirsrv-tks.cfg
# vim /root/.dogtag/pki_rsa_bootstrap/certs_db/HttpClient_dirsrv-tks.cfg
Copy to Clipboard Copied! ### host: host name for the http server host=rhcs10.example.com ### port: port number port=31443 ### secure: true for secure connection, false for nonsecure connection secure=true ### input: full path for the enrollment request, the content must be in binary format input=/root/.dogtag/pki_rsa_bootstrap/certs_db/cmc.dirsrv-tks_pkcs10.req ### output: full path for the response in binary format output=/root/.dogtag/pki_rsa_bootstrap/certs_db/cmc.dirsrv-tks_pkcs10.resp ### tokenname: name of the token where the SSL client authentication cert can be found (default is internal) ### This parameter will be ignored if secure=false tokenname=internal ### dbdir: directory for cert8.db, key3.db and secmod.db ### This parameter will be ignored if secure=false dbdir=/root/.dogtag/pki_rsa_bootstrap/certs_db ### clientmode: true for client authentication, false for no client authentication ### This parameter will be ignored if secure=false clientmode=true ### password: password for cert8.db ### This parameter will be ignored if secure=false and clientauth=false password=SECret.123 ### nickname: nickname for client certificate ### This parameter will be ignored if clientmode=false nickname=PKI Bootstrap Administrator for RSA-SubCA ### servlet: servlet name servlet=/ca/ee/ca/profileSubmitCMCFull?profileId=caCMCserverCert
### host: host name for the http server host=rhcs10.example.com ### port: port number port=31443 ### secure: true for secure connection, false for nonsecure connection secure=true ### input: full path for the enrollment request, the content must be in binary format input=/root/.dogtag/pki_rsa_bootstrap/certs_db/cmc.dirsrv-tks_pkcs10.req ### output: full path for the response in binary format output=/root/.dogtag/pki_rsa_bootstrap/certs_db/cmc.dirsrv-tks_pkcs10.resp ### tokenname: name of the token where the SSL client authentication cert can be found (default is internal) ### This parameter will be ignored if secure=false tokenname=internal ### dbdir: directory for cert8.db, key3.db and secmod.db ### This parameter will be ignored if secure=false dbdir=/root/.dogtag/pki_rsa_bootstrap/certs_db ### clientmode: true for client authentication, false for no client authentication ### This parameter will be ignored if secure=false clientmode=true ### password: password for cert8.db ### This parameter will be ignored if secure=false and clientauth=false password=SECret.123 ### nickname: nickname for client certificate ### This parameter will be ignored if clientmode=false nickname=PKI Bootstrap Administrator for RSA-SubCA ### servlet: servlet name servlet=/ca/ee/ca/profileSubmitCMCFull?profileId=caCMCserverCert
Copy to Clipboard Copied! HttpClient
コマンドを使用して要求を送信します。HttpClient /root/.dogtag/pki_rsa_bootstrap/certs_db/HttpClient_dirsrv-tks.cfg
# HttpClient /root/.dogtag/pki_rsa_bootstrap/certs_db/HttpClient_dirsrv-tks.cfg Total number of bytes read = 3096 after SSLSocket created, thread token is NSS FIPS 140-2 User Private Key client cert is not null handshake happened writing to socket ##Response Headers begin## HTTP/1.1 200 Content-Type: application/pkcs7-mime Content-Length: 2492 Date: Tue, 29 Sep 2020 15:20:21 GMT Connection: close ##end## . . . Output omitted . . . The response in binary format is stored in /root/.dogtag/pki_rsa_bootstrap/certs_db/cmc.dirsrv-tks_pkcs10.resp
Copy to Clipboard Copied!
CMC 応答を処理します。
CMCResponse
を使用して応答を処理し、チェーン内のすべての証明書を PEM 形式で個別に表示します。重要"-v" オプションを指定して CMCResponse を実行すると、チェーン内の各証明書の PEM が Cert:0、Cert:1 などとして返されます。この出力では、すべての PEM の下に、チェーン内の各証明書も整った出力形式で表示されます。証明書は決まった順序で表示されないため、チェーン内での位置を確認するには、各 "Certificate" の下にある "Subject:" を確認する必要があります。対応する PEM が上と同じ位置に表示されます。
CMCResponse -d /root/.dogtag/pki_rsa_bootstrap/certs_db -i /root/.dogtag/pki_rsa_bootstrap/certs_db/cmc.dirsrv-tks_pkcs10.resp -v
# CMCResponse -d /root/.dogtag/pki_rsa_bootstrap/certs_db -i /root/.dogtag/pki_rsa_bootstrap/certs_db/cmc.dirsrv-tks_pkcs10.resp -v Cert:0 ... === Cert:1 ... === Cert:2 ... === Certificates: Certificate: Data: Version: v3 Serial Number: 0xA383694 Signature Algorithm: SHA256withRSA - 1.2.840.113549.1.1.11 Issuer: CN=CA Signing Certificate,OU=rhcs10-RSA-TKS,O=Example-rhcs10-RSA-TKS Validity: Not Before: Tuesday, April 5, 2022 8:41:36 AM EDT America/New_York Not After: Monday, March 25, 2024 8:41:36 AM EDT America/New_York Subject: CN=rhds11.example.com . . . Output omitted . . . Certificate: Data: Version: v3 Serial Number: 0x5C8FAD4 Signature Algorithm: SHA256withRSA - 1.2.840.113549.1.1.11 Issuer: CN=CA Signing Certificate,OU=rhcs10-RSA-RootCA,O=Example-rhcs10-RSA-RootCA Validity: Not Before: Tuesday, April 5, 2022 8:36:21 AM EDT America/New_York Not After: Saturday, April 5, 2042 8:36:21 AM EDT America/New_York Subject: CN=CA Signing Certificate,OU=rhcs10-RSA-RootCA,O=Example-rhcs10-RSA-RootCA . . . Output omitted . . . Certificate: Data: Version: v3 Serial Number: 0x80296C3 Signature Algorithm: SHA256withRSA - 1.2.840.113549.1.1.11 Issuer: CN=CA Signing Certificate,OU=rhcs10-RSA-RootCA,O=Example-rhcs10-RSA-TKS Validity: Not Before: Tuesday, April 5, 2022 8:39:43 AM EDT America/New_York Not After: Friday, April 5, 2041 8:39:43 AM EDT America/New_York Subject: CN=CA Signing Certificate,OU=rhcs10-RSA-TKS,O=Example-rhcs10-RSA-RootCA . . . Output omitted . . . Number of controls is 1 Control #0: CMCStatusInfoV2 OID: {1 3 6 1 5 5 7 7 25} BodyList: 1 Status: SUCCESS CMC Full Response.
Copy to Clipboard Copied! 新しい
Server-Cert
DS 証明書を、適切な名前でブートストラップ証明書ディレクトリー (例:/root/.dogtag/pki_rsa_bootstrap/certs_db/
) 内のファイルに保存します。.pem
ファイルは、ヘッダー-----BEGIN CERTIFICATE-----
で開始し、フッター-----END CERTIFICATE-----
で終了する必要があります。以下に例を示します。vi /root/.dogtag/pki_rsa_bootstrap/certs_db/Server-Cert-tks.pem
# vi /root/.dogtag/pki_rsa_bootstrap/certs_db/Server-Cert-tks.pem
Copy to Clipboard Copied! この場合の
Server-Cert-tks.pem
は、TKS の内部データベースとして機能する Directory Server インスタンスの新しいServer-Cert
証明書です。注記RootCA の署名証明書は、次のコマンドからの出力と一致する必要があります。
certutil -L -d /var/lib/pki/rhcs10-RSA-RootCA/alias/ -n "CA Signing Cert - rhcs10-RSA-RootCA" -a
# certutil -L -d /var/lib/pki/rhcs10-RSA-RootCA/alias/ -n "CA Signing Cert - rhcs10-RSA-RootCA" -a
Copy to Clipboard Copied!
新しい
Server-Cert
証明書を rhds11.example.com にリモートコピーします。以下に例を示します。scp /root/.dogtag/pki_rsa_bootstrap/certs_db/Server-Cert-tks.pem root@rhds11.example.com:/etc/dirsrv/slapd-CC-RSA-TKS-LDAP/
# scp /root/.dogtag/pki_rsa_bootstrap/certs_db/Server-Cert-tks.pem root@rhds11.example.com:/etc/dirsrv/slapd-CC-RSA-TKS-LDAP/
Copy to Clipboard Copied!
一時 DS 証明書を置き換える
rhds11.example.com で、一時的な DS 証明書を実際の DS 証明書に置き換えます。
dirsrv
ディレクトリーの内容をバックアップディレクトリーに保存します。cp -r /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/ /etc/dirsrv/save-rsa/slapd-CC-RSA-TKS-LDAP/
# cp -r /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/ /etc/dirsrv/save-rsa/slapd-CC-RSA-TKS-LDAP/
Copy to Clipboard Copied! 古い DS 証明書を削除します。
certutil -D -d /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/ -f /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/pwdfile.txt -n "Server-Cert"
# certutil -D -d /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/ -f /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/pwdfile.txt -n "Server-Cert"
Copy to Clipboard Copied! certutil -D -d /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/ -f /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/pwdfile.txt -n "Self-Signed-CA"
# certutil -D -d /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/ -f /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/pwdfile.txt -n "Self-Signed-CA"
Copy to Clipboard Copied! 新しく作成した DS 証明書とそのチェーン内の CA 証明書を 1 つずつインポートします。以下に例を示します。
certutil -d /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/ -f /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/pwdfile.txt -A -t "CT,C,C" -n "CA Signing Cert - rhcs10-RSA-RootCA" -i /opt/pki_rsa/rootCA.pem
# certutil -d /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/ -f /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/pwdfile.txt -A -t "CT,C,C" -n "CA Signing Cert - rhcs10-RSA-RootCA" -i /opt/pki_rsa/rootCA.pem
Copy to Clipboard Copied! certutil -d /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/ -f /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/pwdfile.txt -A -t "CT,C,C" -n "CA Signing Cert - rhcs10-RSA-SubCA" -i /opt/pki_rsa/subCA.pem
# certutil -d /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/ -f /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/pwdfile.txt -A -t "CT,C,C" -n "CA Signing Cert - rhcs10-RSA-SubCA" -i /opt/pki_rsa/subCA.pem
Copy to Clipboard Copied! certutil -d /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/ -f /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/pwdfile.txt -A -t "u,u,u" -n "Server-Cert" -i /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/Server-Cert-tks.pem
# certutil -d /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/ -f /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/pwdfile.txt -A -t "u,u,u" -n "Server-Cert" -i /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/Server-Cert-tks.pem
Copy to Clipboard Copied! 証明書をリスト表示します。
certutil -L -d /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/
# certutil -L -d /etc/dirsrv/slapd-CC-RSA-TKS-LDAP/ Certificate Nickname Trust Attributes SSL,S/MIME,JAR/XPI CA Signing Cert - rhcs10-RSA-RootCA CT,C,C CA Signing Cert - rhcs10-RSA-SubCA CT,C,C Server-Cert u,u,u
Copy to Clipboard Copied! DS を起動します。
dsctl slapd-CC-RSA-TKS-LDAP start
# dsctl slapd-CC-RSA-TKS-LDAP start
Copy to Clipboard Copied! LDAP サーバーが稼働していることをテストして確認します (別のシステムの場合は、CA ホストでもテストします)。
ldapsearch -x -D "cn=Directory Manager" -H ldaps://rhds11.example.com:16636 -b "dc=example,dc=com" -w SECret.123
# ldapsearch -x -D "cn=Directory Manager" -H ldaps://rhds11.example.com:16636 -b "dc=example,dc=com" -w SECret.123
Copy to Clipboard Copied! 別のシステムでテストする場合は、次のように CA 証明書チェーンを
ldapsearch
コマンドの前に追加します。LDAPTLS_CACERT=/opt/pki_rsa/ca-chain.pem ldapsearch -x -D "cn=Directory Manager" -H ldaps://rhds11.example.com:16636 -b "dc=example,dc=com" -w SECret.123
# LDAPTLS_CACERT=/opt/pki_rsa/ca-chain.pem ldapsearch -x -D "cn=Directory Manager" -H ldaps://rhds11.example.com:16636 -b "dc=example,dc=com" -w SECret.123
Copy to Clipboard Copied!
7.10.2. TKS インスタンスをインストールする
TKS をインストールするには、シングルステップメソッドまたはツーステップメソッドの いずれか 1 つ を使用します。次の手順では、シングルステップ方式を説明します。ツーステップ方式を使用してインストールする場合は、] および xref:_rootca_two_step[ を参照してください。
AIA 拡張が CA の内部 OCSP ではなく外部 OCSP インスタンスを指すようにする場合は、TKS をインストールする前に 「この OCSP を指すようにデフォルトの AIA 拡張機能を設定します」 の手順に従ってください。
前提条件
- root ユーザーとして rhcs10.example.com にログインしている。
- 「TKS 用 DS インスタンスのインストール」 を完了した。この例では、CC-RSA-TKS-LDAP が TKS の内部データベースです。
手順
選択した場所 (例:
/root/pki_rsa
) に TKS インストールファイルを作成します。cd /root/pki_rsa
# cd /root/pki_rsa
Copy to Clipboard Copied! vi tks_inst.cfg
# vi tks_inst.cfg
Copy to Clipboard Copied! 注記明示的に指定されていない限り、システム証明書のニックネームは、
pki_instance_name
に指定された値を使用して自動的に名前が付けられます。共有 HSM での証明書のニックネームの競合を回避するには、インスタンスを作成するたびに一意のインスタンス名を使用します。
以下のインストールファイルでは、例となる値を指定しています。HSM パスワードの変更に加えて、たとえばポート、ディレクトリー、ニックネーム、ドメインなどの値を適宜変更します。
[DEFAULT] pki_instance_name=rhcs10-RSA-TKS pki_https_port=24443 pki_http_port=24080 ### Crypto Token pki_hsm_enable=True pki_hsm_libfile=/opt/nfast/toolkits/pkcs11/libcknfast.so pki_hsm_modulename=nfast pki_token_name=NHSM-CONN-XC pki_token_password=<YourHSMpassword> pki_audit_signing_token=NHSM-CONN-XC pki_audit_signing_key_algorithm=SHA256withRSA pki_audit_signing_key_size=2048 pki_audit_signing_key_type=rsa pki_audit_signing_signing_algorithm=SHA256withRSA pki_subsystem_token=NHSM-CONN-XC pki_subsystem_key_algorithm=SHA256withRSA pki_subsystem_signing_algorithm=SHA256withRSA pki_subsystem_key_size=2048 pki_subsystem_key_type=rsa pki_sslserver_token=NHSM-CONN-XC pki_sslserver_key_algorithm=SHA256withRSA pki_sslserver_signing_algorithm=SHA256withRSA pki_sslserver_key_size=2048 pki_sslserver_key_type=rsa ### CA cert chain concatenated in PEM format pki_cert_chain_path=/opt/pki_rsa/ca-chain.pem ### Bootstrap Admin pki_admin_password=SECret.123 pki_admin_key_type=rsa pki_admin_key_size=2048 pki_admin_key_algorithm=SHA256withRSA ### Bootstrap Admin client dir pki_client_admin_cert_p12=/opt/pki_rsa/rhcs10-RSA-TKS/tks_admin_cert.p12 pki_client_database_dir=/opt/pki_rsa/rhcs10-RSA-TKS/certs_db pki_client_database_password=SECret.123 pki_client_database_purge=False pki_client_dir=/opt/pki_rsa/rhcs10-RSA-TKS pki_client_pkcs12_password=SECret.123 ### Internal LDAP pki_ds_bind_dn=cn=Directory Manager pki_ds_ldap_port=16389 pki_ds_ldaps_port=16636 pki_ds_password=SECret.123 pki_ds_remove_data=True pki_ds_secure_connection=True pki_ds_secure_connection_ca_pem_file=/opt/pki_rsa/ca-chain.pem pki_ds_secure_connection_ca_nickname=CA Signing Cert - rhcs10-RSA-SubCA ### Security Domain pki_security_domain_hostname=rhcs10.example.com pki_security_domain_https_port=31443 pki_security_domain_password=SECret.123 pki_security_domain_user=caadmin [Tomcat] pki_ajp_port=14009 pki_tomcat_server_port=14005 [TKS] pki_import_admin_cert=False pki_admin_nickname=PKI Bootstrap Administrator for RSA-TKS pki_admin_name=tksadmin pki_admin_uid=tksadmin pki_admin_email=tksadmin@example.com pki_ds_hostname=rhds11.example.com pki_ds_base_dn=dc=RSA-TKS pki_ds_database=CC-RSA-TKS-LDAP pki_share_db=False
[DEFAULT] pki_instance_name=rhcs10-RSA-TKS pki_https_port=24443 pki_http_port=24080 ### Crypto Token pki_hsm_enable=True pki_hsm_libfile=/opt/nfast/toolkits/pkcs11/libcknfast.so pki_hsm_modulename=nfast pki_token_name=NHSM-CONN-XC pki_token_password=<YourHSMpassword> pki_audit_signing_token=NHSM-CONN-XC pki_audit_signing_key_algorithm=SHA256withRSA pki_audit_signing_key_size=2048 pki_audit_signing_key_type=rsa pki_audit_signing_signing_algorithm=SHA256withRSA pki_subsystem_token=NHSM-CONN-XC pki_subsystem_key_algorithm=SHA256withRSA pki_subsystem_signing_algorithm=SHA256withRSA pki_subsystem_key_size=2048 pki_subsystem_key_type=rsa pki_sslserver_token=NHSM-CONN-XC pki_sslserver_key_algorithm=SHA256withRSA pki_sslserver_signing_algorithm=SHA256withRSA pki_sslserver_key_size=2048 pki_sslserver_key_type=rsa ### CA cert chain concatenated in PEM format pki_cert_chain_path=/opt/pki_rsa/ca-chain.pem ### Bootstrap Admin pki_admin_password=SECret.123 pki_admin_key_type=rsa pki_admin_key_size=2048 pki_admin_key_algorithm=SHA256withRSA ### Bootstrap Admin client dir pki_client_admin_cert_p12=/opt/pki_rsa/rhcs10-RSA-TKS/tks_admin_cert.p12 pki_client_database_dir=/opt/pki_rsa/rhcs10-RSA-TKS/certs_db pki_client_database_password=SECret.123 pki_client_database_purge=False pki_client_dir=/opt/pki_rsa/rhcs10-RSA-TKS pki_client_pkcs12_password=SECret.123 ### Internal LDAP pki_ds_bind_dn=cn=Directory Manager pki_ds_ldap_port=16389 pki_ds_ldaps_port=16636 pki_ds_password=SECret.123 pki_ds_remove_data=True pki_ds_secure_connection=True pki_ds_secure_connection_ca_pem_file=/opt/pki_rsa/ca-chain.pem pki_ds_secure_connection_ca_nickname=CA Signing Cert - rhcs10-RSA-SubCA ### Security Domain pki_security_domain_hostname=rhcs10.example.com pki_security_domain_https_port=31443 pki_security_domain_password=SECret.123 pki_security_domain_user=caadmin [Tomcat] pki_ajp_port=14009 pki_tomcat_server_port=14005 [TKS] pki_import_admin_cert=False pki_admin_nickname=PKI Bootstrap Administrator for RSA-TKS pki_admin_name=tksadmin pki_admin_uid=tksadmin pki_admin_email=tksadmin@example.com pki_ds_hostname=rhds11.example.com pki_ds_base_dn=dc=RSA-TKS pki_ds_database=CC-RSA-TKS-LDAP pki_share_db=False
Copy to Clipboard Copied! pkispawn
ツールを実行して、TKS サブシステムをインストールします。pkispawn -s TKS -f tks_inst.cfg --debug
# pkispawn -s TKS -f tks_inst.cfg --debug
Copy to Clipboard Copied! これにより、TKS インスタンスが
/var/lib/pki/rhcs10-RSA-TKS
に作成されます。
この TKS をツーステップ方法を使用してインストールする場合は以下を実行します。
まず、
--skip-configuration
オプションを指定してpkispawn
ツールを実行し、RHCS TKS インスタンスをインストールします。pkispawn -s TKS -f tks_inst.cfg --skip-configuration --debug
# pkispawn -s TKS -f tks_inst.cfg --skip-configuration --debug
Copy to Clipboard Copied! - 2 つのインストールステップの間に設定ファイルをカスタマイズします。
KRA を設定するには、
pkispawn
ツールを実行します。pkispawn -s TKS -f tks_inst.cfg --skip-installation --debug
# pkispawn -s TKS -f tks_inst.cfg --skip-installation --debug
Copy to Clipboard Copied!
検証
インストールされている TKS インスタンスのステータスを表示します。
pki-server status rhcs10-RSA-TKS
# pki-server status rhcs10-RSA-TKS
Copy to Clipboard Copied! Secure Agent、Admin、および pkiconsole の URL を書き留めます。
7.10.3. TKS の OAEP サポートを設定する
OAEP (Optimal Asymmetric Encryption Padding) キー転送アルゴリズムを使用するように TKS を設定するには、TKS の CS.cfg
設定ファイルを編集します。
このセクションは、ファームウェア v12.72.1 を備えた Entrust nShield Connect XC ユニットなど、AES キーのラッピング/アンラッピングをサポートする HSM を対象としています。
前提条件
- root ユーザーとして rhcs10.example.com にログインしている。
手順
TKS を停止します。
pki-server stop rhcs10-RSA-TKS
# pki-server stop rhcs10-RSA-TKS
Copy to Clipboard Copied! -
/var/lib/pki/rhcs10-RSA-TKS/tks/conf/CS.cfg
設定ファイルを編集し、次の行を追加します。
keyWrap.useOAEP=true
TKS を起動します。
pki-server start rhcs10-RSA-TKS
# pki-server start rhcs10-RSA-TKS
Copy to Clipboard Copied!
7.10.4. TKS ロールユーザーの作成
- 「PKI ロールユーザーの作成」 の手順を実行して、TKS で単一ロールの管理者、エージェント、監査ユーザーを作成します。
7.10.5. インストール後の設定
追加の RHCS インスタンスをインストールする場合は、次のセクションに進んでください。必要なすべての RHCS インスタンスのインストールが完了したら、「インストール後の設定」 にアクセスして追加セットアップを完了します。