> 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/i/imperva-waf-cloud.md).

# Imperva WAF Cloud

Imperva WAF Cloud is the cloud-delivered Imperva web application firewall. OctoXLabs reads the identity management users and the SSL/TLS certificate metadata of the account.

## Use cases

* List the users and certificates OctoXLabs collected from Imperva WAF Cloud.

```
Adapters = imperva-waf-cloud
```

* Check what one connection collected.

```
Connections = YOUR_CONNECTION_NAME
```

## Before you begin

### Network

| Source              | Destination                             | Port | Protocol |
| ------------------- | --------------------------------------- | ---- | -------- |
| OctoXLabs connector | api.imperva.com (or the Domain you set) | 443  | HTTPS    |

### Required permissions

| Scope or role               | Permission | Needed for                        |
| --------------------------- | ---------- | --------------------------------- |
| Account Settings > Users    | Read       | Users (`/v3/idm-users`)           |
| Websites > SSL Certificates | Read       | Certificates (`/v3/certificates`) |

The API key pair inherits the permissions of the Imperva user that created it. Turn off Fetch users if the key has no permission on the Users endpoint.

## Create credentials in Imperva WAF Cloud

{% stepper %}
{% step %}

### Open API keys

In the Cloud Security Console, go to **Account Management** > **API Keys**.
{% endstep %}

{% step %}

### Create a key pair

Create an API key as a user that has the permissions above. Copy the API ID and the API Key.
{% endstep %}

{% step %}

### Find the account ID (optional)

To scope calls to a sub-account, note its account ID (`caid`).
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter             | Required | Type    | Default         | Description                                                        |
| --------------------- | -------- | ------- | --------------- | ------------------------------------------------------------------ |
| Domain                | No       | String  | api.imperva.com | Imperva Cloud API host.                                            |
| API ID                | Yes      | String  | None            | Sent in the `x-API-Id` header.                                     |
| API Key               | Yes      | String  | None            | Sent in the `x-API-Key` header.                                    |
| Sub-account ID (caid) | No       | String  | None            | Scopes calls to a sub-account. Sent as the `caid` query parameter. |
| Proxy                 | No       | String  | None            | Proxy in `host:port` form.                                         |
| Timeout               | No       | Integer | 30              | Seconds to wait for API responses.                                 |
| Fetch users           | No       | Boolean | True            | Fetch IDM users.                                                   |
| Fetch certificates    | No       | Boolean | False           | Fetch certificate metadata.                                        |

At least one of Fetch users and Fetch certificates must stay on. Otherwise validation fails with "At least one of fetch\_users or fetch\_certificates must be True."

## Troubleshooting

| Error message                                                     | Cause                 | Fix                          |
| ----------------------------------------------------------------- | --------------------- | ---------------------------- |
| At least one of fetch\_users or fetch\_certificates must be True. | Both options are off. | Turn on at least one option. |

## Change history

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