You can configure the Cequence Unified API Protection (UAP) platform to export data to Kafka.
Configuring Kafka
Configure Apache Kafka to receive data exported from the Cequence UAP platform.
Deploy or access a Kafka cluster
Set up a Kafka cluster to receive exported data. You can use a managed service or deploy Kafka on your own infrastructure.
- For a managed service, use Confluent Cloud, Amazon MSK, or another cloud provider's managed offering.
- For self-hosted deployment, see the Apache Kafka Quickstart.
- Note the bootstrap server address (hostname and port) for your Kafka cluster.
Create a Kafka topic
Create a topic to store exported data from the Cequence UAP platform.
-
Use the Kafka command-line tool to create a topic.
bin/kafka-topics.sh --create --topic cequence-uap-exports --bootstrap-server broker-host:port --partitions 3 --replication-factor 1
- Adjust the values of the
--partitionsand--replication-factorparameters based on your throughput requirements and infrastructure. -
Verify the topic was created.
bin/kafka-topics.sh --list --bootstrap-server broker-host:port
Optional: Create a user and configure permissions
If your Kafka cluster uses SASL/PLAIN authentication or access control lists, create credentials and assign permissions.
For self-hosted Kafka with ACLs:
-
Create a principal and assign write permissions to the topic.
bin/kafka-acls.sh --authorizer-properties zookeeper.connect=zk-host:port --add --allow-principal User:cequence-uap --operation Write --topic cequence-uap-exports
- Note the username for later use.
For a managed Kafka service:
- Follow your provider's documentation to create a user and assign topic-level produce permissions.
- Note the username and password.
Optional: Configure network access
Ensure your Kafka brokers are reachable from the Cequence UAP environment. Update firewall rules or security groups to allow inbound connections on the Kafka port (default 9092). Restrict access to trusted IP addresses or networks.
Test the connection
Verify that you can write to and read from your Kafka topic. Use the Kafka command-line tools to test connectivity and permissions.
Write a test message to your topic:
bin/kafka-console-producer.sh --broker-list broker-host:port --topic cequence-uap-exports
Type a test message and press Enter. Then read the message back from the topic:
bin/kafka-console-consumer.sh --bootstrap-server broker-host:port --topic cequence-uap-exports --from-beginning --max-messages 1
If the test message appears, your connection and permissions are configured correctly.
Configuring the Cequence UAP platform
After configuring Kafka, configure the Cequence UAP platform to send data.
- Log in to the Cequence UAP platform.
- From the left navigation bar, select Integrations > Data Export.
- In the Add a new integration section, choose a type from the Select a type drop-down.
The new data export dialog appears with the Overview tab selected. - In the Overview tab, type the following information.
- Integration name
- Bootstrap Servers: A comma-separated list of Kafka Broker URLs.
- Sink Topic: Specify a single sink topic.
- Determine which event types you want to export. The following event types are available.
- Risk events
- Bot detection events
- Bot mitigation events
- Audit log events
- For each event type you're exporting, click the corresponding tab, then perform the "Defining event criteria and export fields" procedure following this procedure.
- Verify that the Enable Integration toggle is on. Click Save.
Defining event criteria and export fields
This procedure applies when you are currently defining a new data export integration in the Cequence UAP platform and have already configured the Overview tab.
- Locate the event type section you want to configure.
The following event types are available.- Risk Events
- Bot Detection Events
- Bot Mitigation Events
- Audit Log Events
- Enable the event type toggle.
- In Event Criteria, click the pencil icon.
The criteria builder appears. - In the Criteria pane, choose OR (match any) or AND (match all).
- Choose a field, a condition, and a value.
For example,country(field)equals(condition)mx(value), orMethod does not equal GET. - To define another criterion, repeat the previous step.
- Click Add.
- In the Export Fields section, click the pencil icon.
The field selector appears. - Select individual fields, or click Select all.
Type a string in the search field to filter fields. - Choose a transformation from the drop-down for each selected field.
The following transformations are available.- hash
- show only last 4 characters
- format preserving encryption (FPE)
- None
- Click Set.
- Enter the transformation script.