Steps to re-create embedded connector in vIDM
search cancel

Steps to re-create embedded connector in vIDM

book

Article ID: 374867

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Creating/Adding an embedded or Internal connector in vIDM UI.

Environment

VMware Identity Manager 3.3.x

Cause

When a connector is accidentally removed or deleted in VMware Identity Manager, it needs to be restored and activated through the API. This article outlines the steps to obtain the necessary tokens, activate the connector, and integrate it within the VMware Identity Manager.

Resolution

Prerequisites

  • You have valid snapshots or backups for the VMware Identity Manager 3.x appliances in the cluster.

Procedure: Generate an Activation Code for the VMware Identity Manager Connector

  • Log in to the VMware Identity Manager console as the System domain user and use the POSTMAN, curl, or connector.sh options to activate the embedded connector while re-adding using below steps.

Delete the old connector and generate a new activation code

    1. Click the Identity & Access Management then click Setup.
    2. On the Connectors page, click Add Connector.
    3. Enter a name for the connector.
    4. Click Generate Activation Code.
    5. The activation code displays on the page. Copy the activation code click OK to save it.
    6. Once you have the activation code generated from the above pop-up, you can use below request to activate the connector.

Using the Bash script

Note: It is recommended to use this method due to the complexity of using Postman or curl.

  1. Download the bash script - connector.sh attached on the KB and upload it to Aria Suite Lifecycle appliance as it has jq and curl utilities preinstalled.
  2. Follow the steps outlined in the "Using Postman" section to retrieve the activation code from the vIDM UI.
  3. Enable execution permission for the script using the command "chmod +x connector.sh" and run the script using the command "./connector.sh".
    During execution, the script will prompt you to input the following information:
    • vIDM Load Balancer Fully Qualified Domain Name (FQDN)
    • vIDM Node Fully Qualified Domain Name (FQDN)
    • Connector Activation Code
    • Admin Password
  4. Compare the response of the API under "Activation API response:" of the script output with the sample response provided in the "Using Postman" section to ensure the API call was successful.

Using Postman

  1. Step 1: Acquire the HZN Token

    Make a POST request to the following URL to acquire the HZN session token.

    URL: https://<VIDM Node FQDN>/SAAS/API/1.0/REST/auth/system/login

    Method: POST
    Headers:
    Accept: application/json; charset=utf-8
    Content-Type: application/json
    
    Example Request Body:
    {
        "username": "admin",
        "password": "adminpassword",
        "issueToken": "true"
    }
    
    Example Response:
    {
        "id": null,
        "sessionToken": "eywxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...",
        "firstName": null,
        "lastName": null,
        "admin": false
    }
  2. Step 2: Activate the Connector

    Once you have the HZN token, use it in the Authorization header of the following API call to activate the connector.

    URL:

    POST https://<connectorHost>:8443/hc/API/1.0/REST/connectormanagement/connector/activate/

    Headers:

    Content-Type: application/vnd.vmware.horizon.manager.connector.management.activate.connector+json
    Authorization: HZN <token from Step 1>

    Body:

    {
    "activationToken":"ID5",
    "adminPassword":"ID6",
    "gatewayHostname":"ID7"
    }

    Success Response Status: A status of 200 OK indicates success.

    Sample Response:

    {
    "isSuccess":true,
    "redirectUrl":"<connector worker URL>",
    "message":"Successfully activated the Connector.",
    "tenantStateId":{"tenant":"<Tenant Id>","connector":"<connector worker Id>"}
    }

Using cURL

Alternatively, you can use the following cURL command. Replace the ID placeholders using the legend below.

curl --location 'https://ID1:8443/hc/API/1.0/REST/connectormanagement/connector/activate/' \
--header 'Authorization: HZN ID2' \
--header 'Content-Type: application/vnd.vmware.horizon.manager.connector.management.activate.connector+json' \
--header 'Accept: application/json' \
--header 'Cookie: JSESSIONID=ID3; trutid=ID4' \
--data '{
"activationToken":"ID5",
"adminPassword":"ID6",
"gatewayHostname":"ID7"
}'

Legend:

  • ID1: vIDM IP address
  • ID2: HZN Cookie or Bearer Token (from Postman Step 1)
  • ID3: JSESSIONID
  • ID4: VIDM tenant ID
  • ID5: Connector activation token
  • ID6: Default Admin Password
  • ID7: vIDM host_name/LB_FQDN

Additional Information

Upon successful execution, a 200 response code will be returned.
The connector will now be visible in the Admin UI.
Complete the integration by adding the connector under workspace_IDP for directory connection or authentication in the Admin UI.

Attachments

connector.sh get_app