Configuring CA signed certificates for vCenter Site Recovery Manager
search cancel

Configuring CA signed certificates for vCenter Site Recovery Manager

book

Article ID: 317504

calendar_today

Updated On:

Products

VMware Live Recovery

Issue/Introduction

This article provides steps to configure Certificate Based Authentication using CA signed certificates within your SRM server pair. This article assumes that you have already performed the steps given in Implementing CA signed SSL certificates with vSphere 5.x (2034833) to replace the certificates for vCenter Server components.
For newer versions of SRM 6.x and 8.x please see the following article Configuring CA signed certificates for vCenter Site Recovery Manager 6.x and 8.x (66925)

Environment

VMware vCenter Site Recovery Manager 5.1.x
VMware vCenter Site Recovery Manager 5.8.x
VMware vCenter Site Recovery Manager 5.0.x
VMware vCenter Site Recovery Manager 5.5.x

Resolution

Site Recovery Manager certificate requirements

The Site Recovery Manager certificate must meet these requirements:
  • The certificates must have a Subject Name value that is the same for both members of the SRM pair
  • If the Organization (O), Organizational Unit (OU), Locality (L), State (S), or Country (C) are used, they must be the same for both members of the SRM pair
  • The certificate must include a Subject Alternative Name attribute that matches the FQDN of the SRM server host. The best practice is to use lower-case letters
  • The certificates must include an extendedKeyUsage or enhancedKeyUsage that includes serverAuth and clientAuth
  • The SRM certificate password must not exceed 31 characters
  • The SRM certificate key length must be a minimum of 2048-bits
  • SHA256RSA or stronger signature algorithms are recommended
  • The SRM certificates do not need to be signed by the same certificate authority, but each signing certificate authority must be trusted by both SRM servers
For detailed requirements, see the Requirements When Using Public Key Certificates with SRM section in the VMware vCenter Site Recovery Manager 5.5 Installation and Configuration guide.

IMPORTANT Public CAs stopped issuing SSL/TLS certificates that contain internal server names or reserved IP addresses in November 2015. CAs will revoke SSL/TLS certificates that contain internal server names or reserved IP addresses on 1st October 2016. To minimize future disruption, if you use SSL/TLS certificates that contain internal server names or reserved IP addresses, obtain new, compliant certificates from a private CA before 1st October 2016.
 

Generating the certificate request

You can generate the certificate signing request using OpenSSL. If you have already installed the SRM Server using the default certificates, OpenSSL is available on the SRM server under C:\Program Files\VMware\VMware vCenter Site Recovery Manager\bin.
 
If you have installed OpenSSL on a Windows machine, you can use this while replacing the vCenter Server certificates:
  1. Create an OpenSSL configuration file for each SRM site using a text editor (change the fields in red to match your environment):

    Note: All entries in the OpenSSL configuration file must be lowercase.

    [ req ]
    default_bits = 2048
    default_keyfile = rui.key
    distinguished_name = req_distinguished_name
    encrypt_key = no
    prompt = no
    string_mask = nombstr
    req_extensions = v3_req

    [ v3_req ]
    basicConstraints = CA:FALSE
    keyUsage = digitalSignature, keyEncipherment, dataEncipherment
    extendedKeyUsage = serverAuth, clientAuth
    subjectAltName = DNS: srm, IP: SRM IP, DNS: srm.fqdn.com
[ req_distinguished_name ]
countryName = US
stateOrProvinceName = California
localityName = Palo Alto

0.organizationName = same name for both SRM certificates
organizationalUnitName = same name for both SRM certificates
commonName = same name for both SRM certificates

Notes:
  • In this example, the files are called protected.cfg and recovery.cfg.
  • SRM has a special requirement for a CN field that matches between both certificates in order for site pairing to complete. This is different from the usual practice of specifying the server identity. SRM uses the Subject Alternative Name field to verify the server's identity.
     
  1. Generate the certificate signing request:

    openssl.exe req -new -nodes -out protected.csr -keyout protected-orig.key -config protected.cfg
    openssl.exe req -new -nodes -out recovery.csr -keyout recovery-orig.key -config recovery.cfg

     
  2. Convert the key to the proper RSA format:

    openssl.exe rsa -in protected-orig.key -out protected.key
    openssl.exe rsa -in recovery-orig.key -out recovery.key

     
  3. Provide the .csr file to your certificate authority and receive the signed certificate back.

Converting the signed certificate to PKCS#12 format

After you receive the signed certificate (ending in .cer or .crt) from your certificate authority, it must be converted to the PKCS#12 format.
 
To convert to PKCS#12 format, it requires key files generated while generating the certificate request and the signed certificate:
  1. Copy the signed certificate file to the server where you generated the certificate signing request.
  2. Use OpenSSL to generate the PKCS#12 certificate:

    openssl.exe pkcs12 -export -in protected.cer -inkey protected.key -name "srmprotected" -passout pass:srmserver -out protected.p12
    openssl.exe pkcs12 -export -in recovery.cer -inkey recovery.key -name "srmrecovery" -passout pass:srmserver -out recovery.p12

Replacing the SRM Certificates

You can replace the SRM certificates during SRM installation or after installation.
 

Replacing the SRM certificate during installation

  1. Copy the SRM certificate to your SRM server.
  2. Launch the SRM installer and follow the SRM installation wizard.
  3. In the VMware vCenter Server screen, specify the vCenter Server FQDN.
  4. In the Certificate Type Selection screen, click Use a PKCS#12 certificate file and click Next.
  5. Browse the location of the certificate, select the desired file, and enter the certificate password you chose when generating the p12 file.
  6. Complete the SRM installation wizard.
  7. Repeat these steps on the recovery site.

Replacing the SRM certificate after installation

  1. In the protected site, click Add/Remove programs, click VMware vCenter Site Recovery Manager, and click Change.
  2. Follow the wizard until you reach the Certificate Type Selection screen.
  3. Click Use a PKCS#12 certificate file and click Next.
  4. Browse the location of the certificate, select the desired file, and enter the certificate password you chose when generating the p12 file.
  5. Complete the SRM Modify installation wizard.
  6. Repeat the steps on the recovery site.

Configuring or reconfiguring the SRM site connection

After installing the SRM server on both sites, you must configure the connection between SRM sites. If you were previously using credential based authentication, it may be necessary to repair the connection between sites after replacing the default certificates with CA signed certificates.
  1. Log in to vCenter Server and access the SRM plugin.
  2. In the Sites navigation pane, click Summary and click Configure Connection (located in the top right corner).
  3. Enter the FQDN of the remote vCenter server and adjust the port, if necessary (this field may be populated for you already).
  4. Verify that the process completes successfully without prompting for a username or password or displaying any certificate warnings.

    Note: You may see certificate warnings after the pairing completes. If you have deployed the vSphere Replication appliances and they are still using default certificates. These can be safely ignored.


Additional Information

For information on replacing the certificates used by vSphere Replication, see Configuring CA Signed Certificates for VMware vSphere Replication (2080395).Implementing CA signed SSL certificates with vSphere 5.x
Configuring CA Signed Certificates for VMware vSphere Replication
Configurando certificados assinados por uma AC para o VMware vCenter Site Recovery Manager
Configurar certificados firmados por CA para VMware vCenter Site Recovery Manager