Using CA-signed Certificates with SAN Attribute in NSX 4.x – API Method

In my last post on the NSX SSL certificate rotation, I discussed the types of certificates in NSX and why you should use a certificate with a SAN attribute. The ability to generate a CSR with Subject Alternative Names was first introduced in NSX v4.2. Before NSX v4.2, creating certificates with SAN attributes was possible only through API. This post is focused on demonstrating the certificate generation and replacement procedure through API.

Step 1: Create Certificate Signing Request
Step 2: Fetch the ID of the CSR
The CSR ID can be fetched from the response output of the previous API or using the GET call as shown below.
Step 3: Extract the CSR’s PEM Content
Save the extracted content of the CSR in a text editor and save the file with a PEM extension.
Step 4: Request Signed Certificate
Send the PEM file to the registrar/CA server and ask the registrar for the signed certificate (NSX) and certificate authority root/intermediate certificate.
Step 5: Create Certificate Chain
Create a new PEM file by appending the contents of the signed certificate followed by the content of the root/intermediate certificate.

Step 6: Upload Signed Certificate

If you are using Postman, you can attach the PEM file as shown below

The response output of the above API call returns the ID of the signed certificate. 

Step 7: Validate the Signed Certificate
Step 8: Apply the Signed Certificate
Apply certificate to NSX Cluster VIP

Apply certificate to NSX Manager nodes

Node IDs can be fetched using the below GET call
Step 9 (Optional): Delete CSR

And that’s it for this post.

I hope you enjoyed reading this post. Feel free to share this on social media if it is worth sharing.

Leave a ReplyCancel reply