Data Domain:在 DD 之外產生 CSR
Summary: 本知識文章說明如何使用外部系統建立憑證簽署要求,以及由外部 CA 建立簽署憑證,以便產生的憑證可匯入 Data Domain,以在 HTTP (DD GUI 透過 SSL) 使用
Instructions
在大多數情況下,您會想要使用此 KB 來產生 CSR 並匯入憑證:
Data Domain - 管理 HTTP 和 HTTPS 主機憑證
在極少數情況下,當您無法在 DD 上產生 CSR 時,會使用此 KB。
匯入 CA 簽署的憑證可讓您 HTTPS 存取 Data Domain System Manager,而不必略過瀏覽器檢查未由受信任的第三方簽署的憑證。一旦建立了與 DD GUI 的第一個 SSL 連接,流量將受到同等的保護,以免使用外部簽名或自簽名證書進行竊聽,公司可能會要求所有具有 SSL 訪問許可權的主機都必須具有由內部 CA 或外部 CA 簽名的證書以進行信任。
要創建此外部簽名證書,有各種方法。我們建議在 DD OS 6.2.0.35 及更新版本中使用 DD CLI 命令 「adminaccess certificate cert-signing-request generate」來建立憑證簽署要求 (CSR),並將其提交給所選的 CA 以進行簽署。隨後會將已簽署的憑證匯入 HTTPS 的 DD。所有詳細資料都可參閱知識文章 Data Domain:如何產生憑證簽署要求和使用外部簽署憑證
另一種方法是在網路中使用單獨的主機,並安裝一組最新的OpenSSL庫和二進位檔,以生成要簽名的CSR。取得已簽署的憑證後,請手動將已簽署的憑證和憑證的相關聯私密金鑰傳輸至 DD,並匯入其中。這個過程是這樣的:
-
登入 Linux、UNIX 或其他已安裝 OpenSSL 的伺服器,並先產生公鑰/私密金鑰對。DD 預設會產生 2048 位元金鑰,不建議使用 1024 位元金鑰,而 4096 位元金鑰可能有點太多:
# openssl genrsa -out hostkey.pem 2048 Generating RSA private key, 2048 bit long modulus ........+++ ...+++ e is 65537 (0x10001)
-
使用第一步生成的私鑰生成證書簽名請求 (CSR),並在要簽名的 CSR 中提供詳細資訊,例如通用名稱、電子郵件地址、國家和城市等。
# openssl req -new -sha256 -key hostkey.pem -out host_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) [AU]:US State or Province Name (full name) [Some-State]:California Locality Name (eg, city) []:San Francisco Organization Name (eg, company) [Internet Widgits Pty Ltd]:Example Inc. Organizational Unit Name (eg, section) []:IT Department Common Name (e.g. server FQDN or YOUR name) []:www.example.com Email Address []:webmaster@example.com Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []:
請注意,與大多數 OpenSSL 安裝相比,“ subjectAltName”擴展(這是 RFC 3280 的強制性要求)不會被添加到 CSR 中或被要求。由於缺少此擴展,某些私有和公共 CA 可能會拒絕處理 CSR。如果是用於 GUI 的 DD 憑證,則從瀏覽器存取時,「subjectAltName」必須是 DD 的 FQDN。
若要在建立 CSR 時指定「subjetAltName」,如果使用 OpenSSL 1.1.1,則可以從「OpenSSL」命令列本身完成。否則會導致變更 /etc/ssl/openssl.cnf,這超出了本文件的範圍。如果使用 OpenSSL 1.1.1 或更新版本:
# openssl version OpenSSL 1.1.1 11 Sep 2018 # openssl req -new -sha256 -key hostkey.pem -out host_csr.csr -addext "subjectAltName = DNS:www.example.com" 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) [AU]:US State or Province Name (full name) [Some-State]:California Locality Name (eg, city) []:San Francisco Organization Name (eg, company) [Internet Widgits Pty Ltd]:Example Inc. Organizational Unit Name (eg, section) []:IT Department Common Name (e.g. server FQDN or YOUR name) []:www.example.com Email Address []:webmaster@example.com Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []:
-
取得 CSR 檔案「host_csr.csr」,並上傳至對應的 CA 進行簽署。如果 CA 是內部的,請將其提供給 CA 管理員或通過正常過程對其進行簽名(他們需要使用如下命令列):
# openssl x509 -req -in host_csr.csr -CA CA/cacert.pem -CAkey CA/cakey.pem -out host_cert.pem -CAcreateserial Signature ok subject=/C=CH/ST=California/L=San Francisco/O=Example Inc./OU=IT Department/CN=www.example.com/emailAddress=webmaster@example.com Getting CA Private Key
# openssl x509 -in host_cert.pem -text -noout | grep -A1 "Subject Alternative Name" X509v3 Subject Alternative Name: DNS:www.example.com
- 在任何情況下,結果通常是 .pem 或 .cer 編碼的證書檔(示例中為“host_cert.pem”)。若要在 DD 中匯入憑證,必須將憑證以 PKCS#12 格式與第一步產生的 (私密) 金鑰捆綁在一起。從運行第一個步驟的同一主機:
# openssl.exe pkcs12 -keypbe PBE-SHA1-3DES -certpbe PBE-SHA1-3DES -export -out host.p12 -inkey hostkey.pem -in host_cert.pem Enter Export Password: Verifying - Enter Export Password:
請務必為 PKCS#12 檔案設定密碼,否則憑證匯入將在 Data Domain 上失敗。安裝認證後,正常使用 Data Domain 時,將不會提示輸入密碼。「-keypbe PBE-SHA1-3DES」和「-certpbe PBE-SHA1-3DES」引數是為了確保修改 CA 時使用支援的「PBE-SHA1-3DES」演算法。如此可避免終端使用者在嘗試匯入已簽署憑證時發生錯誤。
-
將產生的「host.p12」憑證檔案複製到 Data Domain 上的「/ddr/var/certificates/」目錄 (例如,使用 SCP 至 DD)。
- 將外部產生和簽署的憑證匯入 Data Domain 之前,請確認 Data Domain 沒有現存的 CSR。Data Domain 會嘗試將匯入的憑證與系統上的任何 CSR 相符,如果存在,該憑證將不相符,並拒絕載入匯入的憑證,並顯示下列錯誤訊息:
Imported host certificate does not match the generated CSR
確認系統上是否有現存的 CSR:
# adminaccess certificate cert-signing-request show
如果存在現有的 CSR,請繼續刪除它,否則證書導入將失敗:
# adminaccess certificate cert-signing-request delete
-
從命令行介面 (CLI) 匯入新憑證。輸入在上一步驟中用於建立 PKCS#12 的密碼,並使用「application https」來使用匯入的 DD System Manager 憑證或 DDMC GUI:
# adminaccess certificate import host application https file host.p12 Enter password: ** Importing the certificate will restart the http/https services and currently active http/https user sessions will be terminated. Do you want to import this certificate? (yes|no) [yes]: yes Host certificate imported for applications(s) : "https".
注意:「adminaccess certificate show」 現在應會列出 HTTPS 的匯入主機憑證。HTTPs 的預設自我簽署憑證會標示為「未使用中」。
Additional Information
| https://downloads.dell.com/TranslatedPDF/PT-BR_KB533409.pdf |
| https://downloads.dell.com/TranslatedPDF/ZH-CN_KB533409.pdf |
| https://downloads.dell.com/TranslatedPDF/ES_KB533409.pdf |
| https://downloads.dell.com/TranslatedPDF/DE_KB533409.pdf |
| https://downloads.dell.com/TranslatedPDF/FR_KB533409.pdf |
| https://downloads.dell.com/TranslatedPDF/IT_KB533409.pdf |
| https://downloads.dell.com/TranslatedPDF/JA_KB533409.pdf |
| https://downloads.dell.com/TranslatedPDF/NL_KB533409.pdf |
| https://downloads.dell.com/TranslatedPDF/KO_KB533409.pdf |
| https://downloads.dell.com/TranslatedPDF/RU_KB533409.pdf |
| https://downloads.dell.com/TranslatedPDF/PT_KB533409.pdf |
| https://downloads.dell.com/TranslatedPDF/SV_KB533409.pdf |