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
- In the Cloudflare dashboard, go to My Profile → API Tokens (or Manage Account → API Tokens for an account token) and select Create Token.
- 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
- Limit the account resources to your account, and the zone resources to all zones in it (or the zones you want checked).
- Create the token and copy it. Cloudflare shows it once.
- 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
GETrequests and never changes a setting.
Step 2: Connect in CMDash
- Go to Integrations and find Cloudflare.
- Enter:
- API key: the token. It is sent as
Authorization: Bearer <token>. - Cloudflare account ID.
- API key: the token. It is sent as
- Select Save & Test Connection.
What is checked
| Check | Cloudflare API | Passes when |
|---|---|---|
| Traffic to the origin is encrypted | GET /zones/{zone}/settings/ssl | The SSL mode is Full or Full (strict). Off and Flexible fail. |
| HTTPS requires TLS 1.2 or later | GET /zones/{zone}/settings/min_tls_version | The minimum is 1.2 or 1.3. |
| WAF managed rules are deployed | GET /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-factor | GET /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.