امنیت، هویت، استقرار و تاب‌آوری · فصل ۴ — Linux/Windows، Container، DNS، CDN و Storage · 99

Cloudflare, CDN, WAF and R2 Concepts

Build a bounded edge-delivery model that separates proxied request flow, cache decision, WAF rule decision, origin path and R2 object path, then record which observation supports each layer without treating Cloudflare product presence as correctness or security proof. می‌تواند برای «Cloudflare/CDN/WAF/R2 Concepts» run/release model و signals/recovery checks لازم را برای یک سرویس محدود طراحی کند.

Cloudflare/CDN/WAF/R2 Concepts — fa-IR

Lesson summary

Build a bounded edge-delivery model that separates proxied request flow, cache decision, WAF rule decision, origin path and R2 object path, then record which observation supports each layer without treating Cloudflare product presence as correctness or security proof.

می‌تواند برای «Cloudflare/CDN/WAF/R2 Concepts» run/release model و signals/recovery checks لازم را برای یک سرویس محدود طراحی کند.

This lesson produces

می‌تواند برای «Cloudflare/CDN/WAF/R2 Concepts» run/release model و signals/recovery checks لازم را برای یک سرویس محدود طراحی کند.

Who it is for

Foundation

Use a color-coded edge pipeline and a prefilled first row to distinguish ingress, WAF, cache, origin and R2 before any mutation.

Repair

Freeze the request fixture and vary exactly one edge-layer input—header, ruleset predicate, cache metadata or route target—until the learner can locate the failing layer.

Experienced

Skip product-name orientation and require a cold-read of request/rule/cache/route evidence plus a compatibility decision from current R2 documentation.

Prerequisites

1. The problem: “it is behind Cloudflare” is not a complete technical conclusion

A hostname behind an edge platform can involve several independent systems: DNS proxying, edge ingress, WAF evaluation, cache behavior, origin routing, and sometimes R2. A green dashboard state or a 200 response cannot prove every layer.

The owned artifact is Edge Delivery Policy Evidence Record v1. It records direct observation, inference, unknowns, and bounded recovery/defer decisions independently for each layer.

2. Proxied DNS establishes an ingress path, not application correctness

Cloudflare Rules requires proxied DNS records for rule features that need traffic to pass through the Cloudflare network. That is a routing/platform condition, not proof that application behavior, origin authorization, or cache policy is correct.

In the evidence record, first establish whether the request entered the edge path. Then evaluate WAF and cache decisions separately.

3. WAF is a rule engine with expressions and actions

Cloudflare WAF evaluates web and API requests with rules and rulesets. A rule defines a filter and an action, and terminating actions can stop later evaluation.

If a header or path causes a rule to match, record that conclusion at the WAF layer. A blocked request does not by itself prove an origin failure or the absence of application vulnerabilities.

4. Treat false positives and bypass risk as separate concerns

A WAF can block a legitimate request or use a rule that is too broad or too narrow. “WAF enabled” is therefore not equivalent to “security solved.”

One local fixture changes a request header so the decision moves from allow to block while origin state remains constant. Correct diagnosis keeps the cause at the WAF layer.

5. CDN cache is independent from application correctness

Cache decides whether a response can be served from the edge or must be fetched from a lower layer. HIT, MISS, STALE, and BYPASS are cache observations; none alone proves content correctness, freshness suitability, or authorization.

Record cache state together with cache-key dimensions and freshness evidence, and keep application conclusions separate.

6. Cache key and freshness are causal inputs

Requests that look similar can map to different cache keys because of headers, cookies, query values, or configured rules. A HIT can also be too old for the intended policy.

The lab changes only cache-key/freshness metadata in one case. The supported conclusion is that cache behavior changed, not that an application defect was proven.

7. Keep origin-path evidence separate from edge observations

The edge can block a request, satisfy it from cache, or route it to origin. Edge observation and origin observation are not the same evidence.

If origin health remains constant while WAF blocks the request, keep the diagnosis at WAF. If cache moves to MISS, inspect route/fetch evidence before claiming an origin fault.

8. R2 buckets are private by default

Current Cloudflare documentation states that R2 buckets are private by default. Attaching a Custom Domain creates a public delivery path that can use Cloudflare Cache.

Do not treat public delivery as private-object authorization. Presigned/private object access belongs to OPS-007.

9. Custom Domain, Cache and WAF form distinguishable stages

Cloudflare documents a public R2 flow in which WAF runs before Cache and R2. Invalid requests can therefore be rejected before consuming cache or object-store work.

That ordering is useful evidence for the documented path, but it is not a universal ordering claim for every Cloudflare product and topology.

10. “S3-compatible” means bounded compatibility that must be checked

R2 exposes an S3-compatible API, but its compatibility matrix includes implemented, experimental, and unimplemented behavior and can change over time.

Check the required capability against current R2 documentation. Familiarity with Amazon S3 is not sufficient evidence that R2 supports the same feature.

11. Separate direct observation, inference and unknowns

For example, WAF rule X matched can be a direct observation while origin is broken may only be an inference. If the request never reached origin, that inference is not closed by evidence.

The evidence record keeps observation, inference, and unknowns separate for each layer. Unsupported conclusions remain OPEN.

12. Recovery must be layer-specific

A WAF false positive may require changing the expression and replaying the local request. A cache anomaly may require correcting key/freshness policy and comparing response evidence. An unsupported R2 capability may require a bounded alternative or defer decision.

