在 Linux 主机上配置双向 SSL 通信
您应该配置双向 SSL 通信以保护 Linux 主机上的SnapCenter服务器与插件之间的相互通信。
-
您应该已经为 Linux 主机配置了 CA 证书。
-
您必须在所有插件主机和SnapCenter服务器上启用双向 SSL 通信。
-
将 certificate.pem 复制到 /etc/pki/ca-trust/source/anchors/。
-
将证书添加到 Linux 主机的信任列表中。
-
cp root-ca.pem /etc/pki/ca-trust/source/anchors/
-
cp certificate.pem /etc/pki/ca-trust/source/anchors/
-
update-ca-trust extract
-
-
验证证书是否已添加到信任列表。
trust list | grep "<CN of your certificate>"
-
更新SnapCenter nginx 文件中的 ssl_certificate 和 ssl_certificate_key 并重新启动。
-
vim /etc/nginx/conf.d/snapcenter.conf
-
systemctl restart nginx
-
-
刷新SnapCenter服务器 GUI 链接。
-
更新位于 _ /<安装路径>/ NetApp /snapcenter/SnapManagerWeb_ 的 * SnapManager .Web.UI.dll.config* 和位于 /<安装路径>/ NetApp/snapcenter/SMCore 的 SMCoreServiceHost.dll.config 中的以下注册表项的值。
-
<add key="SERVICE_CERTIFICATE_PATH" value="<证书.pfx 的路径>" />
-
<添加键=“SERVICE_CERTIFICATE_PASSWORD”值=“<密码>”/>
-
-
重新启动以下服务。
-
systemctl restart smcore.service
-
systemctl restart snapmanagerweb.service
-
-
验证证书是否已附加到SnapManager Web 端口。
openssl s_client -connect localhost:8146 -brief
-
验证证书是否已附加到 smcore 端口。
openssl s_client -connect localhost:8145 -brief
-
管理 SPL 密钥库和别名的密码。
-
检索分配给 SPL 属性文件中的 SPL_KEYSTORE_PASS 键的 SPL 密钥库默认密码。
-
更改密钥库密码。
keytool -storepasswd -keystore keystore.jks
-
更改所有私钥条目别名的密码。
keytool -keypasswd -alias "<alias_name>" -keystore keystore.jks
-
为 spl.properties 中的密钥 SPL_KEYSTORE_PASS 更新相同的密码。
-
重新启动服务。
-
-
在插件 Linux 主机上,在 SPL 插件的密钥库中添加根证书和中间证书。
-
keytool -import -trustcacerts -alias <any preferred alias name> -file <path of root-ca.pem> -keystore <path of keystore.jks mentioned in spl.properties file>
-
keytool -importkeystore -srckeystore <path of certificate.pfx> -srcstoretype pkcs12 -destkeystore <path of keystore.jks mentioned in spl.properties file> -deststoretype JKS
-
检查 keystore.jks 中的条目。
keytool -list -v -keystore <path to keystore.jks>
-
如果需要,重命名任何别名。
keytool -changealias -alias "old-alias" -destalias "new-alias" -keypass keypass -keystore </path/to/keystore> -storepass storepas
-
-
-
使用存储在 keystore.jks 中的 certificate.pfx 的别名更新 spl.properties 文件中的 SPL_CERTIFICATE_ALIAS 的值,然后重新启动 SPL 服务:
systemctl restart spl
-
验证证书是否已附加到 smcore 端口。
openssl s_client -connect localhost:8145 -brief