# Upguard

UpGuard is an integrated risk platform with capabilities for third-party security ratings, security assessment questionnaires, and vendor risk management.

The Relyance Upguard integration helps with a) understanding the vendors stored in Upguard and b) syncing vendor statuses in Upguard with Relyance. It currently only supports syncing statuses with custom fields in Upguard.

In order to integrate Upguard with Relyance AI, you will need an **API Key.**

#### In Upguard:

![Screenshot 2023-10-18 at 4.08.51 PM.png](https://assets.relyanceuat.xyz/images/docs/34945606616717/34945606603149.png)
You'll need first to create an API Key.

1. Login to your Upguard account.
2. Click on the **Settings** option under **Account**.

3. Navigate to the **API** tab and create a new **API key** for Relyance. You will need this API key in the Relyance configuration.

![Screenshot 2023-10-18 at 4.09.56 PM.png](https://assets.relyanceuat.xyz/images/docs/34945606616717/34945597792269.png)

#### In the Relyance AI application:

1. Login to your Relyance account.
2. Navigate to the **Settings** (bottom-left corner).
3. Select **Integrations**.
4. Search and locate the **Upguard** integration card and click on it.
5. Click on the **Add Connection** button on the top right
6. Provide a meaningful name for the integration and click on the **Add** button
7. In the **Overview** section, select the integration features you wish to enable for the integration, review the **Scope and Permission**, and **Endpoint** details and click on **Continue**. For more details, see [Integration Features](/docs/introduction-to-relyance-ai/integration-features/)
8. In the **Connection** section, provide the appropriate values and click on **Continue**,

![Screenshot](https://assets.relyanceuat.xyz/images/docs/34945606616717/34945597793037.png)

![Screenshot](https://assets.relyanceuat.xyz/images/docs/34945606616717/34945606608397.png)

9. In the Authentication section, provide the **API Key** and to configure Relyance to sync vendor statuses, click on the "Vendor Status map" to edit the JSON.
    - For *status_field_name,*input the custom field name in Upguard that tracks vendor status.
    - For status_map, input the status values from Upguard against the four status values in Relyance: active, terminated, onboarding, and offboarding. Relyance will use these values from Upguard to match statuses.
    - If there are any status values you want Relyance to ignore, specify them in the *ignore* section.

    ![Screenshot 2023-10-18 at 4.14.16 PM.png](https://assets.relyanceuat.xyz/images/docs/34945606616717/34945597794189.png)

    ![Screenshot](https://assets.relyanceuat.xyz/images/docs/34945606616717/34945606609677.png)

10. Review the configuration summary from the Completion section and click on Finish.
11. Confirm the integration Status reflects Connected

![Screenshot](https://assets.relyanceuat.xyz/images/docs/34945606616717/34945606610701.png)

The **Authentication** step asks for:

- **API Key**: required; held as a secret.

<!-- terraform-examples:begin (generated from the integration catalog; do not hand-edit) -->

## Manage this integration with Terraform

Connections for this integration can be managed as code with the [Relyance Terraform provider](https://registry.terraform.io/providers/Relyance/relyance/latest). Non-secret fields go in `auth.params`; secret fields go in `auth.secrets_wo`, which is write-only — never stored in Terraform state. Rotate secrets by bumping `auth.secrets_wo_version`.

```hcl
resource "relyance_integration_connection" "upguard" {
  vendor = "upguard"
  name   = "<your connection name>"

  auth = {
    method = "api-key"
    params = {
      data_storage_location = "us"
    }
    # Secret fields are write-only: sent to Relyance, never stored in state.
    secrets_wo = {
      api_key = var.upguard_api_key
    }
    secrets_wo_version = 1
  }

  scans = { "vendor-discovery" = { enabled = true } }
}
```

<!-- terraform-examples:end -->