A generic restart or unexplained bypass is not recovery proof; recovery evidence must address the responsible layer.

13. Edge Delivery Policy Evidence Record v1

The record includes request facts, proxied-edge assumption, WAF match/action, cache state/key/freshness, origin route, R2 path, compatibility requirement/result, direct observation, inference, unknowns, failure layer, recovery check, and final decision.

This artifact is a MAKNOW instructional synthesis, not a Cloudflare-mandated operational form.

14. Lab and transfer

The lab is completely offline: eight synthetic fixtures provide request headers, WAF rules, cache ledger rows, origin state, R2 route state, and a local compatibility snapshot. No real zone, credential, DNS change, or network request is used.

The transfer case changes header, cache key, route, and capability requirement. No baseline verdict can be copied; every layer is recomputed from the changed evidence.

15. Sources, freshness, and claim limits

On 2026-09-19, official Cloudflare documentation was rechecked: Rules still requires proxied DNS for traffic to pass through the Cloudflare network; WAF still defines filtering through rules/rulesets; R2 remains S3-compatible with explicit differences; and R2 buckets remain private by default with Custom Domain used for cache/public delivery.

The next volatile-source review is due 2026-10-17. No dashboard state, cache HIT, WAF presence, or S3 familiarity is treated as general proof of security or correctness.

Assessment

There is no answer key in this lesson pack; answer it yourself and mark honestly. "Needs review" sends the lesson to your review queue.

OPS-006-S1 retrieval

Differentiate proxied edge entry, WAF evaluation, cache decision, origin route, and R2 delivery, naming one observable and one non-claim per layer.

lesson ✗AI ✗notes ✗

OPS-006-S2 application

Complete the layer-by-layer evidence record for the supplied synthetic request using only direct fixture evidence.

lesson ✗AI ✗notes ✗

OPS-006-S3 diagnosis

Diagnose a WAF false positive, cache anomaly, or route mutation without blaming an unchanged layer.

lesson ✗AI ✗notes ✗

OPS-006-S4 decision

Choose a bounded cache/WAF/R2 delivery policy and identify the compatibility check, rejected shortcut, and explicit unknowns.

lesson ✗AI ✗notes ✗

OPS-006-S5 transfer

Rebuild the record for a changed header, WAF outcome, cache key/freshness, route, and R2 capability requirement without copying baseline conclusions.

lesson ✗AI ✗notes ✗
Assessment rubric
DimensionCriticalSufficient evidence
Edge-layer separationYesEdge ingress, WAF, cache, origin, and R2 delivery are independently justified.
WAF/cache evidence disciplineYesRule match/action and cache state/key/freshness are interpreted narrowly.
R2 compatibility judgmentYesRequired behavior is checked against current R2 compatibility evidence.
Observation vs inferenceYesUnsupported application/security/origin claims remain explicitly OPEN.
Changed-edge transferYesNew request/rule/cache/route facts are recomputed without copying baseline conclusions.

Failure: treating proxy/WAF/cache as one green state, using HIT as correctness proof, blaming origin for a WAF-only mutation, assuming R2 is feature-identical to S3, or using public Custom Domain delivery as private-object authorization.

References & freshness

Cloudflare Rules — Overview
·
Cloudflare WAF — Concepts
·
Cloudflare R2 — S3 API compatibility
·
Cloudflare Cache — Enable cache in an R2 bucket
·
Cloudflare Cache — Control cache access with WAF and Snippets
·
MAKNOW instructional evidence design
·

Case studies

Lesson visuals

OPS006-V1

Lab files

Everything is local and synthetic. No Cloudflare account, DNS zone, credential, public hostname, WAF probing, R2 bucket, or network egress is used.

For each case produce eight states: edge_entry_state, waf_decision_state, cache_decision_state, origin_path_state, r2_delivery_state, compatibility_state, evidence_boundary_state, and recovery_decision_state.

Rules:

  1. Proxied edge entry is routing evidence, not application correctness.
  2. A WAF block is a WAF-layer fact unless separate origin evidence exists.
  3. HIT/MISS/STALE/BYPASS are cache observations; they do not prove correctness or authorization.
  4. Origin conclusions require route/origin evidence.
  5. R2 Custom Domain public delivery is separate from private-object authorization.
  6. R2 capability support must come from the supplied compatibility snapshot.
  7. Keep direct observation, inference, and unknowns separate.
  8. The transfer case must be solved from its own header/cache/route/capability facts.

Run python -B run_checks.py for learner-visible structural checks. Hidden acceptance lives outside learner paths.

Lesson media & slides

MAKNOW_OPS-006_DECISION_EVIDENCE_TABLE_v1.0.0.svg
DECISION EVIDENCE TABLE v1.0.0.svg
MAKNOW_OPS-006_FAILURE_REPAIR_v1.0.0.svg
FAILURE REPAIR v1.0.0.svg
MAKNOW_OPS-006_PRIMARY_MODEL_v1.0.0.svg
PRIMARY MODEL v1.0.0.svg
MAKNOW_OPS-006_WORKED_EXAMPLE_v1.0.0.svg
WORKED EXAMPLE v1.0.0.svg

Teaching files (download)

XLSXEdge Delivery Policy Evidence Record v1 v1.0.0.xlsxTeaching files (download)
DOCXEdge Delivery Policy Evidence Record v1 WORKSHEET v1.0.0.docxTeaching files (download)
PDFEdge Delivery Policy Evidence Record v1 WORKSHEET v1.0.0.pdfTeaching files (download)