8.2. HSM を使用したサブシステムのインストール
8.2.1. nCipher nShield HSM を使用したサブシステムのインストール
nCipher nShield HSM を使用するサブシステムインスタンスをインストールするには、以下の手順に従います。
特定のデプロイメントに対応するオーバーライドファイルを準備します。以下の
default`hms.txt
ファイルは、このような上書きファイルの例になります。注記このファイルは、nCipher HSM 上書き設定ファイルのサンプルとしてのみ提供されます。その他の多くの値は、デフォルトのハッシュアルゴリズムを含む上書きできます。また、
pkispawn
コマンドラインで指定されたサブシステムの呼び出しに応じて、[CA] セクション、[KRA] セクション、[OCSP] セクション、[TKS] セクション、または [TPS] セクションの 1 つだけが使用されます。例8.1 nCipher HSM で使用するオーバーライドファイルのサンプル
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Provide HSM parameters # Provide PKI-specific HSM token names # Provide PKI-specific passwords # Provide non-CA-specific passwords # ONLY required if specifying a non-default PKI instance name # ONLY required if specifying non-default PKI instance ports # ONLY required if specifying non-default 389 Directory Server ports # ONLY required if PKI is using a Security Domain on a remote system # ONLY required for PKI using an existing Security Domain # NOTE: pki_security_domain_password = pki_admin_password of CA Security Domain Instance ONLY required if specifying non-default PKI instance ports # Provide CA-specific HSM token names # ONLY required if 389 Directory Server for CA resides on a remote system # Provide KRA-specific HSM token names # ONLY required if 389 Directory Server for KRA resides on a remote system # Provide OCSP-specific HSM token names # ONLY required if 389 Directory Server for OCSP resides on a remote system # Provide TKS-specific HSM token names # ONLY required if 389 Directory Server for TKS resides on a remote system # Provide TPS-specific parameters # Provide TPS-specific HSM token names # ONLY required if 389 Directory Server for TPS resides on a remote system # ONLY required if TPS requires a CA on a remote machine # ONLY required if TPS requires a KRA # ONLY required if TPS requires a KRA on a remote machine # ONLY required if TPS requires a TKS on a remote machine #
############################################################################### ############################################################################### ############################################################################### ## ## ## EXAMPLE: Configuration File used to override ## ## '/usr/share/pki/server/etc/default.cfg' when using an nCipher ## ## Hardware Security Module (HSM): ## ## ## ## # modutil -dbdir . -list ## ## ## ## Listing of PKCS #11 Modules ## ## ----------------------------------------------------------- ## ## 1. NSS Internal PKCS #11 Module ## ## slots: 2 slots attached ## ## status: loaded ## ## ## ## slot: NSS Internal Cryptographic Services ## ## token: NSS Generic Crypto Services ## ## ## ## slot: NSS User Private Key and Certificate Services ## ## token: NSS Certificate DB ## ## ## ## 2. nfast ## ## library name: /opt/nfast/toolkits/pkcs11/libcknfast.so ## ## slots: 2 slots attached ## ## status: loaded ## ## ## ## slot: <serial_number> Rt1 ## ## token: accelerator ## ## ## ## slot: <serial_number> Rt1 slot 0 ## ## token: <HSM_token_name> ## ## ----------------------------------------------------------- ## ## ## ## ## ## Based on the example above, substitute all password values, ## ## as well as the following values: ## ## ## ## <hsm_libfile>=/opt/nfast/toolkits/pkcs11/libcknfast.so ## ## <hsm_modulename>=nfast ## ## <hsm_token_name>=NHSM6000 ## ## ## ############################################################################### ############################################################################### ############################################################################### [DEFAULT] ########################## # Provide HSM parameters # ########################## pki_hsm_enable=True pki_hsm_libfile=<hsm_libfile> pki_hsm_modulename=<hsm_modulename> pki_token_name=<hsm_token_name> pki_token_password=<pki_token_password> ######################################## # Provide PKI-specific HSM token names # ######################################## pki_audit_signing_token=<hsm_token_name> pki_ssl_server_token=<hsm_token_name> pki_subsystem_token=<hsm_token_name> ################################## # Provide PKI-specific passwords # ################################## pki_admin_password=<pki_admin_password> pki_client_pkcs12_password=<pki_client_pkcs12_password> pki_ds_password=<pki_ds_password> ##################################### # Provide non-CA-specific passwords # ##################################### pki_client_database_password=<pki_client_database_password> ############################################################### # ONLY required if specifying a non-default PKI instance name # ############################################################### #pki_instance_name=<pki_instance_name> ############################################################## # ONLY required if specifying non-default PKI instance ports # ############################################################## #pki_http_port=<pki_http_port> #pki_https_port=<pki_https_port> ###################################################################### # ONLY required if specifying non-default 389 Directory Server ports # ###################################################################### #pki_ds_ldap_port=<pki_ds_ldap_port> #pki_ds_ldaps_port=<pki_ds_ldaps_port> ###################################################################### # ONLY required if PKI is using a Security Domain on a remote system # ###################################################################### #pki_ca_hostname=<pki_ca_hostname> #pki_issuing_ca_hostname=<pki_issuing_ca_hostname> #pki_issuing_ca_https_port=<pki_issuing_ca_https_port> #pki_security_domain_hostname=<pki_security_domain_hostname> #pki_security_domain_https_port=<pki_security_domain_https_port> ########################################################### # ONLY required for PKI using an existing Security Domain # ########################################################### # NOTE: pki_security_domain_password = pki_admin_password # of CA Security Domain Instance #pki_security_domain_password=<pki_admin_password> [Tomcat] ############################################################## # ONLY required if specifying non-default PKI instance ports # ############################################################## #pki_ajp_port=<pki_ajp_port> #pki_tomcat_server_port=<pki_tomcat_server_port> [CA] ####################################### # Provide CA-specific HSM token names # ####################################### pki_ca_signing_token=<hsm_token_name> pki_ocsp_signing_token=<hsm_token_name> ########################################################################### # ONLY required if 389 Directory Server for CA resides on a remote system # ########################################################################### #pki_ds_hostname=<389 hostname> [KRA] ######################################## # Provide KRA-specific HSM token names # ######################################## pki_storage_token=<hsm_token_name> pki_transport_token=<hsm_token_name> ############################################################################ # ONLY required if 389 Directory Server for KRA resides on a remote system # ############################################################################ #pki_ds_hostname=<389 hostname> [OCSP] ######################################### # Provide OCSP-specific HSM token names # ######################################### pki_ocsp_signing_token=<hsm_token_name> ############################################################################# # ONLY required if 389 Directory Server for OCSP resides on a remote system # ############################################################################# #pki_ds_hostname=<389 hostname> [TKS] ######################################## # Provide TKS-specific HSM token names # ######################################## ############################################################################ # ONLY required if 389 Directory Server for TKS resides on a remote system # ############################################################################ #pki_ds_hostname=<389 hostname> [TPS] ################################### # Provide TPS-specific parameters # ################################### pki_authdb_basedn=<dnsdomainname where hostname.b.c.d is dc=b,dc=c,dc=d> ######################################## # Provide TPS-specific HSM token names # ######################################## ############################################################################ # ONLY required if 389 Directory Server for TPS resides on a remote system # ############################################################################ #pki_ds_hostname=<389 hostname> ########################################################## # ONLY required if TPS requires a CA on a remote machine # ########################################################## #pki_ca_uri=https://<pki_ca_hostname>:<pki_ca_https_port> ####################################### # ONLY required if TPS requires a KRA # ####################################### #pki_enable_server_side_keygen=True ########################################################### # ONLY required if TPS requires a KRA on a remote machine # ########################################################### #pki_kra_uri=https://<pki_kra_hostname>:<pki_kra_https_port> ########################################################### # ONLY required if TPS requires a TKS on a remote machine # ########################################################### #pki_tks_uri=https://<pki_tks_hostname>:<pki_tks_https_port>
「ツーステップインストール」に記載されているように、設定ファイルを使用します。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow pkispawn -s CA -f ./default_hsm.txt -vvv
# pkispawn -s CA -f ./default_hsm.txt -vvv
Copy to Clipboard Copied! Toggle word wrap Toggle overflow pkispawn -s KRA -f ./default_hsm.txt -vvv
# pkispawn -s KRA -f ./default_hsm.txt -vvv
Copy to Clipboard Copied! Toggle word wrap Toggle overflow pkispawn -s OCSP -f ./default_hsm.txt -vvv
# pkispawn -s OCSP -f ./default_hsm.txt -vvv
Copy to Clipboard Copied! Toggle word wrap Toggle overflow pkispawn -s TKS -f ./default_hsm.txt -vvv
# pkispawn -s TKS -f ./default_hsm.txt -vvv
Copy to Clipboard Copied! Toggle word wrap Toggle overflow pkispawn -s TPS -f ./default_hsm.txt -vvv
# pkispawn -s TPS -f ./default_hsm.txt -vvv
HSM に次の証明書が含まれていることを確認します。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow certutil -L -d /etc/pki/pki-tomcat/alias -h token -f token.pwd
$ certutil -L -d /etc/pki/pki-tomcat/alias -h token -f token.pwd Certificate Nickname Trust Attributes SSL,S/MIME,JAR/XPI token:ca_signing CTu,Cu,Cu token:ca_ocsp_signing u,u,u token:subsystem u,u,u token:ca_audit_signing u,u,Pu token:sslserver/pki.example.com u,u,u
8.2.2. Gemalto Safenet LunaSA HSM を使用したサブシステムのインストール
Gemalto Safenet LunaSA HSM を使用するサブシステムインスタンスをインストールするには、「nCipher nShield HSM を使用したサブシステムのインストール」 に記載されている手順に従ってください。オーバーライドファイルは、例8.1「nCipher HSM で使用するオーバーライドファイルのサンプル」 で提供されるサンプルと似ていますが、特定のデプロイメントに関連する値とは異なります。以下の例では、前述の nCipher 例で提供された [DEFAULT]、[Tomcat]、[CA]、[KRA]、[OCSP]、[TKS]、[TPS] の各セクションで使用される nCipher オーバーライドファイルのヘッダーの代わりに使用される LunaSA ヘッダーのサンプルを提供します。
例8.2 LunaSA オーバーライドファイルヘッダーの例
############################################################################### ############################################################################### ############################################################################### ## ## ## EXAMPLE: Configuration File used to override ## ## '/usr/share/pki/server/etc/default.cfg' when using a LunaSA ## ## Hardware Security Module (HSM): ## ## ## ## # modutil -dbdir . -list ## ## ## ## Listing of PKCS #11 Modules ## ## ----------------------------------------------------------- ## ## 1. NSS Internal PKCS #11 Module ## ## slots: 2 slots attached ## ## status: loaded ## ## ## ## slot: NSS Internal Cryptographic Services ## ## token: NSS Generic Crypto Services ## ## ## ## slot: NSS User Private Key and Certificate Services ## ## token: NSS Certificate DB ## ## ## ## 2. lunasa ## ## library name: /usr/safenet/lunaclient/lib/libCryptoki2_64.so ## ## slots: 4 slots attached ## ## status: loaded ## ## ## ## slot: LunaNet Slot ## ## token: dev-intca ## ## ## ## slot: Luna UHD Slot ## ## token: ## ## ## ## slot: Luna UHD Slot ## ## token: ## ## ## ## slot: Luna UHD Slot ## ## token: ## ## ----------------------------------------------------------- ## ## ## ## ## ## Based on the example above, substitute all password values, ## ## as well as the following values: ## ## ## ## <hsm_libfile>=/usr/safenet/lunaclient/lib/libCryptoki2_64.so ## ## <hsm_modulename>=lunasa ## ## <hsm_token_name>=dev-intca ## ## ## ############################################################################### ############################################################################### ###############################################################################
###############################################################################
###############################################################################
###############################################################################
## ##
## EXAMPLE: Configuration File used to override ##
## '/usr/share/pki/server/etc/default.cfg' when using a LunaSA ##
## Hardware Security Module (HSM): ##
## ##
## # modutil -dbdir . -list ##
## ##
## Listing of PKCS #11 Modules ##
## ----------------------------------------------------------- ##
## 1. NSS Internal PKCS #11 Module ##
## slots: 2 slots attached ##
## status: loaded ##
## ##
## slot: NSS Internal Cryptographic Services ##
## token: NSS Generic Crypto Services ##
## ##
## slot: NSS User Private Key and Certificate Services ##
## token: NSS Certificate DB ##
## ##
## 2. lunasa ##
## library name: /usr/safenet/lunaclient/lib/libCryptoki2_64.so ##
## slots: 4 slots attached ##
## status: loaded ##
## ##
## slot: LunaNet Slot ##
## token: dev-intca ##
## ##
## slot: Luna UHD Slot ##
## token: ##
## ##
## slot: Luna UHD Slot ##
## token: ##
## ##
## slot: Luna UHD Slot ##
## token: ##
## ----------------------------------------------------------- ##
## ##
## ##
## Based on the example above, substitute all password values, ##
## as well as the following values: ##
## ##
## <hsm_libfile>=/usr/safenet/lunaclient/lib/libCryptoki2_64.so ##
## <hsm_modulename>=lunasa ##
## <hsm_token_name>=dev-intca ##
## ##
###############################################################################
###############################################################################
###############################################################################