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

# Imperva

### Authentication

To authenticate Imperva connector, an API Key is required. To obtain this key, log in to your Imperva account and navigate to **Account** > **My Profile** > **API Keys**. Click on "Add API Key" to generate a new key. Enter a name (and optionally otherparameters) for the API Key and click on "Create".

![API Keys](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-4e0b70f21a122dc91d0f59983595eecd33be02ec%2Fimperva1.png?alt=media)

Take note of the API ID and API Key. You will need these to authenticate the connector.

![API Keys](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-557c1153a1b4272edf4cad94c41246a32ab9ebc6%2Fimperva2.png?alt=media)

You can also view the API Key details in the API Keys section.

![API Keys](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-1191567be4085f069f464b3c62d85c8359f88f86%2Fimperva3.png?alt=media)

In the Imperva connector authentication window, use your Imperva API ID and API Key to log in.

![API Keys](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-3d1f11512125f06e3cc0c0ee9e7519c5e368fb3c%2Fimperva4.png?alt=media)

## Backoffice configuration

No Backoffice configuration is required. Each user enters the API ID and API Key when connecting the account. The connector reads optional keys that tune the **SetBlockIPRule** component and the background job that removes expired IP blocks.

Configuration ID: `appmixer:imperva` (Backoffice → Configuration; see [Connector Configuration](https://docs.appmixer.com/getting-started/services) for how a configuration is created and how its keys reach the connector).

* `blockIpMaxIpsAllowed` — Optional. The maximum number of IP addresses that one **SetBlockIPRule** call accepts. Default `1000`.
* `blockIpMaxIpsPerRule` — Optional. The maximum number of IP addresses the connector puts into one Imperva block rule. Default `20`.
* `blockIpMaxRulesInImperva` — Optional. The maximum number of custom rules the connector creates in Imperva. Default `500`. See [Imperva rule limits](https://docs.imperva.com/bundle/cloud-application-security/page/rules/create-rule.htm).
* `blockIpMaxParallelRequests` — Optional. The maximum number of requests to the Imperva API that run at the same time. Default `5` when rules are created, `10` in the job that removes expired blocks.
* `ruleDeleteJobSchedule` — Optional. Cron expression (with seconds) of the job that removes expired IP blocks from the rules. Default `*/10 * * * * *` (every 10 seconds).
* `ruleDeleteJobLockTTL` — Optional. How long, in milliseconds, one run of that job holds its lock. Default `10000` (10 seconds).

The same keys can be set with the CLI (`-u` updates the existing configuration instead of creating it):

```bash
appmixer service-config set appmixer:imperva -u -d '{
  "blockIpMaxIpsPerRule": 20,
  "blockIpMaxRulesInImperva": 500
}'
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appmixer.com/connector-configuration/imperva.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
