> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/v/venafi.md).

# Venafi

Venafi Trust Protection Platform manages machine identities and certificates. OctoXLabs reads the certificate inventory from the policy tree. This gives you expiry dates, issuers and subjects in one place.

## Use cases

* List certificates collected from Venafi.

```
Adapters = venafi
```

## Before you begin

### Network

| Source              | Destination           | Port                        | Protocol |
| ------------------- | --------------------- | --------------------------- | -------- |
| OctoXLabs connector | Venafi Web SDK        | 443 (default, configurable) | HTTPS    |
| OctoXLabs connector | HTTP proxy (optional) | Set in **Proxy**            | HTTP     |

### Required permissions

| Scope or role                       | Permission    | Needed for                                 |
| ----------------------------------- | ------------- | ------------------------------------------ |
| API integration scope `certificate` | Read          | Certificates                               |
| API caller on each policy folder    | View and Read | Certificate objects and their X.509 values |

Read access is enough. No management privilege is required. Without Read permission the response has the certificate objects but not their X.509 values.

## Create credentials in Venafi

{% stepper %}
{% step %}

### Open API Integrations

Sign in to the Venafi web interface. Go to **Platform**, then **API Integrations**.
{% endstep %}

{% step %}

### Create an integration

Create a new integration and note its **Application ID**. This is the Client ID. It is case sensitive.
{% endstep %}

{% step %}

### Grant the scope

Grant the integration the **certificate** scope.
{% endstep %}

{% step %}

### Set folder permissions

Give the API caller **View** and **Read** on every policy folder to scan.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter                   | Required | Type    | Default | Description                                                                                               |
| --------------------------- | -------- | ------- | ------- | --------------------------------------------------------------------------------------------------------- |
| Ip                          | Yes      | Text    |         | Host name or IP address of the Venafi server.                                                             |
| Port                        | No       | Integer | 443     | Port of the Web SDK.                                                                                      |
| Is Secure?                  | No       | Boolean | True    | Use HTTPS.                                                                                                |
| Client ID                   | Yes      | Text    |         | Application ID of the API integration. Case sensitive.                                                    |
| Username                    | Yes      | Text    |         | API caller. Accepts `AD+venqa:Administrator`, `administrator@example.com` or `example.com\Administrator`. |
| Password                    | Yes      | Text    |         | Password of the API caller.                                                                               |
| Per Page                    | No       | Integer | 100     | Certificates per request.                                                                                 |
| Timeout                     | No       | Integer | 30      | Seconds to wait for API responses.                                                                        |
| Fetch Certificate Operation | No       | Boolean | True    | Collect certificates. When off, discovery returns no assets.                                              |
| Proxy                       | No       | Text    | Empty   | HTTP proxy in `host:port` format.                                                                         |

## Troubleshooting

| Error message            | Cause                                                  | Fix                                                                |
| ------------------------ | ------------------------------------------------------ | ------------------------------------------------------------------ |
| Max retries exceeded for | The server kept returning 401 after re-authentication. | Check the client ID, username, password and the certificate scope. |

## Change history

{% hint style="info" %}
Available starting from version 6.7.2.
{% endhint %}
