HubSpot Connector

The HubSpot connector lets you synchronize HubSpot contacts and companies with managed objects in an Identity Cloud repository.

This chapter describes how to install and configure the HubSpot connector and how to perform basic tests to ensure that it’s running correctly.

Before you configure the HubSpot connector, you must have a client app in HubSpot, with the corresponding clientID, clientSecret and refreshToken.

Install and Configure the HubSpot Connector

Install the HubSpot Connector

  1. Download the connector .jar file from the ForgeRock BackStage download site.

    1. If you are running the connector locally, place it in the /path/to/openidm/connectors directory, for example:

      mv ~/Downloads/hubspot-connector-1.5.2.0.jar /path/to/openidm/connectors/
    2. If you are using a remote connector server (RCS), place it in the /path/to/openicf/connectors directory on the RCS.

Configure the HubSpot Connector

If you had already started Identity Cloud (or your RCS) before copying the connector .jar file to the connectors directory, you must restart the server for the connector to be loaded.

+

  1. Create a connector configuration by using the Admin UI:

    Select Configure > Connectors > New Connector and select HubSpot Connector - 1.5.2.0 as the connector type.

  2. Adjust the configurationProperties to match your HubSpot application details. You must provide a clientId, clientSecret, and refreshToken. Other properties are optional:

    "configurationProperties" : {
        "clientId" : "daa533ae-xxxx-xxxx-xxxx-6e66d84e6448",
        "clientSecret" : "c598a365-xxxx-xxxx-xxxx-24b32b6ae04d",
        "refreshToken" : "f37e1132-xxxx-xxxx-xxxx-4b9e724ce4a0",
        "acceptSelfSignedCertificates" : true,
        "readSchema" : "true",
        "disableHostNameVerifier" : false,
        "maximumConnections" : "10",
        "permitsPerSecond" : "10",
        "httpProxyHost" : null,
        "httpProxyPort" : null
    }

    Identity Cloud encrypts the clientSecret and refreshToken as soon as the connector is enabled.

  3. Enable the connector and save the connector configuration.

  4. When your connector is configured correctly, the connector displays as Active in the UI.

    Alternatively, test the configuration over REST by running the following command:

    curl \
    --header "Authorization: Bearer *token*" \
    --header "Accept-API-Version: resource=1.0" \
    --request POST \
    "https://tenant-name.forgeblocks.com/openidm/system?_action=test"
    [
      {
        "name": "hubspot",
        "enabled": true,
        "config": "config/provisioner.openicf/hubspot",
        "connectorRef": {
          "bundleVersion": "[1.5.19.0,1.6.0.0)",
          "bundleName": "org.forgerock.openicf.connectors.hubspot-connector",
          "connectorName": "org.forgerock.openicf.connectors.hubspot.HubspotConnector"
        },
        "displayName": "Hubspot Connector",
        "objectTypes": [
          "company",
          "contactProperties",
          "ALL",
          "companyProperties",
          "contact"
        ],
        "ok": true
      }
    ]

    A status of "ok": true indicates that the connector can connect to HubSpot.

Implementation Specifics

For PATCH requests, a connector can potentially add, remove, or replace an attribute value. The HubSpot connector does not implement the add or remove operations, so a PATCH request always replaces the entire attribute value with the new value.

Using the HubSpot Connector With a Proxy Server

If the Identity Cloud server is hosted behind a firewall and requests to the resource provider are routed through a proxy, you must specify the proxy host and port in the connector configuration.

To specify the proxy server details, set the httpProxyHost, and httpProxyPort properties in the connector configuration. For example:

"configurationProperties": {
    ...
    "httpProxyHost": "myproxy.home.com",
    "httpProxyPort": 8080,
    ...
}

OpenICF Interfaces Implemented by the Hubspot Connector

The Hubspot Connector implements the following OpenICF interfaces.

Create

Creates an object and its uid.

Delete

Deletes an object, referenced by its uid.

Schema

Describes the object types, operations, and options that the connector supports.

Script on Connector

Enables an application to run a script in the context of the connector. Any script that runs on the connector has the following characteristics:

  • The script runs in the same execution environment as the connector and has access to all the classes to which the connector has access.

  • The script has access to a connector variable that is equivalent to an initialized instance of the connector. At a minimum, the script can access the connector configuration.

  • The script has access to any script-arguments passed in by the application.

Search

Searches the target resource for all objects that match the specified object class and filter.

Test

Tests the connector configuration. Testing a configuration checks all elements of the environment that are referred to by the configuration are available. For example, the connector might make a physical connection to a host that is specified in the configuration to verify that it exists and that the credentials that are specified in the configuration are valid.

This operation might need to connect to a resource, and, as such, might take some time. Do not invoke this operation too often, such as before every provisioning operation. The test operation is not intended to check that the connector is alive (that is, that its physical connection to the resource has not timed out).

You can invoke the test operation before a connector configuration has been validated.

Update

Updates (modifies or replaces) objects on a target resource.

Hubspot Connector Configuration

The Hubspot Connector has the following configurable properties.

Basic Configuration Properties Properties

Property Type Default Encrypted [1] Required [2]

clientId

String

null

Yes

Client ID of the OAuth application in Hubspot

clientSecret

GuardedString

null

Yes
Yes

Client Secret for the preceding Client ID

refreshToken

GuardedString

null

Yes
Yes

Refresh token for application in Hubspot

Advanced Connection Properties Properties

Property Type Default Encrypted [3] Required [4]

acceptSelfSignedCertificates

boolean

false

Yes

Specifies whether the HubSpot server should accept self-signed certificates. Defaults to false.

readSchema

Boolean

false

Yes

If false, the Hubspot connector provides a default schema for Hubspot contacts and companies

disableHostNameVerifier

boolean

false

Yes

If hostname verification is disabled, the HubSpot server accepts connections from any host. Defaults to false.

maximumConnections

Integer

10

Yes

Maximum number of simultaneous connections to HubSpot.

permitsPerSecond

Integer

10

Yes

Number of Api calls to be made per second

httpProxyHost

String

null

Yes

Specifies the Hostname if an HTTP proxy is used between the connector and HubSpot. Defaults to null.

httpProxyPort

Integer

null

Yes

Specifies the Port number if an HTTP proxy is used between the connector and HubSpot . Defaults to null.


1. Indicates whether the property value is considered confidential, and therefore encrypted in OpenIDM.
2. A list of operations in this column indicates that the property is required for those operations.
3. Indicates whether the property value is considered confidential, and therefore encrypted in OpenIDM.
4. A list of operations in this column indicates that the property is required for those operations.