VMware NSX-T 3.2.x
VMware NSX 4.0.x, 4.1.x
This issue is resolved in NSX 4.2.0 and above where full certificate lifecycle is available on the Standby Global Manager UI.
For impacted versions the following workaround can be used to update certificates without performing a failover.
###--###--###--####
"#curl -k -H 'X-NSX-Username:admin' -H 'X-NSX-Groups:superuser' "http://127.0.0.1:7440/nsxapi/api/v1/trust-management/certificates/<cert-id>?action=get_private"
root@AGM:~# curl -k -X GET -H "Content-Type: application/json" -H 'X-NSX-Username:admin' -H 'X-NSX-Groups:superuser' "http://127.0.0.1:7440/nsxapi/api/v1/trust-management/certificates/#####--###--###--####?action=get_private"
{
"display_name": "TEST-CERT-FROM-ACTIVE",
"pem_encoded" : "-----BEGIN CERTIFICATE-----\n********\n-----END CERTIFICATE-----\n",
"private_key" : "-----BEGIN RSA PRIVATE KEY-----\n*****\n-----END RSA PRIVATE KEY-----\n",
"key_algo" : "RSA",
"_protection" : "NOT_PROTECTED"
}
Note: After exporting the generated new certificate, delete the certificate from the Active GM
{
"display_name": "TEST-CERT-FROM-ACTIVE",
"pem_encoded" : "-----BEGIN CERTIFICATE-----\n********\n-----END CERTIFICATE-----\n",
"private_key" : "-----BEGIN RSA PRIVATE KEY-----\n*****\n-----END RSA PRIVATE KEY-----\n",
"key_algo" : "RSA",
"_protection" : "NOT_PROTECTED"
}
"display_name":""
field can be added as needed, if its not there.curl -k -H "Content-Type: application/json" -u admin -X POST "https://standbyGM-manager-ip/api/v1/trust-management/certificates?action=import" --data @/tmp/payload.json
POST https://standbyGM-manager-ip/api/v1/trust-management/certificates?action=import
After the certificate is imported on the Standby GM, Replace the certificate using the replace certificate documentation.
Once the certificate has been replaced, the following API can be used to remove the unused expired/expiring certificate(s):
DELETE https://<standby_gm_ip>/api/v1/trust-management/certificates/<unused_certificate_id_standby_gm>
Curl example:
curl -k -u 'username:password' -H "Content-Type: application/json" -X DELETE 'https://<standby_gm_ip>/api/v1/trust-management/certificates/<unused_certificate_id_standby_gm>'