After you install NSX, the manager nodes and cluster have self-signed certificates. You can optionally replace the API and MGMT_CLUSTER (aka VIP) self-signed certificates with common CA-signed certificate with a SAN (Subject Alternative Name) that matches the FQDNs and IPs of all the nodes and the VIP for the cluster. You can run only one certificate replacement operation at a time.
If you are using NSX Federation, you can replace the GM API certificates, GM MGMT_CLUSTER (aka VIP) certificate, LM API certificates, and LM MGMT_CLUSTER (aka VIP) certificates using the following APIs.
Starting with NSX Federation 4.1, you can replace a self-signed certificate that is used for the GM-LM communication.
When you replace the GLOBAL_MANAGER or LOCAL_MANAGER certificate, the site-manager sends these to all the other federated sites, so the communication remains intact.
- NSX nodes within a cluster.
- Within the NSX Federation.
- NSX Manager to NSX Edge.
- NSX Manager to NSX agent.
- NSX Manager REST API communication (external).
You can also replace the GLOBAL_MANAGER and LOCAL_MANAGER certificates. See Certificates for NSX and NSX Federation for details on self-signed certificates auto-configured for NSX Federation.
Starting with NSX 4.2, the API service on each manager and VIP share the same certificate. You can also bulk replace the shared certificate by running the following 'batch replace' API .POST https://{{ip}}/api/v1/trust-management/certificates/action/batch-replace { "certificate_replacements": [ { "old_certificate_id": "fe3d2623-df43-4757-8018-b1d8223a1475" "new_certificate_id": "66370296-cacf-45a7-9912-6e2718df87bb" } ] }
Optionally, you can also replace each API service and the VIP service with their own unique certificates by running the 'apply certificate' API mentioned in the following procedure.
Both the batch replace and apply certificate APIs should be performed after the manager cluster has formed, because starting with NSX 4.2 the API certificates of the joining manager are replaced by the MGMT_CLUSTER (aka VIP) certificates of the cluster being joined.
Prerequisites
- Verify that a certificate is available in the NSX Manager. Note that on a standby Global Manager the UI import operation is deactivated. For details on the import REST API command for a standby Global Manager, refer to Import a Self-signed or CA-signed Certificate.
- The server certificate must contain the Basic Constraints extension
basicConstraints = CA:FALSE
. - Verify that the certificate is valid by making the following API call:
GET https://<nsx-mgr>/api/v1/trust-management/certificates/<cert-id>?action=validate
- Have your node ID string available, if needed. For help locating this information using the UI or the CLI, refer to Finding Node IDs for Certificate API Calls.