NetWorker:如何导入或替换“AUTHC”和“NWUI”的证书颁发机构签名证书 (Windows)

摘要: 这些是将“AUTHC”和“NWUI”服务的默认 NetWorker 自签名证书替换为证书颁发机构 (CA) 签名证书的常规步骤。当 NetWorker 服务器和 NetWorker Web 用户界面 (NWUI) 服务器安装在 Windows作系统上时,此知识库文章适用。

本文章適用於 本文章不適用於 本文無關於任何特定產品。 本文未識別所有產品版本。

說明

这些说明介绍了如何将 NetWorker 服务器上的 AUTHC 和 NWUI 服务的默认 NetWorker 自签名证书替换为 CA 签名证书。

文件名没有命名要求,但应引用文件类型的扩展名。显示的命令示例适用于 Windows。有关 Linux 说明,请参阅:
NetWorker:如何导入或更换“Authc”和“NWUI”的证书颁发机构签名证书 (Linux)
 

提醒:概述的过程需要 OpenSSL 命令行实用程序。默认情况下,Windows作系统中不包含 OpenSSL。如果未安装 OpenSSL 实用程序,请咨询您的系统管理员以安装 OpenSSL,然后再继续执行此知识库文章。

涉及的证书文件:

<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。

  1. 打开管理员命令提示符并运行以下命令:
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
  1. 将 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 不必停止服务,以下步骤也能正常工作。但是,必须重新启动它才能加载新证书。

  1. 导入证书:
  • 将根证书 (<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>) 为 emcauthctomcatemcauthcsaml 别名。
%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
  1. 编辑 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=
  1. 要使 AUTHC 使用新导入的证书,需要重新启动 NetWorker 服务。
net stop nsrd
net start nsrd
  1. 在 NetWorker 服务器上重新建立 AUTHC 信任:
nsrauthtrust -H <localhost or Authentication_service_host> -P 9090

AUTHC 后验证

  1. 确认导入的证书的指纹:
%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
  1. 为 cacerts 创建输出文件
%java_bin%\keytool -list -keystore %java_bin%\..\lib\security\cacerts -storepass changeit > C:\tmp\cacerts.out
  1. 查看输出文件并确认您看到 emcauthctomcat 条目,证书指纹与步骤 1 中的指纹匹配:
证书指纹与导入证书中的指纹匹配
  1. 检查 authc.truststoreauthc.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%
  1. 当 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 服务器上运行。
  1. 停止 NWUI 服务:
net stop nwui
  1. 删除默认的 NetWorker 自签名证书,并将新的 CA 签名证书文件 (<server>.crt) 导入 cacerts 密钥库。为了保持一致性,我们将所有与 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
  1. 使用 NetWorker 服务器私钥文件 (<server>.key) 和新的 CA 签名证书文件 (<server.crt>) 为 emcauthctomcatemcauthcsaml NWUI 密钥库的别名。
%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 创建它的原因。
  1. 将 .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%
  1. 重命名 emcnwuimonitoring 证书,并将我们的服务器证书放在此具有相同名称的路径中。
move %nwui%\monitoring\app\conf\emcnwuimonitoring.cer %nwui%\monitoring\app\conf\emcnwuimonitoring.cer_orig
copy %cert% %nwui%\monitoring\app\conf\emcnwuimonitoring.cer
  1. 启动 NWUI 服务:
net start nwui

nwui 验证后:

  1. 确认导入的证书的指纹:
%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
  1. 为 cacerts 创建输出文件
%java_bin%\keytool -list -keystore %java_bin%\..\lib\security\cacerts -storepass changeit > C:\tmp\cacerts.out
  1. 查看输出文件并确认您看到 emcauthctomcat 条目,证书指纹与步骤 1 中的指纹匹配:
证书指纹与导入证书中的指纹匹配
  1. 检查 nwui.keystore 并确认 emcauthctomcat 证书指纹与步骤 1 中的指纹匹配:
%java_bin%\keytool -list -keystore %nwui%\monitoring\app\conf\nwui.keystore -storepass %nwui_storepass%
  1. 当 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 所有。

server.crt 归 LOCAL SERVICE 所有 

server.key归 LOCAL SERVICE 所有 
 如果文件所有权设置为另一个用户帐户或组,请更新每个文件,使其归“本地服务”所有

其他資訊

有关导入 CA 签名证书的更多信息,请参阅 Dell NetWorker 安全配置指南

以下知识库文章详细介绍了将 NetWorker Management Console (NMC) 自签名证书替换为 CA 签名证书的过程:

NetWorker:如何导入或更换 NMC 的证书颁发机构签名证书

受影響的產品

NetWorker

產品

NetWorker Family
文章屬性
文章編號: 000269543
文章類型: How To
上次修改時間: 14 11月 2025
版本:  8
向其他 Dell 使用者尋求您問題的答案
支援服務
檢查您的裝置是否在支援服務的涵蓋範圍內。