> For the complete documentation index, see [llms.txt](https://docs.cortex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cortex.io/ingesting-data-into-cortex/integrations/harness.md).

# Harness

{% hint style="info" %}
Cortex connects to many third-party vendors whose system interfaces frequently change. As a result, integration behavior or configuration steps may shift without notice. If you encounter unexpected issues, check with your system administrator or refer to the vendor's documentation for the most current information. Additionally, integration sync times vary and are subject to scheduling overrides and timing variance.
{% endhint %}

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](/ingesting-data-into-cortex/integrations/harness/using-the-integration-for-harness.md).

## 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

1. Users with the `Configure Integrations` permission can configure Harness.
2. An API key in Harness. Cortex supports both personal access tokens and service account tokens. For instructions, refer to the [Harness API key documentation](https://developer.harness.io/docs/platform/automation/api/add-and-manage-api-keys/).
3. Your Harness account identifier. You can find this in Harness under **Account settings**, or in your Harness URL.

### **Configuring Harness with a token**

1. From the main sidebar, select **Integrations**.
2. Locate Harness, then click **Install**. The Harness side panel opens.
3. In the Harness side panel, click **Token**.
4. Do the following:
   1. From the **Category** dropdown, select at least one category that applies to the integration (required).
   2. Under **Configuration alias**, enter the alias you'll use to tie entity registrations to different configuration accounts (required).
   3. Under **Account ID**, enter your Harness account identifier (required).
   4. Under **API key**, enter your Harness API key (required). This can be a personal access token or a service account token.
   5. Under **Host**, enter the URL of your self-managed Harness instance. If you leave this field blank, Cortex defaults to `https://app.harness.io`.
5. Click **Test connection**. A successful connection means your integration is configured correctly.
6. 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.

1. From the main sidebar, select **Integrations**.
2. Locate Harness, then click **Install**. The Harness side panel opens.
3. Click **Relay**.
4. Do the following:
   1. From the **Category** dropdown, select at least one category that applies to the integration (required).
   2. Under **Configuration alias**, enter the alias you'll use to tie entity registrations to different configuration accounts (required).
   3. Under **Account ID**, enter your Harness account identifier (required).
   4. Under **Host**, enter the URL of your self-managed Harness instance. If you leave this field blank, Cortex defaults to `https://app.harness.io`.
5. Click **Save**.
6. Set up the Axon Relay agent in your network. See [Internally hosted integrations](/ingesting-data-into-cortex/integrations/axon-relay.md) 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.

{% hint style="warning" %}
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`
{% endhint %}

### Using multiple Harness configurations

The Harness integration supports multiple configurations. To add another:

1. From the main sidebar, select **Integrations**.
2. Locate Harness, then click **Settings**.
3. In the upper-right corner of the page, click **Add configuration**.
4. Follow the steps in either [Configuring Harness with a token](#configuring-harness-with-a-token) or [Configuring Harness with Axon Relay](#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:

1. From the main sidebar, select **Integrations**.
2. Locate Harness, then click **Settings**.
3. Click the **pencil icon** next to the configuration that should be the default.
4. Toggle on **Set as default**. If you only have one configuration, it's automatically set as the default.
