Purpose
The Cloudflare integration enables AirMDR to authenticate with Cloudflare and access account- or zone-level configuration and security context required for alert enrichment, investigation, and workflow automation. Depending on the use case, AirMDR may use either a legacy Global API Key with the account email, or a scoped API Token with specific permissions. Cloudflare recommends using API tokens whenever possible because they are more secure and more narrowly scoped than Global API Keys.✅ Prerequisites
Ensure you meet these prerequisites before starting:- Access to a Cloudflare account with administrative privileges.
- At least one domain (zone) added to your Cloudflare account.
- Access to the required account and zone.
- Permission to create:
- API Tokens, or
- Access legacy Global API Key
- Secure storage for the generated credentials
Supported Versions
Supported Versions
| Component | Supported Version |
|---|---|
| Cloudflare Dashboard | Supported |
| Cloudflare API | Current supported API |
| AirMDR Platform | Current supported cloud deployments |
Authentication
Authentication
AirMDR supports the following Cloudflare authentication inputs, depending on the integration workflow:
| Credential | Description |
|---|---|
| Authentication Email | Email address of the Cloudflare user account |
| Authentication API Key | Cloudflare Global API Key (legacy authentication) |
| API Token | Scoped Cloudflare API token |
| Account ID | Unique identifier of the Cloudflare account |
| Zone ID | Unique identifier of the Cloudflare zone |
🔑 Cloudflare Integration Guide: Global API Key, Email, Account ID, and Zone ID
This guide outlines the process of retrieving key credentials from your Cloudflare dashboard for integration with external tools and APIs.Retrieve Your Cloudflare Account ID
- From the main dashboard, select any of your active domains.
- In the left-hand sidebar, scroll down and click Overview (if not already selected).
- In the right-side panel (under “API”), locate your Account ID.
- Click Copy to save it.
Generate a Global API Key
To generate an Global API key in the Cloudflare Platform for integrating with AirMDR, follow these steps:Sign In to Cloudflare
- Go to Cloudflare dashboard.
- Enter your login credentials and sign in.
Retrieve Your Authentication Email
Your authentication email is the email address you use to log into Cloudflare.
It will appear in the top-right corner of the dashboard once you’re logged in.This email is used along with your API key when authenticating API requests.
It will appear in the top-right corner of the dashboard once you’re logged in.This email is used along with your API key when authenticating API requests.
- Log in to the Cloudflare dashboard.
- Click your profile icon in the top-right corner.
- Open your profile settings.
- Note the email address associated with the account.
Use only this value as the Authentication Email when AirMDR requires legacy Global API Key authentication
Generate the Global API Key (Authentication API Key)
- From the dashboard, click your profile icon in the top-right corner.
- Select My Profile → Go to the API Tokens tab.
- Under API Keys section, locate Global API Key and click View.
- Enter your password to confirm.
- Click Copy to store the key securely.
The Global API Key grants full account access.
Retrieve Your Cloudflare Zone ID (Optional)
- From the Overview tab of your selected domain (zone):
- Scroll down to the section titled API or Zone ID.
- Locate the Zone ID and click Copy.
The Zone ID uniquely identifies your domain within Cloudflare.
Email the Admin API key, Authentication Email, Cloudflare Account ID, and Cloudflare Zone ID to AirMDR
or
Self configure OpenAI in the AirMDR Integrations Dashboard.
or
Self configure OpenAI in the AirMDR Integrations Dashboard.
✅ Summary
| Credential | Description |
|---|---|
| Authentication Email | Your Cloudflare login email |
| Global API Key / Token | Used to authenticate API requests |
| Account ID | Unique ID for your Cloudflare account |
| Zone ID (Optional Requirement only) | Unique ID for each domain (zone) added to Cloudflare |
Post-Setup Security Best Practices (Optional)
- Store credentials in environment variables or secrets managers.
- Rotate Global API keys/API tokens regularly and revoke unused tokens immediately.
- Support
- For Cloudflare account and API token issues, refer to Cloudflare API and account documentation. For AirMDR integration issues, contact AirMDR Support.
Skills Provided by this Integration
| Skill ID | Purpose |
|---|---|
| Get Cloudflare Security Center Insights | Fetches security insights from Cloudflare Security Center for accounts or zones. |
| Get Cloudflare Audit Logs | Fetches audit logs from Cloudflare accounts showing changes and activities. |
| Cloudflare Get Account Audit Logs for Detections | This skill retrieves audit logs from Cloudflare for detection purposes. It supports filtering by actor email/IP, time ranges, zones, and pagination to identify security-related activities and configuration changes. |
| List Cloudflare Access Applications | Lists Cloudflare Access applications for accounts or zones with rich filters. |
| Get Cloudflare Zone Details | Gets Cloudflare zones with optional filters or a specific zone by ID. |
| Create Cloudflare Ruleset Rule | Creates a new rule within a Cloudflare ruleset for accounts or zones. |
Test Cloudflare Authentication
SamplecURL Requests to Test Cloudflare Authentication
YOUR_ACCOUNT_IDwith your actual Cloudflare Account IDYOUR_EMAIL@example.comwith your Cloudflare account emailYOUR_GLOBAL_API_KEYwith your Global API Key.
Sample JSON Response
Sample JSON Response
Error Handling
| Error | Cause | Resolution |
|---|---|---|
| Invalid API Key | Incorrect Global API Key | Recheck the Global API Key in My Profile |
| Invalid Authentication Email | Wrong Cloudflare account email | Confirm the login email used in Cloudflare |
| Invalid API Token | Token expired, revoked, or missing scope | Recreate the token with the correct permissions |
| Account ID not found | Wrong account selected | Verify the account from Account Home or Workers & Pages |
| Zone ID not found | Wrong zone selected | Verify the zone from the Overview page |
| Permission denied | Token lacks required permissions | Update token scopes and retry |
Configure Cloudflare in the AirMDR Integrations Dashboard
- Navigate to AirMDR, provide the credentials, and click Login
- Navigate to the AirMDR Integrations Dashboard in the left navigation pane and select Integrations.
- Use the search option, enter the keyword “Cloudflare”, select the Connections tab, and click Add New Connection.
- Enter an unique name to the Instance (e.g.,
your org name-Cloudflare) and brief Description to easily identify the user connection by AirMDR. - Enter the generated Authentication API Key (Global API Key), and retrieved Authentication Email, Cloudflare Account ID, Cloudflare Zone ID and Expiry (optional) in the Authentication Details field params, and click Save.

