Skip to main content

Overview

Wirespeed connects to Cloudflare with an account API token so it can:
  • Ingest Access authentication logs: every allowed and denied sign-in to an application protected by Cloudflare Access, including logins through WARP
  • Ingest account audit logs: member, setting, and configuration changes made in the Cloudflare dashboard or API
  • Receive Gateway DNS, HTTP, and network logs, Zero Trust network sessions, WARP toggle and configuration changes, and zone firewall events from Cloudflare Logpush
  • Sync Zero Trust users so they can be targeted for containment
  • Revoke Access sessions for a compromised user, including their enrolled devices and WARP session
During the beta, Cloudflare events are ingested for search and correlation only. They do not raise detections yet.

Prerequisites

Before connecting Cloudflare in Wirespeed, gather:
  • Your Cloudflare Account ID
  • A Cloudflare API token with the permissions below

Create an API Token

  1. In the Cloudflare dashboard, open Manage Account > Account API Tokens. You can also create a user token under My Profile > API Tokens.
  2. Select Create Token, then Create Custom Token.
  3. Add these Account permissions:
  1. Optional: to collect firewall events, also add these Zone permissions:
  1. Under Account Resources, include only the account you are connecting. If you added zone permissions, set Zone Resources to All zones from an account and select the same account.
  2. Create the token and copy it. Cloudflare shows the token only once.
Wirespeed only needs Edit on Access: Organizations, Identity Providers, and Groups to revoke a user’s Access sessions. Cloudflare’s revoke user API accepts no read-level permission. Wirespeed does not change your Zero Trust organization settings, identity providers, or Access groups. If you only want to ingest logs, omit the Access: Organizations, Identity Providers, and Groups permission and enable Read Only when you connect the integration. Cloudflare requires both Logs: Edit and Zero Trust: PII Read to manage Logpush jobs for Zero Trust datasets such as Gateway. The account Administrator role includes Logs: Edit but not Zero Trust: PII Read. See Cloudflare’s Logpush permissions. If you omit either permission, create the Logpush jobs yourself as described in Set up Logpush manually. See Cloudflare’s API token permissions reference for details.

Find Your Account ID

