PowerVCF – Request Signed Certificates from Microsoft Certificate Authority (Part 4)

This is the fourth of five blog posts that discusses the process of Certificate Management with VMware Cloud Foundation.

In this post we will look at the process of requesting the signed certificates from the Microsoft Certificate Authority using SDDC Manager.

Generate Signed Certificates using the User Interface

The following procedure demonstrates the process through the SDDC Manager User Interface.

Procedure

  • In the Virtual Infrastructure (VI) window, select MGMT from the Domain column.
  • Select the Security tab.
  • Select the checkbox in the table header to select all resource types and click Generate Signed Certificates.

NOTE: If you have not completed the Generate CSR step then the Generate Signed Certificates option is not available. See my PowerVCF – Generate Certificate Signing Request (CSR) Files for Each Component Managed by SDDC Manager (Part 3) post.

  • In the Generate Certificates dialog, using the Select Certificate Authority dropdown and select Microsoft, then click Generate Certificates.

Once complete the User Interface is updated with a status message of Certificate Generation is successful.

Generate Signed Certificates using using PowerVCF

The following procedure demonstrates the process through PowerVCF.

Assumption: You have already installed or imported PowerVCF on your system.

Procedure

Before performing any operations on SDDC Manager using PowerVCF you must enter the credentials, the PowerVCF cmdlet Connect-VCFManager takes these credentials and stores them as a base64 string which is then used for each subsequent cmdlet. Enter the following syntax.

Connect-VCFManager -fqdn lax01mgr01.lax.rainpole.local -username admin -password "VMw@re1!"

The process of generating the signed certificates via PowerVCF requires passing a JSON spec containing the required input details as follows:

{
    "caType": "",
    "resources": [ {
        "fqdn": "",
        "name": "",
        "resourceId": "",
        "type": ""
    } ]
}

The caType element supports only Microsoft or OpenSSL. In this example we will enter Microsoft as follows.

{
    "caType": "Microsoft",
    "resources": [ {
        "fqdn": "",
        "name": "",
        "resourceId": "",
        "type": ""
    } ]
}

Next we need to populate the resources part of the JSON spec for each component we want to generate the certificate for. To achieve this we need the following four elements of information for each component (just like we did for generating the CSR files):

  • fqdn – The fully distinguished domain name as it relates to the information stored in the SDDC Manager inventory.
  • name – The hostname which can be derived from the fqdn
  • resourceId – The unique id assigned to the component and stored in the SDDC Manager inventory.
  • type – The flag to identify what type of component the resources is, SDDC Manager has the following resource types SDDC_MANAGER, PSC, VCENTER, NSX_MANAGER, NSXT_MANAGER, VRA, VRLI, VROPS, VRSLCM, VXRAIL_MANAGER

In this example we are going to include VCENTER and SDDC_MANAGER resource types, and using the Get-VCFvCenter and Get-VCFManager cmdlets we can obtain the fqdn and resourceIds details.

First lets look at the Get-VCFvCenter cmdlet. Enter the following syntax:

Get-VCFvCenter | select id,fqdn

Using the select command we can return just the id and fqdn details which is all we need for the JSON spec, using this information we can now build the resource section like this:

{
    "caType": "Microsoft",
    "resources": [ {
        "fqdn": "lax01m01vc01.lax.rainpole.local",
        "name": "lax01m01vc01",
        "resourceId": "a0652869-dc9b-426a-a9f6-f2866830dceb",
        "type": "VCENTER"
    } ]
}

Next we want to do the same for SDDC Manager using the Get-VCFManager cmdlet. Enter the following syntax:

Get-VCFManager | select id,fqdn

Add this additional information to our JSON spec file as follows, and then save the file in this example I call it requestCertificateSpec.json.

{
    "caType": "Microsoft",
    "resources": [ {
        "fqdn": "lax01m01vc01.lax.rainpole.local",
        "name": "lax01m01vc01",
        "resourceId": "a0652869-dc9b-426a-a9f6-f2866830dceb",
        "type": "VCENTER"
    },{
        "fqdn": "lax01mgr01.lax.rainpole.local",
        "name": "lax01mgr01",
        "resourceId": "41290562-a6a5-4d3b-8f3c-25b0dd5535f6",
        "type": "SDDC_MANAGER" 
    } ]
}

Now we have our JSON spec ready we can perform the process of creating the signed certificates using the Request-VCFCertificates cmdlet. When executing this cmdlet we need to provide two inputs, first the name of the Workload Domain, in this example we are using MGMT and the json file we have just created. Enter the following syntax:

Request-VCFCertificate -domainName MGMT -json E:\MyLab\requestCertificateSpec.json

After executing this command you are presented with a response which relates to a Task ID and the status of the request, you can check the status of the request using the Get-VCFTask cmdlet. Enter the following synatx:

Get-VCFTask 4b8f38fc-3c8f-4df5-9228-639a5af5b5d3 | select id,name,status

Here we can see a task is named Certificate Operation: GENERATE_CERTIFICATE and it has a status of SUCCESSFUL. So there you have it we have successfully generated the signed certificates using PowerVCF.

If you would like to learn more about VMware Cloud Foundation or PowerVCF, check out these links:

4 thoughts on “PowerVCF – Request Signed Certificates from Microsoft Certificate Authority (Part 4)

  1. Pingback: PowerVCF – Introduction to Certificate Management with VMware Cloud Foundation – My Cloudy World

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s