Every endpoint found. Every gap named.
Tap an operation to see its live posture and the risk labels Cloudflare raised against it.
Operation 3 of 6 · 24 req/s
/api/v1/users/{id}
Sessions are walking the ID space and the responses carry personal data. Needs a session-keyed limit before anything else.
Schema ✓
Schema Validation 2.0 checks requests against your OpenAPI 3.0 definition. Action is set per operation: none, log, or block.
JWT ✓
JWT validation verifies the token signature and claims at the edge, before the request reaches your code.
mTLS · n/a
Mutual TLS — only clients presenting a certificate from your CA complete the handshake.
Rate · gap
Session-keyed rate limiting, sized from Cloudflare’s per-endpoint volumetric recommendation.
Bot ✓
Bot score and verified-client signals separate real traffic from scripted automation.
Data · gap
Sensitive Data Detection reads the response and flags PII, card numbers, and secrets on the way out.
On this page
Nanosek provides Cloudflare API Shield services for organizations that need to discover, label, assess, protect, and operate APIs on Cloudflare. The service covers API Discovery and the Web Assets operation inventory, session identifier design, schema learning and Schema Validation 2.0, JWT validation, mTLS and client certificate lifecycle, GraphQL malicious query protection, Sequence Analytics and sequence mitigation, volumetric abuse detection and session-keyed rate limiting, authentication posture, BOLA vulnerability detection, Sensitive Data Detection on API responses, endpoint labeling, Logpush and Security Analytics, staged rollout, false-positive tuning, and managed Cloudflare operations.
Topics: cloudflare, api shield, api security, web assets, schema validation, jwt validation, mtls, api discovery
Machine-readable context: /ai-index.json
Who this is for
What Cloudflare API Shield helps you find and fix
Shadow and undocumented APIs
API Discovery runs two models in parallel, one keyed on session identifiers and one machine-learning based that also sees unauthenticated paths. Both feed the Web Assets inventory, where variable path segments collapse into a single operation.
Sensitive data in API responses
Sensitive Data Detection reads response bodies for personal, financial, and secret data. API Shield then labels the operation cf-risk-sensitive, which turns a suspicion into a worklist.
Sensitive data reachable without auth
An operation carrying cf-risk-sensitive alongside cf-risk-missing-auth or cf-risk-mixed-auth is returning regulated data to callers who never authenticated. This intersection is the highest-value finding API Shield produces.
Broken object level authorization
BOLA detection watches for sessions enumerating far more objects than the baseline, and for parameters duplicated into unexpected locations. Both surface as cf-risk labels with exportable attacker fingerprints.
Zombie and legacy endpoints
Saved operations with no traffic for 32 days pick up cf-risk-zombie. Old versions that nobody owns are usually the ones with no schema, no token check, and no rate limit.
Schema drift
Schema learning builds a schema from real traffic. Where a learned schema exists but nothing is enforced, the operation is labeled cf-risk-missing-schema so the gap is visible rather than assumed.
Weak or inconsistent authentication
Authentication Posture compares successful requests against the configured session identifier and separates endpoints where nobody authenticates from endpoints where only some callers do.
Credential stuffing and token abuse
Login and token operations need bot signals, session-keyed rate limits, and Turnstile where a human check is appropriate, with false positives reviewed before anything blocks.
Scraping and volumetric abuse
Volumetric Abuse Detection builds a per-operation, per-session baseline and recommends a rate limit with p50, p90, and p99 context, rather than guessing a number per IP.
Expensive and AI-backed endpoints
LLM-backed operations are labeled cf-llm and cost real money per call. The limit on those is driven by spend as much as by abuse.
Business logic abuse
Sequence Analytics shows the order real sessions call operations in, which is how you spot callers that reach a checkout or transfer step without passing through the steps before it.
Enforcement that breaks working clients
Schema validation, JWT rules, mTLS, and rate limits can all break legitimate traffic. Every control we deploy starts in a mode that logs before it blocks.
What is actually in API Shield
Cloudflare groups API Shield into discovery, posture, and runtime protection. The availability column matters as much as the feature list: only a few pieces are on every plan, most of the suite is an Enterprise add-on, and Sensitive Data Detection is billed separately again. We confirm your entitlements before designing around anything.
Discovery and management
Build an inventory you trust before you enforce anything against it.
-
API Discovery
EnterpriseFinds operations from live traffic using both a session-identifier model and a machine-learning model, so unauthenticated paths are not missed.
-
Web Assets inventory
All plansThe operation inventory itself. An operation is a method, hostname pattern, and path pattern, promoted through candidate and shadow states to full.
-
Session identifiers
EnterpriseA header, cookie, or JWT claim that identifies the caller. Discovery, sequences, rate recommendations, and auth posture all depend on it.
-
Schema learning
API ShieldBuilds an OpenAPI 3.0 schema from real traffic on full operations, using statistical tests so it does not over-constrain.
-
Endpoint labeling
All customersManaged labels such as cf-log-in, cf-purchase, cf-add-payment, and cf-llm, plus your own labels for owner, version, and tier.
-
Sequence Analytics
API ShieldShows the real order sessions call operations in, ranked by how likely those operations are to occur together in that order.
-
Developer portals
API ShieldGenerates interactive API documentation from saved operations or an uploaded schema, hosted on Cloudflare Pages.
-
API Routing
Open betaRoutes matched operations to a chosen origin from the inventory itself rather than through separate rules.
Posture management
A scan runs daily across the inventory and labels what is wrong.
-
Sensitive Data Detection
Separate add-onReads API response bodies for personal, financial, and secret data and drives the cf-risk-sensitive label. Log only, by design.
-
Authentication Posture
API ShieldRaises cf-risk-missing-auth where no successful request carries the session identifier, and cf-risk-mixed-auth where only some do.
-
BOLA vulnerability detection
EnterpriseFlags object enumeration and parameter pollution as cf-risk-bola-enumeration and cf-risk-bola-pollution, with exportable session and JA4 fingerprints.
-
Volumetric Abuse Detection
EnterpriseRecommends a per-operation rate limit from session behavior, with percentile and confidence context. Applying it needs Advanced Rate Limiting.
-
Zombie endpoint detection
API ShieldApplies cf-risk-zombie to saved operations that have seen no traffic for 32 days, which is how forgotten API surface gets found.
-
Anomaly labels
API Shieldcf-risk-error-anomaly, cf-risk-latency-anomaly, and cf-risk-size-anomaly flag day-over-day shifts. A size spike on a sensitive operation is worth a look.
-
Missing schema detection
API Shieldcf-risk-missing-schema marks operations where a learned schema exists but nothing is actually enforcing it.
-
Vulnerability Scanner
Open betaActively tests for exploitable BOLA using owner and attacker credentials against your spec. API-driven today, no dashboard yet.
Runtime protection
The controls that actually act on a request, in the order they fire.
-
mTLS
All plansClient certificates validated against a CA on your account. Available on every plan with the Cloudflare-managed CA; bringing your own CA is Enterprise.
-
Schema Validation 2.0
All plansValidates path, query, header, and cookie parameters plus JSON bodies against OpenAPI 3.0.x. Classic schema validation is deprecated.
-
JWT validation
API ShieldVerifies signature, expiry, and not-before at the edge against your JWKS, and makes claims available to rules and header transforms.
-
GraphQL query protection
API ShieldQuery size and depth exposed as rule fields. Cloudflare ships no default thresholds, so these are derived from your own traffic.
-
Sequence mitigation
Closed betaEnforces that a session reached an operation through the expected preceding steps. Still a closed beta, so it is planned around rather than assumed.
-
Advanced Rate Limiting
Add-onSession-keyed limits sized from the volumetric recommendation, falling back to IP only where no session identifier exists.
-
WAF custom rules
All plansWhere mTLS fields, JWT claims, bot score, JA4, and sequence fields are combined into policy. Runs before API Shield in the request path.
-
Bot Management
EnterpriseBot score and verified-client signals, now including signed agents that identify themselves with Web Bot Auth.
Availability reflects Cloudflare’s published plan documentation and changes over time. Beta features are named as beta because rollout planning depends on it. Confirm current entitlements with your Cloudflare account team before committing to a design.
Why API Shield needs careful rollout
API protection breaks legitimate clients when schema validation, JWT rules, mTLS, or rate limits are switched on without traffic evidence behind them. The failure modes are specific and known: an oversized request body skips validation entirely rather than being blocked, a JWT rule triggers when its expression is false rather than true, CORS preflights carry no token by definition, and a revoked client certificate still satisfies cert_verified unless the rule checks for revocation. We start with discovery and logging, map the real clients, then promote controls one operation at a time.
Our Cloudflare API Shield approach
Entitlements, identifiers, and inventory
- Confirm which parts of API Shield your plan actually includes, since most of the suite is an Enterprise add-on and Sensitive Data Detection is subscribed separately.
- Design and configure session identifiers, because API Discovery, Sequence Analytics, rate recommendations, and authentication posture all depend on them.
- Review discovered operations in Web Assets, promote the real ones to full state, and ignore the noise so the inventory stays trustworthy.
Labeling and risk classification
- Apply managed and custom labels so every operation has an owner, a version, a client type, and a business tier.
- Turn on Sensitive Data Detection and review which operations return personal, financial, or secret data, and whether that is intended.
- Work the cf-risk labels in priority order, starting with sensitive data reachable by unauthenticated callers.
Schema and token design
- Review learned schemas and any specification you already publish, and decide per operation whether it is ready to validate or needs cleanup first.
- Design JWT token configurations against your identity provider JWKS, including key rollover, and decide where missing tokens should be ignored rather than treated as non-compliant.
- Plan mTLS where certificate identity is genuinely the right answer, including issuance, hostname association, revocation checking, and how the certificate reaches your origin.
Policy design in the right order
- Place controls deliberately across the request path, since WAF custom rules and rate limiting run before API Shield, and WAF Managed Rules run after it.
- Size rate limits from the volumetric recommendation and the business workflow, keyed on session rather than IP wherever a session identifier exists.
- Derive GraphQL depth and size thresholds from your own traffic, and add a fallthrough rule for requests that match no saved operation.
Staged enforcement
- Deploy schema validation and JWT rules in log mode first, then promote per operation once the events show only what you expect.
- Validate against known clients, mobile builds, partner integrations, and synthetic checks before any action changes to block.
- Keep a documented rollback for every control, including the zone-wide schema validation override that disables enforcement without losing per-operation configuration.
Operations and tuning
- Run the daily posture scan as a working queue rather than a dashboard, with new labels triaged, owned, and closed.
- Configure Logpush, Security Events review, alerting, and per-operation reporting through the Web Assets fields in the GraphQL Analytics API.
- Keep schemas, labels, and rules aligned with API releases so posture does not decay between engagements.
API architecture considerations
Cloudflare API controls we use
API Discovery
Finds operations from live traffic with both session-identifier and machine-learning models, including unauthenticated paths the session model cannot see.
Web Assets inventory
The operation inventory API Shield acts on. We promote real operations to full state so schema learning and per-operation metrics begin.
Session identifiers
Configured as a header, cookie, or JWT claim. This is the prerequisite most teams have wrong, and most of the posture features depend on it.
Endpoint labeling
Managed labels for behavior and risk, plus custom labels for owner, version, tier, and client type so the inventory can be filtered and reported on.
Sensitive Data Detection
Inspects API response bodies for personal, financial, and secret data and drives the cf-risk-sensitive label. Always log action, no added latency.
Authentication Posture
Separates operations where nobody authenticates from operations where only some callers do, which is where broken access control usually starts.
BOLA vulnerability detection
Flags object enumeration and parameter pollution against the inventory, with session and JA4 fingerprints you can export and act on.
Volumetric Abuse Detection
Produces per-operation, per-session rate limit recommendations with percentile and confidence context instead of a guessed per-IP number.
Schema Validation 2.0
Validates path, query, header, and cookie parameters and JSON bodies against OpenAPI 3.0.x, per operation, with a zone default and a kill switch.
JWT validation
Verifies signature, expiry, and not-before against your JWKS at the edge, and exposes claims to WAF rules, rate limiting, and header transforms.
mTLS and client certificates
Certificate identity for partner, service, IoT, and high-trust clients, enforced in a rule that checks issuer SKI and revocation, not just verification.
GraphQL malicious query protection
Query size and depth as rule fields. Thresholds are derived from your own traffic because Cloudflare ships no defaults here.
Sequence Analytics and mitigation
Shows the real order sessions call operations in, and enforces expected order where the beta is available to you.
Advanced Rate Limiting
Session-keyed limits on login, token, search, export, upload, checkout, and expensive or AI-backed operations.
WAF custom rules
Where mTLS fields, JWT claims, bot score, JA4, geography, and sequence fields become policy. Runs before API Shield, so ordering is deliberate.
Bot Management and Turnstile
Separates real clients from automation, including signed agents that identify themselves, with human verification where it fits the flow.
Origin Rules and Authenticated Origin Pulls
Pins expected origins and proves to your backend that the connection came from Cloudflare rather than around it.
Logpush, Security Events, and GraphQL Analytics
Exports API decisions to your SIEM and supports per-operation reporting through the Web Assets operation and label fields.
Cloudflare Workers
Used where native controls stop short: request enrichment, JWKS refresh, custom validation, routing, and integration logic.
| Control | When Nanosek uses it |
|---|---|
| API Discovery | Finds operations from live traffic with both session-identifier and machine-learning models, including unauthenticated paths the session model cannot see. |
| Web Assets inventory | The operation inventory API Shield acts on. We promote real operations to full state so schema learning and per-operation metrics begin. |
| Session identifiers | Configured as a header, cookie, or JWT claim. This is the prerequisite most teams have wrong, and most of the posture features depend on it. |
| Endpoint labeling | Managed labels for behavior and risk, plus custom labels for owner, version, tier, and client type so the inventory can be filtered and reported on. |
| Sensitive Data Detection | Inspects API response bodies for personal, financial, and secret data and drives the cf-risk-sensitive label. Always log action, no added latency. |
| Authentication Posture | Separates operations where nobody authenticates from operations where only some callers do, which is where broken access control usually starts. |
| BOLA vulnerability detection | Flags object enumeration and parameter pollution against the inventory, with session and JA4 fingerprints you can export and act on. |
| Volumetric Abuse Detection | Produces per-operation, per-session rate limit recommendations with percentile and confidence context instead of a guessed per-IP number. |
| Schema Validation 2.0 | Validates path, query, header, and cookie parameters and JSON bodies against OpenAPI 3.0.x, per operation, with a zone default and a kill switch. |
| JWT validation | Verifies signature, expiry, and not-before against your JWKS at the edge, and exposes claims to WAF rules, rate limiting, and header transforms. |
| mTLS and client certificates | Certificate identity for partner, service, IoT, and high-trust clients, enforced in a rule that checks issuer SKI and revocation, not just verification. |
| GraphQL malicious query protection | Query size and depth as rule fields. Thresholds are derived from your own traffic because Cloudflare ships no defaults here. |
| Sequence Analytics and mitigation | Shows the real order sessions call operations in, and enforces expected order where the beta is available to you. |
| Advanced Rate Limiting | Session-keyed limits on login, token, search, export, upload, checkout, and expensive or AI-backed operations. |
| WAF custom rules | Where mTLS fields, JWT claims, bot score, JA4, geography, and sequence fields become policy. Runs before API Shield, so ordering is deliberate. |
| Bot Management and Turnstile | Separates real clients from automation, including signed agents that identify themselves, with human verification where it fits the flow. |
| Origin Rules and Authenticated Origin Pulls | Pins expected origins and proves to your backend that the connection came from Cloudflare rather than around it. |
| Logpush, Security Events, and GraphQL Analytics | Exports API decisions to your SIEM and supports per-operation reporting through the Web Assets operation and label fields. |
| Cloudflare Workers | Used where native controls stop short: request enrichment, JWKS refresh, custom validation, routing, and integration logic. |
Where the controls fire
API Shield does not sit at the front of the request. It runs in its own rule phase, after your WAF custom rules and rate limiting, and before WAF Managed Rules. That ordering decides which control gets to act first, and it is the reason a rule can look like it stopped working the week API Shield went in. We place controls with the order in mind rather than discovering it during an incident.
Request path
The order is Cloudflare’s documented rule phases, not a diagram convention. Tap a stage.
API Shield enforcement
http_request_api_gateway_lateSchema Validation 2.0 checks the request against your OpenAPI 3.0 definition, JWT validation rules check the token, sequence rules check what the session did before this call, and GraphQL rules check query depth and size. Requests that do not match a saved operation are outside this phase entirely — they need a fallthrough rule.
Sensitive data in API responses
Most API security work looks at what comes in. The harder question is what goes out: which of your operations return personal, financial, or secret data, whether that was intended, and who can reach them. Cloudflare answers the first part with Sensitive Data Detection, a WAF managed ruleset that reads response bodies and feeds the result straight into your API inventory.
Sensitive data protection on Cloudflare comes in two forms, and an API engagement needs the first: Sensitive Data Detection inspects responses coming out of your own origins, and Data Loss Prevention in Cloudflare One inspects your workforce’s outbound traffic. Nanosek deploys and tunes both — only the first one shows up against your API inventory.
Response inspection
GET /api/v1/users/{id} on its way back to the caller
Text, HTML, JSON, and XML responses are inspected up to 1 MB, including responses served from cache and responses composed by a Worker. Matched values are never stored.
Detected
Personal
Passport number in the user object
Financial
Card number returned unmasked
Secret
Live API key echoed back to the caller
Then what
The event lands in Security Events with the rule that fired, but never the matched value.
Within a day the posture scan labels the operation cf-risk-sensitive.
Nothing is blocked. The response was already sent, which is exactly why the check costs no latency.
The finding worth acting on first
An operation carrying both labels is returning sensitive data to callers who never authenticated. The same
applies to cf-risk-mixed-auth,
where only some callers do. This intersection is the closest thing API Shield has to an automated finder for
the top two entries in the OWASP API Top 10, and it is where we start every engagement that has detection
already switched on.
What it does and does not do
Responses only
It reads what your origin sends back. Request-side inspection is a different control, and for AI endpoints that is AI Security for Apps.
Log, never block
Detection happens outside the response path. That is why it adds no latency, and why it can never stop the response it just read.
Three categories
Personal, financial, and secret data, with passport numbers, card numbers, and API keys as Cloudflare’s own examples. There is no custom pattern support.
Tuning is mandatory
Some rules ship switched off to keep false positives down. Turning the ruleset on is the start of the work, not the end of it.
The value is never stored
You learn that an operation returned a card number and which rule matched, not what the number was. Investigation pivots to your own logs.
Separately licensed
Enterprise on the advanced application security plan, with its own subscription. Worth confirming before it is designed into a rollout.
API protection matrix
Login and token APIs
Credential stuffing, brute force, token abuse
Session-keyed rate limits, Bot Management, Turnstile where it fits, JWT rules that exempt token issue and refresh operations
Object read APIs
Broken object level authorization and enumeration
BOLA detection, session-keyed limits, schema validation on path parameters, and Vulnerability Scanner where available
APIs returning personal data
Regulated data reachable by the wrong callers
Sensitive Data Detection, cf-risk-sensitive triage, authentication posture review, and enforcement on anything reachable unauthenticated
Public REST APIs
Malformed requests, scraping, high-volume abuse
Discovery, learned schemas, Schema Validation 2.0, rate limits, and a fallthrough rule for unmatched paths
Partner and service APIs
Legitimate automation blocked or over-allowed
mTLS with issuer and revocation checks, scoped policies, per-partner limits, and explicit exception ownership
Mobile APIs
False positives against app-specific behavior
Client classification, API-specific rules, careful bot policy, and staged enforcement per app release
GraphQL endpoints
Expensive queries and abuse concentration
Depth and size rules derived from your own percentiles, plus limits and logging. Note that only paths ending in /graphql are parsed
AI and LLM-backed APIs
Cost abuse, prompt injection, data in prompts and responses
cf-llm labeling, spend-aware rate limits, AI Security for Apps on the request side, and Sensitive Data Detection on the response
Upload APIs
Large payload abuse and malware workflow pressure
Method-aware controls, size expectations, malicious upload detection, origin capacity review, and monitoring
Export and reporting APIs
Bulk data extraction and backend load
Authentication review, session-keyed limits, bot controls, response-size anomaly monitoring, and business-owner thresholds
Admin APIs
Privileged action exposure
Cloudflare Access or service tokens, mTLS, strict rules, and least-privilege client controls
Webhook receivers
Spoofed or replayed events
Signature validation, mTLS where the sender supports it, rate limits, and Workers or Queues where appropriate
Legacy API versions
Unmaintained behavior and missing controls
cf-risk-zombie triage, separate monitoring, stricter policy, a deprecation plan, and staged migration
| API area | Common risk | Recommended Cloudflare approach |
|---|---|---|
| Login and token APIs | Credential stuffing, brute force, token abuse | Session-keyed rate limits, Bot Management, Turnstile where it fits, JWT rules that exempt token issue and refresh operations |
| Object read APIs | Broken object level authorization and enumeration | BOLA detection, session-keyed limits, schema validation on path parameters, and Vulnerability Scanner where available |
| APIs returning personal data | Regulated data reachable by the wrong callers | Sensitive Data Detection, cf-risk-sensitive triage, authentication posture review, and enforcement on anything reachable unauthenticated |
| Public REST APIs | Malformed requests, scraping, high-volume abuse | Discovery, learned schemas, Schema Validation 2.0, rate limits, and a fallthrough rule for unmatched paths |
| Partner and service APIs | Legitimate automation blocked or over-allowed | mTLS with issuer and revocation checks, scoped policies, per-partner limits, and explicit exception ownership |
| Mobile APIs | False positives against app-specific behavior | Client classification, API-specific rules, careful bot policy, and staged enforcement per app release |
| GraphQL endpoints | Expensive queries and abuse concentration | Depth and size rules derived from your own percentiles, plus limits and logging. Note that only paths ending in /graphql are parsed |
| AI and LLM-backed APIs | Cost abuse, prompt injection, data in prompts and responses | cf-llm labeling, spend-aware rate limits, AI Security for Apps on the request side, and Sensitive Data Detection on the response |
| Upload APIs | Large payload abuse and malware workflow pressure | Method-aware controls, size expectations, malicious upload detection, origin capacity review, and monitoring |
| Export and reporting APIs | Bulk data extraction and backend load | Authentication review, session-keyed limits, bot controls, response-size anomaly monitoring, and business-owner thresholds |
| Admin APIs | Privileged action exposure | Cloudflare Access or service tokens, mTLS, strict rules, and least-privilege client controls |
| Webhook receivers | Spoofed or replayed events | Signature validation, mTLS where the sender supports it, rate limits, and Workers or Queues where appropriate |
| Legacy API versions | Unmaintained behavior and missing controls | cf-risk-zombie triage, separate monitoring, stricter policy, a deprecation plan, and staged migration |
API Shield rollout model
From API visibility to enforcement
Entitlement check
API Shield plans, Sensitive Data Detection subscription
Establish what is included before designing around it. Most of the suite is an Enterprise add-on and Sensitive Data Detection is billed separately.
Identify the caller
Session identifiers
Header, cookie, or JWT claim. Nearly everything downstream degrades without one that genuinely identifies a client.
Discovery
API Discovery, Web Assets, endpoint labeling
Promote real operations to full state, label ownership, and ignore the rest so the inventory stays usable.
Exposure review
Sensitive Data Detection, Authentication Posture, BOLA detection
Turn on detection before enforcement. Sensitive data on an unauthenticated operation is the first thing to fix.
Documentation cleanup
Schema learning, OpenAPI review
Learned schemas need review. OpenAPI 3.0.x only, and request bodies over the plan limit are not validated at all.
Visibility mode
Log actions, Security Events, Logpush
Schema validation and JWT rules run in log first. Review the events against known clients before promoting anything.
Controlled enforcement
Schema Validation 2.0, JWT rules, mTLS rules, rate limits
Promote per operation and per client group, keeping the zone-wide override available as a rollback.
Operations
Daily posture scan, alerts, GraphQL Analytics, managed services
Treat new cf-risk labels as a queue with owners, and keep schemas aligned with API releases.
| Rollout stage | Cloudflare capability | Implementation notes |
|---|---|---|
| Entitlement check | API Shield plans, Sensitive Data Detection subscription | Establish what is included before designing around it. Most of the suite is an Enterprise add-on and Sensitive Data Detection is billed separately. |
| Identify the caller | Session identifiers | Header, cookie, or JWT claim. Nearly everything downstream degrades without one that genuinely identifies a client. |
| Discovery | API Discovery, Web Assets, endpoint labeling | Promote real operations to full state, label ownership, and ignore the rest so the inventory stays usable. |
| Exposure review | Sensitive Data Detection, Authentication Posture, BOLA detection | Turn on detection before enforcement. Sensitive data on an unauthenticated operation is the first thing to fix. |
| Documentation cleanup | Schema learning, OpenAPI review | Learned schemas need review. OpenAPI 3.0.x only, and request bodies over the plan limit are not validated at all. |
| Visibility mode | Log actions, Security Events, Logpush | Schema validation and JWT rules run in log first. Review the events against known clients before promoting anything. |
| Controlled enforcement | Schema Validation 2.0, JWT rules, mTLS rules, rate limits | Promote per operation and per client group, keeping the zone-wide override available as a rollback. |
| Operations | Daily posture scan, alerts, GraphQL Analytics, managed services | Treat new cf-risk labels as a queue with owners, and keep schemas aligned with API releases. |
Cutover checkpoints
- Plan entitlements are confirmed, including whether Sensitive Data Detection is subscribed.
- Session identifiers are configured and verified against real authenticated traffic.
- Known clients, mobile builds, and partner integrations are documented against saved operations.
- Learned or published schemas are reviewed, and request body size limits are understood per plan.
- Rollback is defined for every control, including the zone-wide schema validation override.
Validation signals
- No unexpected increase in API 4xx or 5xx responses after a control is promoted.
- Security Events show only the matches you expected, with known clients absent from them.
- Logs carry the operation ID, labels, action, and outcome needed to review a decision later.
- Synthetic checks and business-critical API journeys continue to pass after each promotion.
- The count of open cf-risk labels trends down rather than accumulating.
Deployment steps
- 01 Confirm plan entitlements, then design and configure session identifiers so the rest of the suite has something to key on.
- 02 Review discovered operations in Web Assets, promote the real ones to full state, and label them with owner, version, client type, and tier.
- 03 Turn on Sensitive Data Detection and triage cf-risk-sensitive, prioritizing anything that also carries a missing or mixed authentication label.
- 04 Work the remaining risk labels: BOLA findings, missing schemas, anomalies, and zombie operations that should be retired rather than protected.
- 05 Review learned and published schemas, design JWT token configurations against your JWKS, and plan mTLS where certificate identity is the right answer.
- 06 Design rules across the request path deliberately, sizing rate limits from volumetric recommendations and deriving GraphQL thresholds from your own percentiles.
- 07 Deploy schema validation and JWT rules in log mode, validate against known clients and synthetic checks, then promote to block per operation.
- 08 Operationalize the daily posture scan, Logpush, alerting, per-operation reporting, false-positive handling, and ongoing tuning.
Risks and mitigations
Schema validation blocks legitimate clients
Review learned schemas, start in log, promote per operation, and keep the zone-wide override available as an immediate rollback.
Large request bodies silently skip validation
Confirm the per-plan body inspection limit, identify operations that exceed it, and cover them with rules rather than assuming validation applies.
A permissive content type lets bodies through unchecked
Schema validation inspects JSON bodies. Where a schema allows a broader media range, requests sent under another content type pass without body validation, so we keep media ranges tight and recommend disabling content-type sniffing at the origin.
Requests to unlisted paths are never evaluated
An operation has to exist in the inventory before schema validation can match it. We deploy a fallthrough rule scoped to your API hostnames so unmatched paths are handled deliberately rather than ignored.
JWT rules block more than intended
Remember the rule triggers when the expression is false, exempt token issue and refresh operations, and account for CORS preflights carrying no token.
mTLS rollout disrupts partners
Plan issuance, hostname associations, test windows, and fallback with each partner, and check issuer SKI and revocation in the rule rather than verification alone.
Revoked certificates keep working
Revocation is not enforced automatically. Rules must test the revoked flag explicitly, and revocation is only checked for the Cloudflare-managed CA.
Rate limits break normal workflows
Size from the per-operation recommendation and the business process, key on session rather than IP, and deploy low-confidence recommendations in log first.
Sensitive data findings are mistaken for prevention
Sensitive Data Detection only logs. Treat it as evidence and posture, and fix the exposure at the origin or with an access control in front of it.
Detection produces false positives
Some detection rules ship disabled to limit noise. Enable what matches your data types and tune rather than turning everything on at once.
Controls conflict across rule phases
Place rules knowing that custom rules and rate limiting run before API Shield, and managed rules run after it, so a terminal action hides everything downstream.
Unknown APIs remain exposed
Run discovery continuously, review new operations as a queue, and treat the inventory as something owned rather than generated once.
Beta features are planned as if generally available
Sequence mitigation is a closed beta and the vulnerability scanner is an API-only open beta. We design a path that works without them and adopts them when available.
Posture decays after the project ends
Keep schemas, labels, and rules aligned with API releases, and run the daily scan output as an owned queue with review dates.
| Risk | Mitigation |
|---|---|
| Schema validation blocks legitimate clients | Review learned schemas, start in log, promote per operation, and keep the zone-wide override available as an immediate rollback. |
| Large request bodies silently skip validation | Confirm the per-plan body inspection limit, identify operations that exceed it, and cover them with rules rather than assuming validation applies. |
| A permissive content type lets bodies through unchecked | Schema validation inspects JSON bodies. Where a schema allows a broader media range, requests sent under another content type pass without body validation, so we keep media ranges tight and recommend disabling content-type sniffing at the origin. |
| Requests to unlisted paths are never evaluated | An operation has to exist in the inventory before schema validation can match it. We deploy a fallthrough rule scoped to your API hostnames so unmatched paths are handled deliberately rather than ignored. |
| JWT rules block more than intended | Remember the rule triggers when the expression is false, exempt token issue and refresh operations, and account for CORS preflights carrying no token. |
| mTLS rollout disrupts partners | Plan issuance, hostname associations, test windows, and fallback with each partner, and check issuer SKI and revocation in the rule rather than verification alone. |
| Revoked certificates keep working | Revocation is not enforced automatically. Rules must test the revoked flag explicitly, and revocation is only checked for the Cloudflare-managed CA. |
| Rate limits break normal workflows | Size from the per-operation recommendation and the business process, key on session rather than IP, and deploy low-confidence recommendations in log first. |
| Sensitive data findings are mistaken for prevention | Sensitive Data Detection only logs. Treat it as evidence and posture, and fix the exposure at the origin or with an access control in front of it. |
| Detection produces false positives | Some detection rules ship disabled to limit noise. Enable what matches your data types and tune rather than turning everything on at once. |
| Controls conflict across rule phases | Place rules knowing that custom rules and rate limiting run before API Shield, and managed rules run after it, so a terminal action hides everything downstream. |
| Unknown APIs remain exposed | Run discovery continuously, review new operations as a queue, and treat the inventory as something owned rather than generated once. |
| Beta features are planned as if generally available | Sequence mitigation is a closed beta and the vulnerability scanner is an API-only open beta. We design a path that works without them and adopts them when available. |
| Posture decays after the project ends | Keep schemas, labels, and rules aligned with API releases, and run the daily scan output as an owned queue with review dates. |
API Shield readiness checklist
- Plan entitlements confirmed
- Sensitive Data Detection subscription confirmed
- Session identifiers configured
- API hostnames inventoried
- Operations promoted to full state
- Discovery noise triaged and ignored
- Endpoint labels applied with owners
- Known clients and mobile builds identified
- Partner integrations documented
- Authentication posture reviewed
- Sensitive operations confirmed as intended
- BOLA findings triaged
- Learned schemas reviewed
- OpenAPI version and body size limits checked
- JWT token configurations and JWKS rotation planned
- mTLS issuance and revocation checks defined
- Rate limits sized from recommendations and workflows
- GraphQL thresholds derived from real traffic
- Fallthrough rule scoped to API hostnames
- Rule phase ordering reviewed
- Security Events and Logpush visible
- Synthetic checks prepared
- Rollback and exception process defined
- Business owners approve enforcement
Deliverables
- Entitlement and licensing review
- Session identifier design
- API operation inventory in Web Assets
- Endpoint labeling and ownership map
- Sensitive data exposure report
- Authentication posture findings
- BOLA and abuse findings triage
- Learned schema review and readiness call per operation
- Schema Validation 2.0 rollout plan
- JWT token configuration and rotation design
- mTLS and certificate lifecycle design
- Rate limiting design keyed on session
- GraphQL threshold analysis
- Rule phase and ordering map
- Fallthrough and exception design
- Logpush, alerting, and reporting setup
- Validation and synthetic test matrix
- False-positive tuning report
- Rollback and exception process
- Managed operations handover
OWASP API Top 10 coverage
API1 Broken object level authorization
BOLA vulnerability detection, Vulnerability Scanner, schema validation on path parameters
Triage enumeration and pollution findings, export the attacking sessions, and pair with a session-keyed limit while the origin fix is built.
API2 Broken authentication
Authentication Posture, JWT validation, mTLS, Cloudflare Access
Work cf-risk-missing-auth and cf-risk-mixed-auth to closure, then enforce tokens at the edge with token issue and refresh paths exempted.
API3 Broken object property level authorization
Schema Validation 2.0, Sensitive Data Detection
Constrain request properties against the schema and use response-side detection to find operations returning more than they should.
API4 Unrestricted resource consumption
Volumetric Abuse Detection, Advanced Rate Limiting, GraphQL query limits
Size limits from the per-operation recommendation and the business workflow, with AI-backed operations limited on cost as well as volume.
API5 Broken function level authorization
JWT claim rules, WAF custom rules, Cloudflare Access, service tokens
Separate admin and privileged operations from the general policy rather than letting them inherit website rules.
API6 Unrestricted access to sensitive business flows
Sequence Analytics, sequence mitigation, Bot Management
Establish the real call order for checkout, transfer, and signup flows, then enforce it where the beta is available.
API7 Server side request forgery
WAF Managed Rules, schema validation on URL-typed parameters
Constrain parameters that accept URLs at the schema level and keep managed rules in the path behind API Shield.
API8 Security misconfiguration
Web Assets inventory, risk labels, Security Insights
Use the daily posture scan as the misconfiguration feed, including missing schemas and anomaly labels.
API9 Improper inventory management
API Discovery, endpoint labeling, zombie detection
Keep the inventory current, label ownership, and retire cf-risk-zombie operations rather than leaving them exposed.
API10 Unsafe consumption of third-party APIs
Workers, Origin Rules, Logpush
Largely an origin-side concern, but outbound calls and webhook receivers are brought under the same validation and logging discipline.
| OWASP API risk | Cloudflare capability | What Nanosek does with it |
|---|---|---|
| API1 Broken object level authorization | BOLA vulnerability detection, Vulnerability Scanner, schema validation on path parameters | Triage enumeration and pollution findings, export the attacking sessions, and pair with a session-keyed limit while the origin fix is built. |
| API2 Broken authentication | Authentication Posture, JWT validation, mTLS, Cloudflare Access | Work cf-risk-missing-auth and cf-risk-mixed-auth to closure, then enforce tokens at the edge with token issue and refresh paths exempted. |
| API3 Broken object property level authorization | Schema Validation 2.0, Sensitive Data Detection | Constrain request properties against the schema and use response-side detection to find operations returning more than they should. |
| API4 Unrestricted resource consumption | Volumetric Abuse Detection, Advanced Rate Limiting, GraphQL query limits | Size limits from the per-operation recommendation and the business workflow, with AI-backed operations limited on cost as well as volume. |
| API5 Broken function level authorization | JWT claim rules, WAF custom rules, Cloudflare Access, service tokens | Separate admin and privileged operations from the general policy rather than letting them inherit website rules. |
| API6 Unrestricted access to sensitive business flows | Sequence Analytics, sequence mitigation, Bot Management | Establish the real call order for checkout, transfer, and signup flows, then enforce it where the beta is available. |
| API7 Server side request forgery | WAF Managed Rules, schema validation on URL-typed parameters | Constrain parameters that accept URLs at the schema level and keep managed rules in the path behind API Shield. |
| API8 Security misconfiguration | Web Assets inventory, risk labels, Security Insights | Use the daily posture scan as the misconfiguration feed, including missing schemas and anomaly labels. |
| API9 Improper inventory management | API Discovery, endpoint labeling, zombie detection | Keep the inventory current, label ownership, and retire cf-risk-zombie operations rather than leaving them exposed. |
| API10 Unsafe consumption of third-party APIs | Workers, Origin Rules, Logpush | Largely an origin-side concern, but outbound calls and webhook receivers are brought under the same validation and logging discipline. |
When Nanosek should help
Frequently asked questions
What is Cloudflare API Shield?
Where is API Shield in the Cloudflare dashboard now?
Do we need an Enterprise plan?
What is Sensitive Data Detection, and can it stop a leak?
We call this sensitive data protection. Which Cloudflare product is it?
What does cf-risk-sensitive actually tell us?
Do we need OpenAPI schemas?
How does JWT validation differ from what our API already does?
When should we use mTLS?
Can API Shield protect GraphQL and AI endpoints?
Can API Shield break legitimate traffic?
Can Nanosek help after API Shield is deployed?
Turn API Shield findings into enforced protection
Nanosek takes you from an incomplete API inventory to controls you can actually leave switched on: discovery, labeling, sensitive data visibility, schema and token validation, mTLS, session-keyed limits, and managed operations after go-live.