NetWorker:如何匯入或更換「AUTHC」和「NWUI」(Windows) 的認證機構簽署憑證
摘要: 以下是將預設 NetWorker 自我簽署憑證更換為「AUTHC」和「NWUI」服務的認證機構 (CA) 簽署憑證的一般步驟。當 NetWorker 伺服器和 NetWorker Web 使用者介面 (NWUI) 伺服器安裝在 Windows 作業系統上時,即適用此 KB。
本文章適用於
本文章不適用於
本文無關於任何特定產品。
本文未識別所有產品版本。
說明
這些指示說明如何為 NetWorker 伺服器上的 AUTHC 和 NWUI 服務將預設 NetWorker 自我簽署憑證更換為 CA 簽署憑證。
檔名沒有命名要求,但應引用檔類型的擴展名。顯示的命令範例適用於 Windows。如需 Linux 指示,請參閱:
NetWorker:如何匯入或更換「Authc」和「NWUI」的認證授權單位簽署憑證 (Linux)
注意:概述的程序需要 OpenSSL 命令列公用程式。依預設,OpenSSL 不包含在 Windows 作業系統中。如果未安裝 OpenSSL 公用程式,請先諮詢您的系統管理員以安裝 OpenSSL,然後再繼續此 KB 的操作。
涉及的憑證檔案:
<server>.csr: NetWorker server certificate signing request <server>.key: NetWorker server private key <server>.crt: NetWorker server CA-signed certificate <CA>.crt: CA root certificate <ICA>.crt: CA intermediate certificate (optional if it is available)
涉及的金鑰存放區:
| 商店名稱 | 預設路徑 |
| authc.keystore | C:\Program Files\EMC NetWorker\nsr\authc-server\tomcat\conf\authc.keystore |
| authc.truststore | C:\Program Files\EMC NetWorker\nsr\authc-server\conf\authc.truststore |
| cacerts | C:\Program Files\NRE\java\jre#.#.#_#\lib\security\cacerts |
| nwui.keystore | C:\Program Files\EMC NetWorker\nwui\monitoring\app\conf\nwui.keystore |
注意:顯示的路徑是預設安裝路徑;但是,安裝路徑是使用者定義的,可以安裝在其他位置。如果使用非預設路徑,請使用伺服器中的安裝路徑。NetWorker Runtime Environment (NRE) java 路徑會根據安裝的 NRE 版本而有所不同,因為這也會改變所安裝的 java 版本。
開始之前:
在其他位置建立以下檔案和資料夾的副本:
C:\Program Files\NRE\java\jre#.#.#_###\lib\security\cacerts C:\Program Files\EMC NetWorker\nwui\monitoring\app\conf\nwui.keystore C:\Program Files\EMC NetWorker\nwui\monitoring\nwuidb\pgdata C:\Program Files\EMC NetWorker\nsr\authc-server\tomcat\conf C:\Program Files\EMC NetWorker\nsr\authc-server\conf
產生私人金鑰和憑證簽署要求 (CSR) 檔案以提供給您的 CA。
- 開啟系統管理員命令提示字元並執行下列命令:
set openssl="<Path to OpenSSL bin folder>\openssl.exe" %openssl% req -new -newkey rsa:4096 -nodes -out C:\tmp\<server>.csr -keyout C:\tmp\<server>.key
- 將 CSR 檔案 (<server>.csr) 傳送至 CA,以產生 CA 簽署的認證檔案 (<server>.crt)。CA 應提供 CA 簽署的憑證檔案 (<server.crt>)、根憑證 (<CA.crt>) 和任何中間 CA 憑證 (<ICA.crt>)。
預先驗證步驟:
您必須知道正確的 NetWorker 金鑰存放區密碼。這些密碼是在 AUTHC 和 NWUI 組態期間設定。如果您不確定,請參閱:
為了便於執行下面描述的步驟和命令,我們從管理員命令提示符創建以下變數:
set hostname=<shortname of NetWorker server> set openssl="<Path to OpenSSL bin folder>\openssl.exe" *For example this may be C:\Program Files\OpenSSL-Win64\bin; however the path can differ depending on how OpenSSL was installed. NOTE: setting this variable is not required if the OpenSSL bin directory is part of the system environment variable "PATH". In which case, openssl can be run without specifying %openssl% as shown in the KB process. set java_bin="<Path to JRE bin folder>" *For NRE this is “C:\Program Files\NRE\java\jre#.#.#_###\bin”, where jre#.#.#_### is the version specific JRE folder. set nsr="<path to nsr folder>" *The default path is “C:\Program Files\EMC NetWorker\nsr” set nwui="<path to nwui folder>" *The default path is “C:\Program Files\EMC NetWorker\nwui” set cert="<path to server crt file>" set key="<path to server key file>" set RCAcert="<path to Root CA file>" set ICAcert="<path to intermediate CA crt file>" set authc_storepass=<AUTHC store password> set nwui_storepass=<NWUI store password>
注意:這些變數的值是特定於環境的。您必須根據系統上使用的系統路徑和登入資料來設定這些值。這些變數僅限於命令提示符會話。關閉命令提示符視窗后,將取消設置變數。如果有多個中間證書,請為每個證書創建變數:ICA1、ICA2 等
請確定您具備下列項目:
- server.crt 檔案,其中包含 PEM 憑證,其第一行為 -----BEGIN CERTIFICATE-----最後一行為 -----END CERTIFICATE-----
- 金鑰檔案以 -----BEGIN RSA PRIVATE KEY-----開頭,-----END RSA PRIVATE KEY」結束-----
- 執行此命令,確認所有憑證均為有效的 PEM 格式檔案
openssl x509 -in <cert> -text -noout - 驗證上述輸出,確定其是正確的憑證。
- 檢查下列兩個命令的輸出:
%openssl% rsa -pubout -in %key%
%openssl% x509 -pubkey -noout -in %cert%
這兩個命令的輸出必須匹配。
認證服務憑證更換步驟:
可使用 authc 不必停止服務,以下過程即可工作。但是,必須重新啟動它才能載入新證書。
- 匯入憑證:
- 將根憑證 (<CA.crt>) 和任何中繼 CA 憑證 (<ICA.crt>) 匯入 authc.keystore:
%java_bin%\keytool -import -alias RCA -keystore %nsr%\authc-server\tomcat\conf\authc.keystore -file %RCAcert% -storepass %authc_storepass% %java_bin%\keytool -import -alias RCA -keystore %nsr%\authc-server\conf\authc.truststore -file %RCAcert% -storepass %authc_storepass% %java_bin%\keytool -import -alias ICA -keystore %nsr%\authc-server\tomcat\conf\authc.keystore -file %ICAcert% -storepass %authc_storepass% %java_bin%\keytool -import -alias ICA -keystore %nsr%\authc-server\conf\authc.truststore -file %ICAcert% -storepass %authc_storepass%
- 使用 NetWorker 伺服器私密金鑰檔案 (<server>.key) 和新 CA 簽署憑證檔案 (<server.crt>) 建立 PKCS12 儲存檔案以用於
emcauthctomcat和emcauthcsaml別名。
%openssl% pkcs12 -export -in %cert% -inkey %key% -name emcauthctomcat -out C:\tmp\%hostname%.tomcat.authc.p12 -password pass:%authc_storepass% %openssl% pkcs12 -export -in %cert% -inkey %key% -name emcauthcsaml -out C:\tmp\%hostname%.saml.authc.p12 -password pass:%authc_storepass%
- 將 PKCS12 儲存檔案匯入 authc.keystore。
%java_bin%\keytool -importkeystore -destkeystore %nsr%\authc-server\tomcat\conf\authc.keystore -srckeystore C:\tmp\%hostname%.tomcat.authc.p12 -srcstoretype PKCS12 -srcstorepass %authc_storepass% -deststorepass %authc_storepass% %java_bin%\keytool -importkeystore -destkeystore %nsr%\authc-server\tomcat\conf\authc.keystore -srckeystore C:\tmp\%hostname%.saml.authc.p12 -srcstoretype PKCS12 -srcstorepass %authc_storepass% -deststorepass %authc_storepass%
- 將 PKCS12 儲存檔案匯入至 authc.truststore。
%java_bin%\keytool -importkeystore -destkeystore %nsr%\authc-server\conf\authc.truststore -srckeystore C:\tmp\%hostname%.tomcat.authc.p12 -srcstoretype PKCS12 -srcstorepass %authc_storepass% -deststorepass %authc_storepass% %java_bin%\keytool -importkeystore -destkeystore %nsr%\authc-server\conf\authc.truststore -srckeystore C:\tmp\%hostname%.saml.authc.p12 -srcstoretype PKCS12 -srcstorepass %authc_storepass% -deststorepass %authc_storepass%
- 刪除預設的 NetWorker 自我簽署憑證,並匯入新的 CA 簽署憑證
%java_bin%\keytool -delete -alias emcauthctomcat -keystore %nsr%\authc-server\conf\authc.truststore -storepass %authc_storepass% %java_bin%\keytool -import -alias emcauthctomcat -keystore %nsr%\authc-server\conf\authc.truststore -file %cert% -storepass %authc_storepass% %java_bin%\keytool -delete -alias emcauthcsaml -keystore %nsr%\authc-server\conf\authc.truststore -storepass %authc_storepass% %java_bin%\keytool -import -alias emcauthcsaml -keystore %nsr%\authc-server\conf\authc.truststore -file %cert% -storepass %authc_storepass%
- 最後,請將此憑證匯入 Java cacerts 金鑰存放區檔案,路徑為:
emcauthctomcat別名:
%java_bin%\keytool -delete -alias emcauthctomcat -keystore %java_bin%\..\lib\security\cacerts -storepass changeit %java_bin%\keytool -import -alias emcauthctomcat -keystore %java_bin%\..\lib\security\cacerts -file %cert% -storepass changeit
- 編輯 C:\Program Files\EMC NetWorker\nsr\authc-server\conf\authc-cli-app.properties 檔案中的 admin_service_default_url=localhost 值,以反映 CA 簽署憑證檔案中使用的 NetWorker 伺服器名稱:
admin_service_default_protocol=https
admin_service_default_url=<my-networker-server.my-domain.com>
admin_service_default_port=9090
admin_service_default_user=
admin_service_default_password=
admin_service_default_tenant=
admin_service_default_domain=
- 必須重新啟動 NetWorker 服務,AUTHC 才能使用新匯入的憑證。
net stop nsrd net start nsrd
- 在 NetWorker 伺服器上重新建立 AUTHC 信任:
nsrauthtrust -H <localhost or Authentication_service_host> -P 9090
認證後驗證:
- 確認匯入憑證的指紋:
%openssl% x509 -in %cert% -fingerprint -sha256 -noout
範例:
C:\certs>%openssl% x509 -in %cert% -fingerprint -sha256 -noout
SHA256 Fingerprint=06:4B:5B:73:06:55:FC:4A:CD:D2:92:34:00:1D:CE:35:CA:C3:48:C7:51:06:3A:D7:D7:84:F4:77:06:ED:9B:73
- 建立 cacerts 的輸出檔案
%java_bin%\keytool -list -keystore %java_bin%\..\lib\security\cacerts -storepass changeit > C:\tmp\cacerts.out
- 檢視輸出檔案,並確認您看到
emcauthctomcat項目,且憑證指紋與步驟 1 的指紋相符:
- 檢查 authc.truststore 和 authc.keystore ,並確認
emcauthctomcat和emcauthcsaml憑證指紋與步驟 1 的指紋相符:
%java_bin%\keytool -list -keystore %nsr%\authc-server\conf\authc.truststore -storepass %authc_storepass% %java_bin%\keytool -list -keystore %nsr%\authc-server\conf\authc.truststore -storepass %authc_storepass%
- 當 AUTHC 服務啟動並運行時,您可以檢查它提供給入站連接的證書是否與上述證書相同:
%openssl% s_client -connect localhost:9090 -showcerts 2>nul | %openssl% x509 -noout -fingerprint -sha256
範例:
C:\certs>%openssl% s_client -connect localhost:9090 -showcerts 2>nul | %openssl% x509 -noout -fingerprint -sha256
SHA256 Fingerprint=06:4B:5B:73:06:55:FC:4A:CD:D2:92:34:00:1D:CE:35:CA:C3:48:C7:51:06:3A:D7:D7:84:F4:77:06:ED:9B:73
NetWorker 使用者介面 (nwui) 服務憑證更換步驟:
nwui 服務正在 NetWorker 伺服器上執行。
- 停止 NWUI 服務:
net stop nwui
- 刪除預設的 NetWorker 自我簽署憑證,並將新的 CA 簽署認證檔案 (<server>.crt) 匯入 cacerts keystore。為了保持一致性,我們將所有與 NWUI 相關的憑證更換為 CA 簽署憑證。
%java_bin%\keytool -delete -alias emcnwuimonitoring -keystore %java_bin%\..\lib\security\cacerts -storepass changeit %java_bin%\keytool -import -alias emcnwuimonitoring -keystore %java_bin%\..\lib\security\cacerts -file %cert% -storepass changeit
- 使用 NetWorker 伺服器私密金鑰檔案 (<server>.key) 和新 CA 簽署憑證檔案 (<server.crt>) 建立 PKCS12 儲存檔案以用於
emcauthctomcat和emcauthcsamlNWUI 金鑰庫的別名。
%openssl% pkcs12 -export -in %cert% -inkey %key% -name emcauthctomcat -out C:\tmp\%hostname%.tomcat.nwui.p12 -password pass:%nwui_storepass% %openssl% pkcs12 -export -in %cert% -inkey %key% -name emcauthcsaml -out C:\tmp\%hostname%.saml.nwui.p12 -password pass:%nwui_storepass%
注意:此 pkcs12 檔案密碼必須與金鑰存放區的密碼相符。這就是為什麼在此情況下,我們使用 nwui storepass 來建立。
- 將 .p12 檔、根 CA 證書和中間 CA 證書導入 nwui 金鑰庫。
%java_bin%\keytool -importkeystore -destkeystore %nwui%\monitoring\app\conf\nwui.keystore -srckeystore C:\tmp\%hostname%.tomcat.nwui.p12 -srcstoretype PKCS12 -srcstorepass %nwui_storepass% -deststorepass %nwui_storepass% %java_bin%\keytool -importkeystore -destkeystore %nwui%\monitoring\app\conf\nwui.keystore -srckeystore C:\tmp\%hostname%.saml.nwui.p12 -srcstoretype PKCS12 -srcstorepass %nwui_storepass% -deststorepass %nwui_storepass% %java_bin%\keytool -import -alias RCA -keystore %nwui%\monitoring\app\conf\nwui.keystore -file %RCAcert% -storepass %nwui_storepass% %java_bin%\keytool -import -alias ICA -keystore %nwui%\monitoring\app\conf\nwui.keystore -file %ICAcert% -storepass %nwui_storepass%
- 重新命名
emcnwuimonitoring憑證,並將我們的伺服器憑證放在此路徑中,並具有相同的名稱。
move %nwui%\monitoring\app\conf\emcnwuimonitoring.cer %nwui%\monitoring\app\conf\emcnwuimonitoring.cer_orig copy %cert% %nwui%\monitoring\app\conf\emcnwuimonitoring.cer
- 啟動 NWUI 服務:
net start nwui
nwui 驗證後:
- 確認匯入憑證的指紋:
%openssl% x509 -in %cert% -fingerprint -sha256 -noout
範例:
C:\certs>%openssl% x509 -in %cert% -fingerprint -sha256 -noout
SHA256 Fingerprint=06:4B:5B:73:06:55:FC:4A:CD:D2:92:34:00:1D:CE:35:CA:C3:48:C7:51:06:3A:D7:D7:84:F4:77:06:ED:9B:73
- 建立 cacerts 的輸出檔案
%java_bin%\keytool -list -keystore %java_bin%\..\lib\security\cacerts -storepass changeit > C:\tmp\cacerts.out
- 檢視輸出檔案,並確認您看到
emcauthctomcat項目,且憑證指紋與步驟 1 的指紋相符:
- 檢查 nwui.keystore,並確認
emcauthctomcat憑證指紋與步驟 1 的指紋相符:
%java_bin%\keytool -list -keystore %nwui%\monitoring\app\conf\nwui.keystore -storepass %nwui_storepass%
- NWUI 服務啟動並運行時,可以檢查它提供給入站連接的證書是否與上述證書相同:
%openssl% s_client -connect localhost:9095 -showcerts 2>nul | %openssl% x509 -noout -fingerprint -sha256
範例:
C:\certs>%openssl% s_client -connect localhost:9095 -showcerts 2>nul | %openssl% x509 -noout -fingerprint -sha256
SHA256 Fingerprint=06:4B:5B:73:06:55:FC:4A:CD:D2:92:34:00:1D:CE:35:CA:C3:48:C7:51:06:3A:D7:D7:84:F4:77:06:ED:9B:73
nwui PostgreSQL 憑證更換步驟
move %nwui%\monitoring\nwuidb\pgdata\server.crt %nwui%\monitoring\nwuidb\pgdata\server.crt_orig move %nwui%\monitoring\nwuidb\pgdata\server.key %nwui%\monitoring\nwuidb\pgdata\server.key_orig copy %cert% %nwui%\monitoring\nwuidb\pgdata\server.crt copy %key% %nwui%\monitoring\nwuidb\pgdata\server.key檢查這些檔案的擁有權,並確保它們歸系統帳戶 「本機服務」所有。
如果檔案所有權設定為其他使用者帳戶或群組,請更新每個檔案,使其歸「LOCAL SERVICE」所有
其他資訊
如需有關匯入 CA 簽署憑證的更多資訊,請參閱《 Dell NetWorker 安全性組態指南》。
以下知識文章詳述將 NetWorker Management Console (NMC) 自我簽署憑證更換為 CA 簽署憑證的程序:
受影響的產品
NetWorker產品
NetWorker Family文章屬性
文章編號: 000269543
文章類型: How To
上次修改時間: 14 11月 2025
版本: 8
向其他 Dell 使用者尋求您問題的答案
支援服務
檢查您的裝置是否在支援服務的涵蓋範圍內。