Open the account in the Cloudflare dashboard. The 32-character Account ID appears on the account home page and in the dashboard URL (https://dash.cloudflare.com/<account-id>/...).

Connect Cloudflare in Wirespeed

  1. In Wirespeed, go to Integrations > Add Integration.
  2. Select Cloudflare Zero Trust.
  3. Enter your Account ID and API token.
  4. Optional: under advanced options, enable Read Only to prevent session revocation.
  5. Save the integration.

Validation

When you save the integration, Wirespeed requests one Access authentication log entry. The integration fails to connect if the token is invalid, belongs to another account, or lacks Access: Audit Logs Read. After the integration is enabled, Wirespeed checks each log permission and shows the result on the integration page: The session revocation permission cannot be checked without revoking a user. If it is missing, the revocation fails and the error appears in the integration logs.

Log Collection

Wirespeed polls Access authentication and account audit logs on a schedule and saves its position after each page, so a restart or outage resumes where collection stopped instead of starting over. The first sync collects the previous 7 days. Each poll re-reads the last 10 minutes to catch events Cloudflare indexes late, and skips events it has already ingested. If collection stops after a page is ingested but before its position is saved, that page can be ingested again.

Logpush Logs

Cloudflare only exports Gateway, Zero Trust network session, WARP change, and firewall event logs through Logpush. Wirespeed receives them from a Logpush HTTP destination: one Logpush job per dataset sends to your integration’s webhook URL. Firewall events belong to a zone rather than the account, so they need one job per zone.

Automatic setup

When the API token has Logs: Edit and Zero Trust: PII Read, Wirespeed creates one job per dataset each time the integration is enabled. They are named wirespeed-<dataset> (for example wirespeed-gateway_dns) and use the settings in Set up Logpush manually.
  • If a job for this integration already exists, Wirespeed updates it instead of creating a duplicate, including its destination, so a rotated webhook secret takes effect when you re-enable the integration.
  • Cloudflare offers each dataset only on plans that include it. Datasets outside the account’s plan are skipped, and their Logpush entitlement stays off. The integration logs list which datasets are being sent and which are not on the plan, in one line each time the integration is enabled.
  • If one dataset fails for another reason, the error appears in the integration logs and the other datasets are still set up.
  • If the token lacks either permission, the Logpush Setup entitlement shows a warning and the integration is enabled without the jobs. The integration logs name the missing permission and include Cloudflare’s error. Cloudflare reports a missing Zero Trust: PII Read as reading job for product '<product>' is not allowed (1004).
  • For firewall_events, Wirespeed lists the account’s zones and creates a wirespeed-firewall_events job in each Enterprise zone. Zones on other plans are skipped. The summary line shows how many zones are sending, for example firewall_events (2 of 5 zones). Zones added later are picked up the next time the integration is enabled.
  • Disabling or deleting the integration deletes the wirespeed-* jobs whose destination is this integration. Wirespeed never changes or deletes other Logpush jobs.
Cloudflare validates each destination by uploading a test file to Wirespeed when it creates a job, so the Wirespeed API must be reachable from the internet.

Set up Logpush manually

Use these steps if the token does not have Logs: Edit and Zero Trust: PII Read, or to manage the jobs yourself.

Get the Webhook URL and Secret

  1. In Wirespeed, open the Cloudflare Zero Trust integration and select Webhook Details.
  2. Copy the Receive Logpush Logs webhook URL. It looks like:
  3. Copy the Webhook Secret. Wirespeed rejects Logpush requests that do not send it as Authorization: Bearer <WEBHOOK_SECRET>.

Build the destination

Logpush turns every header_* parameter in the destination URL into a request header, and keeps other parameters on the URL. Append two parameters to the webhook URL:
  • dataset=<DATASET>, one of the dataset names in the table above, which tells Wirespeed which table the logs belong in
  • header_Authorization=Bearer%20<WEBHOOK_SECRET>, which sends the secret. Keep the space URL-encoded as %20.
For Gateway DNS, the destination_conf is:
Each job needs its own destination_conf with the matching dataset.

Create the Logpush jobs

Create the jobs with the Cloudflare API using a token that has the account permissions Logs: Edit (Logs Write) and Zero Trust: PII Read. The integration’s own API token does not need them. Logpush validates the destination when you create the job by uploading a test file, so Wirespeed must be reachable and the secret must be correct; job creation fails otherwise.
Repeat for each dataset, changing name to wirespeed-<dataset>, dataset, the dataset parameter in destination_conf, and field_names.
  • max_upload_bytes: set it to 5000000 (5 MB of uncompressed logs, the smallest batch Logpush allows). Wirespeed accepts deliveries of up to 5 MiB compressed, so a batch of at most 5 MB uncompressed always fits. Logpush allows max_upload_bytes up to 1 GB, but Wirespeed rejects larger deliveries with 413 and records a warning on the integration’s logs, so keep it at 5000000. The jobs Wirespeed creates automatically already use this value. Wirespeed queues each delivery as received, still compressed, and passes it as a whole to its log pipeline, which decompresses it and stores each record. If that hand-off fails, Wirespeed retries the full batch, and a delivery that Cloudflare resends is stored only once.
  • timestamp_format: jobs created through the API default to unixnano. Wirespeed reads every format, but rfc3339 is easier to read in search.
  • field_names: Logpush only sends the fields you list. Use the full lists below so Wirespeed receives every field.
You can also create the jobs in the Cloudflare dashboard: open the account’s Logpush page, select Create a Logpush job, choose HTTP destination, and paste the destination_conf as the endpoint. Select all fields for the dataset. The dashboard does not set max_upload_bytes, so set it afterwards with the update job API. That call replaces output_options entirely, so include them again.
Field lists
Copy the list for each job into output_options.field_names. Deprecated fields are omitted.
gateway_dns
gateway_http
gateway_network
zero_trust_network_sessions
warp_toggle_changes
warp_config_changes
firewall_events
See Cloudflare’s HTTP destination, output options, and dataset field references for details.

User Sync

Wirespeed syncs your Zero Trust users from Cloudflare’s users API so they appear as directory users and can be targeted by Revoke Access Sessions. The sync uses the Access: Audit Logs Read permission and needs nothing extra. Cloudflare adds a user to this list the first time they authenticate, by signing in to an Access application or connecting a WARP device. Users who exist in your identity provider, including users provisioned with SCIM, but have never authenticated are not listed. They have no Access or WARP session to revoke. Wirespeed matches synced users to the same person in your other identity integrations by email. When a user is also synced from an identity provider such as Okta, Wirespeed runs each remediation action through one provider, so revoke the user’s Cloudflare sessions from the Cloudflare directory user when you also need their Access and WARP sessions ended.

Session Revocation

Revoke Access Sessions calls Cloudflare’s revoke user API for the user’s email, and for their Cloudflare user ID when the user was synced. It:
  • Ends all of the user’s active Cloudflare Access sessions
  • Revokes the user’s enrolled devices
  • Requires the user to re-authenticate to WARP for Gateway policies that enforce a WARP session duration
Cloudflare cannot undo a revocation, so there is no release action. The user can sign in again as soon as your identity provider allows it. To keep a compromised user out, also disable the account in your identity provider.

Troubleshooting