Skip to main content
← Back to Cloudflare

Cloudflare — Integration Setup

CMDash reads how each of your Cloudflare zones handles encryption and attacks, and whether your account requires two-factor sign-in, and shows each as a cloud configuration check that passes, fails, or is unknown.

Prerequisites

  • A Cloudflare account with at least one zone.
  • Permission to create an API token.
  • Any CMDash plan. The connection uses one of your plan's integrations.

Step 1: Create a read-only API token

  1. In the Cloudflare dashboard, go to My Profile → API Tokens (or Manage Account → API Tokens for an account token) and select Create Token.
  2. Start from a custom token and add these Read permissions:
    • Account → Account Settings → Read
    • Zone → Zone → Read
    • Zone → Zone Settings → Read
    • Zone → Zone WAF → Read
  3. Limit the account resources to your account, and the zone resources to all zones in it (or the zones you want checked).
  4. Create the token and copy it. Cloudflare shows it once.
  5. Copy your account ID from the dashboard (Cloudflare's guide "Find account and zone IDs" shows where).

Least privilege: every permission above is Read. CMDash sends only GET requests and never changes a setting.

Step 2: Connect in CMDash

  1. Go to Integrations and find Cloudflare.
  2. Enter:
    • API key: the token. It is sent as Authorization: Bearer <token>.
    • Cloudflare account ID.
  3. Select Save & Test Connection.

What is checked

CheckCloudflare APIPasses when
Traffic to the origin is encryptedGET /zones/{zone}/settings/sslThe SSL mode is Full or Full (strict). Off and Flexible fail.
HTTPS requires TLS 1.2 or laterGET /zones/{zone}/settings/min_tls_versionThe minimum is 1.2 or 1.3.
WAF managed rules are deployedGET /zones/{zone}/settings/waf, then the managed-WAF entry point (…/rulesets/phases/http_request_firewall_managed/entrypoint)The previous WAF setting is on, or an enabled rule in the entry point runs a managed ruleset. It fails only when both were read and neither is true.
Members must use two-factorGET /accounts/{account}enforce_twofactor is on.

Zones are read 50 a page, every page, up to 200 zones per sync. More than that is marked partial.

Unknown is not failed

A setting the token cannot read is shown as unknown with the reason, never as failed, and unknown checks are left out of both sides of every percentage. A permission refusal is a note on the connection. A server error marks the sync partial.

Troubleshooting

  • Many checks unknown with 403: a permission is missing from the token. Compare it with the list in step 1.
  • 401 on the zone list: the token was revoked or has expired.

Credential rotation

Create a new token with the same permissions, paste it into the connection in CMDash and save, confirm a sync, then delete the old token in Cloudflare.

Ready to see your posture?

Start a 30-day free trial of Starter, Essentials and Command. A card is required. The trial runs 30 days. Your card is first charged when it ends, unless you cancel. Or sign up for Free: free forever, one framework (CMMC Level 1, Level 2 or NIST CSF 2.0) for a small team.