在 ONTAP 中產生並安裝 CA 簽署的伺服器憑證
在正式作業系統上,安裝 CA 簽署的數位憑證是驗證叢集或 SVM 作為 SSL 伺服器的最佳實務做法。您可以使用 security certificate generate-csr`命令來產生憑證簽署要求 (CSR),並使用 `security certificate install`命令來安裝從憑證授權單位收到的憑證。請在"指令參考資料ONTAP"中深入瞭解 `security certificate generate-csr`和 `security certificate install。
產生憑證簽署要求
您可以使用 security certificate generate-csr 產生憑證簽署要求( CSR )的命令。在處理您的要求之後、憑證授權單位(CA)會傳送簽署的數位憑證給您。
您必須是叢集或SVM管理員、才能執行此工作。
-
產生CSR:
security certificate generate-csr -common-name FQDN_or_common_name -size 512|1024|1536|2048 -country country -state state -locality locality -organization organization -unit unit -email-addr email_of_contact -hash-function SHA1|SHA256|MD5下列命令會建立一個 CSR,其中包含由
SHA256`雜湊功能所產生的 2048 位元私密金鑰。此 CSR 供位於美國加州 Sunnyvale 的某家公司 `IT`部門中的 `Software`群組使用。該公司的自訂一般名稱為 `server1.companyname.com。SVM 聯絡系統管理員的電子郵件地址為web@example.com。系統會在輸出中顯示 CSR 和私密金鑰。建立 CSR 的範例
cluster1::>security certificate generate-csr -common-name server1.companyname.com -size 2048 -country US -state California -locality Sunnyvale -organization IT -unit Software -email-addr web@example.com -hash-function SHA256 Certificate Signing Request : -----BEGIN CERTIFICATE REQUEST----- <certificate_value> -----END CERTIFICATE REQUEST----- Private Key : -----BEGIN RSA PRIVATE KEY----- <key_value> -----END RSA PRIVATE KEY----- NOTE: Keep a copy of your certificate request and private key for future reference.
-
從CSR輸出複製憑證要求、然後以電子形式(例如電子郵件)將其傳送至信任的協力廠商CA進行簽署。
憑證授權單位必須以 base64 編碼的 PEM 或 PKCS12 格式傳回已簽署的憑證。 在處理您的要求之後、CA會將簽署的數位憑證傳送給您。您應該保留一份私密金鑰和CA簽署的數位憑證複本。
安裝CA簽署的伺服器憑證
您可以使用 `security certificate install`命令在 SVM 上安裝 CA 簽署的伺服器憑證。系統會提示您輸入憑證授權單位(CA)根憑證和中繼憑證、以構成伺服器憑證的憑證鏈結。ONTAP如"指令參考資料ONTAP"需詳細 `security certificate install`資訊,請參閱。
您必須是叢集或SVM管理員、才能執行此工作。
-
安裝 CA 簽署的伺服器憑證:
security certificate install -vserver SVM_name -type certificate_typeONTAP 會提示您輸入構成伺服器憑證鏈的 CA 根目錄憑證和中間憑證。此憑證鏈從核發伺服器憑證的 CA 憑證開始,一直延伸到該 CA 的根目錄憑證。缺少中間憑證會導致伺服器憑證安裝失敗。
以下命令可在 SVM 上安裝 CA 簽署的伺服器憑證和中繼憑證
engData2。安裝 CA 簽署的伺服器憑證和中間憑證的範例
cluster1::>security certificate install -vserver engData2 -type server Please enter Certificate: Press <Enter> when done -----BEGIN CERTIFICATE----- <certificate_value> -----END CERTIFICATE----- Please enter Private Key: Press <Enter> when done -----BEGIN RSA PRIVATE KEY----- <key_value> -----END RSA PRIVATE KEY----- Do you want to continue entering root and/or intermediate certificates {y|n}: y Please enter Intermediate Certificate: Press <Enter> when done -----BEGIN CERTIFICATE----- <certificate_value> -----END CERTIFICATE----- Do you want to continue entering root and/or intermediate certificates {y|n}: y Please enter Intermediate Certificate: Press <Enter> when done -----BEGIN CERTIFICATE----- <certificate_value> -----END CERTIFICATE----- Do you want to continue entering root and/or intermediate certificates {y|n}: n You should keep a copy of the private key and the CA-signed digital certificate for future reference.