Data Domain:在 DD 外部生成 CSR

Summary: 本知识库文章介绍如何使用外部系统创建证书签名请求,以及如何创建由外部 CA 签名的证书,以便将生成的证书导入 Data Domain 中以在 HTTP (DD GUI 通过 SSL)中使用

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

在大多数情况下,您希望使用此知识库文章生成 CSR 并导入证书:

Data Domain — 管理 HTTP 和 HTTPS 的主机证书

在极少数情况下,当您无法在 DD 本身上生成 CSR 时,将使用此知识库文章。

 

 

导入 CA 签名的证书允许对 Data Domain System Manager 进行 HTTPS 访问,而不必绕过浏览器检查未由受信任的第三方签名的证书。建立与 DD GUI 的第一个 SSL 连接后,使用外部签名或自签名证书同样防止流量被窃听,公司可能要求所有具有 SSL 访问权限的主机具有由内部 CA 或外部 CA 签名的证书,以实现信任。

对于创建此外部签名证书,有多种方法。对于 DD OS 6.2.0.35 及更高版本,我们建议使用 DD CLI 命令“adminaccess certificate cert-signing-request generate”创建证书签名请求 (CSR),该请求将提交给所选的 CA 进行签名。然后,将签名证书导入 DD 以用于 HTTPS。所有详细信息均可在知识库文章 Data Domain:如何生成证书签名请求并使用外部签名的证书

另一种方法是使用网络中的单独主机,该主机安装了一组最新的 OpenSSL 库和二进制文件来生成要签名的 CSR。获取签名证书后,位签名证书和证书的关联私钥,然后手动传输到 DD 并导入到 DD 中。这个过程是这样的:    

  1. 登录安装了 OpenSSL 的 Linux、UNIX 或其他服务器,首先生成公钥/私钥对。默认情况下,DD 生成 2048 位密钥,不建议使用 1024 位密钥,4096 位密钥可能有点太多:    

# openssl genrsa -out hostkey.pem 2048
Generating RSA private key, 2048 bit long modulus
........+++
...+++
e is 65537 (0x10001)
  1. 使用第一步生成的私钥生成证书签名请求 (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 []:
  1. 获取 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

 

提醒如果签名过程需要选择服务器软件,请选择Tomcat。
 
:如果使用“OpenSSL”命令为 CSR 签名,则可能需要向命令行添加更多选项,以便生成的证书保留“subjectAltName”扩展名。要查看生成的证书是否具有扩展名,请运行类似于以下内容的内容:    
 
# openssl x509 -in host_cert.pem -text -noout | grep -A1 "Subject Alternative Name"
            X509v3 Subject Alternative Name:
                DNS:www.example.com
  1.  在任何情况下,结果通常是 .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”。这将避免终端用户在尝试导入其签名证书时遇到错误。

  1. 将生成的“host.p12”证书文件复制到 Data Domain 上的“/ddr/var/certificates/”目录(例如,对 DD 使用 SCP)。

# scp host.p12 sysadmin@DD_HOSTNAME_OR_IP:/ddr/var/certificates/
  1. 在将外部生成和签名的证书导入 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
  1. 从 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 的默认自签名证书将被标记为“Not in use”(未使用)。

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

Affected Products

Data Domain
Article Properties
Article Number: 000231595
Article Type: How To
Last Modified: 09 Jan 2025
Version:  3
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.