Skip to content
Last updated

Cloudflare integration

Cloudflare is a global cloud platform that provides CDN, DNS, DDoS protection, and security services for websites and applications. The Cloudflare integration allows your application to connect to Cloudflare through Frontegg, enabling users to manage zones, DNS records, firewall rules, caching, analytics, and Workers — all through a secure API token connection.


Prerequisites

  • A Cloudflare account (free or paid plan)
  • At least one zone (domain) added to your Cloudflare account, if you need zone-level access

Connect Cloudflare

Step 1: Log in to the Cloudflare dashboard

Navigate to dash.cloudflare.com and log in with your Cloudflare account credentials.

Cloudflare dashboard home page

Step 2: Open the API tokens page

Click on the user icon in the top-right corner and select My Profile, then click API Tokens in the left sidebar. Alternatively, navigate directly to dash.cloudflare.com/profile/api-tokens.

Click Create Token to begin creating a new API token.

Cloudflare API Tokens page with Create Token button highlighted

Step 3: Select custom token

On the token creation page, find the Custom token section at the top and click Get started next to Create Custom Token. This allows you to configure specific permissions for the integration.

Create API Token page with Create Custom Token highlighted

Step 4: Configure the token

Set the following fields:

  1. Token name - Enter a descriptive name such as Frontegg Integration.
  2. Permissions - Add the required permissions using the dropdowns. Select the resource type, permission, and access level for each entry. Click Add more to add additional permissions.

Custom token creation form with name and permissions

Step 5: Configure permissions

Add the following permissions by clicking Add more for each additional row. Each permission requires three selections: resource type, permission name, and access level.

ResourcePermissionAccess level
ZoneZoneRead
ZoneDNSEdit
ZoneCache PurgePurge
ZoneFirewall ServicesRead
ZonePage RulesRead
ZoneAnalyticsRead
ZoneLoad BalancersRead
ZoneSSL and CertificatesRead
AccountAccount SettingsRead
UserUser DetailsRead

Minimum required permissions

For basic functionality, you need at least: Zone - Zone - Read and Zone - DNS - Read. Add additional permissions based on the features you plan to use.

Permissions configuration with Zone Read selected

Step 6: Set zone and account resources

Under Zone Resources, keep the default setting of IncludeAll zones to grant the token access to all zones in your account. You can restrict access to specific zones if needed.

Under Account Resources, keep the default setting of IncludeAll accounts.

Step 7: Create the token

Leave the Client IP Address Filtering and TTL sections at their default values unless you have specific security requirements. Click Continue to summary to review your token configuration, then click Create Token.

Save your API token

After creating the token, Cloudflare displays the token value only once. Copy it immediately and store it securely. You will not be able to view this token again.

Configure the Frontegg portal

Once you have your API Token from the steps above, enter it in the integration configuration page of the Frontegg portal:

  1. Open the Frontegg portal and navigate to your environment's Integrations section.
  2. Find Cloudflare and open its configuration page.
  3. Enter the API Token in the corresponding field.
  4. Select the required scopes for your integration.
  5. Click Save.

Additional resources