Harness
Configuring the integration for Harness
This article explains how to configure the integration for Harness. For instructions on using the integration, including triggering Harness pipelines from a Workflow, see Using the integration for Harness.
Why use the integration for Harness
Harness is where your team builds and deploys software. Connecting it to Cortex ties your delivery pipelines to the services in your catalog, so your CI/CD platform and your system of record stay in sync.
With the Harness integration, you can:
Connect all of your Harness accounts. Cortex supports multiple configurations, so you can connect several Harness accounts and tie each one to entities using its own alias.
Keep internally hosted instances private. Use Cortex Axon Relay to connect a self-managed Harness instance without exposing it to the internet. The relay agent runs in your network and injects your API key locally, so credentials never leave your environment.
Verify your setup before you commit. Test a configuration directly from the settings page to confirm Cortex can reach your Harness account, whether you use a personal access token or a service account token.
Run pipelines from a Workflow. Use the Execute pipeline block to trigger a Harness pipeline as a step in a Cortex Workflow, without building a custom webhook trigger for each pipeline.
Configuring Harness
There are two options for integrating Harness: the default token configuration method and Cortex Axon Relay, a relay broker that allows you to securely connect your internally hosted Harness instance.
Prerequisites
Users with the
Configure Integrationspermission can configure Harness.An API key in Harness. Cortex supports both personal access tokens and service account tokens. For instructions, refer to the Harness API key documentation.
Your Harness account identifier. You can find this in Harness under Account settings, or in your Harness URL.
Configuring Harness with a token
From the main sidebar, expand Integrations, then select Configurations.
Locate Harness, then click Install. The Harness side panel opens.
In the Harness side panel, click Token.
Do the following:
From the Category dropdown, select at least one category that applies to the integration (required).
Under Configuration alias, enter the alias you'll use to tie entity registrations to different configuration accounts (required).
Under Account ID, enter your Harness account identifier (required).
Under API key, enter your Harness API key (required). This can be a personal access token or a service account token.
Under Host, enter the URL of your self-managed Harness instance. If you leave this field blank, Cortex defaults to
https://app.harness.io.
Click Test connection. A successful connection means your integration is configured correctly.
Click Save.
Configuring Harness with Cortex Axon Relay
Use this option if your Harness instance is hosted in your own network and can't be reached directly by Cortex.
From the main sidebar, expand Integrations, then select Configurations.
Locate Harness, then click Install. The Harness side panel opens.
Click Relay.
Do the following:
From the Category dropdown, select at least one category that applies to the integration (required).
Under Configuration alias, enter the alias you'll use to tie entity registrations to different configuration accounts (required).
Under Account ID, enter your Harness account identifier (required).
Under Host, enter the URL of your self-managed Harness instance. If you leave this field blank, Cortex defaults to
https://app.harness.io.
Click Save.
Set up the Axon Relay agent in your network. See Internally hosted integrations for instructions. For Harness, the relay agent routes requests to your Harness instance and injects your API key, so your credentials never leave your network.
On some self-managed Harness instances, the /ng API path is restricted. If the credential check fails with 403, include /gateway in the host URL (e.g., https://harness.example.com/gateway) so the full API path resolves to /gateway/ng/api/projects
Using multiple Harness configurations
The Harness integration supports multiple configurations. To add another:
From the main sidebar, expand Integrations, then select Configurations.
Locate Harness, then click Settings.
In the upper-right corner of the page, click Add configuration.
Follow the steps in either Configuring Harness with a token or Configuring Harness with Axon Relay.
Each configuration requires an alias, which ties entity registrations to a specific account. If no alias is specified, Cortex uses the default configuration. To set a default:
From the main sidebar, expand Integrations, then select Configurations.
Locate Harness, then click Settings.
Click the pencil icon next to the configuration that should be the default.
Toggle on Set as default. If you only have one configuration, it's automatically set as the default.
Last updated
Was this helpful?