Define Identities, Applications, Networks, and Trust Boundaries
Bellwether Freight brokers 1,400 trailer loads a week from offices in Omaha and Rotterdam, with about 380 laptops. The dispatch console runs on a private API in an AWS VPC at 10.20.4.10:8080; its PostgreSQL database sits two subnets away. The marketing site is on Cloudflare. Forty contractors need the console on unmanaged laptops, the night shift needs it from home, and a Worker serves the console's single-page app and calls the private API on the user's behalf.
The temptation is to call this "VPN replacement" and stop. A better starting point is the four lists a warehouse gatekeeper keeps. The first list says who you are — a badge, checked against the issuer. The second says which door you may open — the dispatch console, not the payroll system. The third says which corridors connect that door to the loading bay — the route from the edge into 10.20.0.0/16. The fourth says where the warehouse ends — the line the company controls and the line it does not. Zero Trust adds a fifth list: what happened at the gate, written down well enough that someone else can check it later.
Those lists map to five planes kept separate here. Each has a different owner and a different failure mode:
| Plane | What it decides | Failure if skipped |
|---|---|---|
| Identity | An identity provider (IdP) authenticates a human or a workload; Cloudflare Access consumes the assertion | Cloudflare becomes the password store it was never meant to be |
| Policy | Access applications and policies decide whether an identity, group, device posture, and context may reach an app; Gateway policies decide what an enrolled device or network may do outbound | A reachable service is treated as an authorized one |
| Reachability | Tunnel, Mesh, and WAN create paths; a tunnel UUID and a connector are reachability objects, not permissions | A route exists that no policy covers |
| Data | Workers VPC bindings and Hyperdrive connect a Worker to a private service or database | The Worker inherits more authority than the route it serves |
| Evidence | Access, Gateway, network session, Worker, and audit logs record different parts of one request | A claim cannot be proved after the fact |
Control plane versus data plane is the distinction that prevents most design mistakes. Terraform, the dashboard, and the API write configuration; user requests never traverse that path. A perfect terraform plan says nothing about whether a connector is healthy, and a healthy connector says nothing about whether an Access policy is correct. Figure 1 places the five planes and the request path in one view.
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','titleColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','activationBorderColor':'#132440','signalColor':'#5a6e82','signalTextColor':'#132440','noteBkgColor':'#c4873b','noteTextColor':'#132440','noteBorderColor':'#132440','labelBoxBkgColor':'#a8dede','labelBoxBorderColor':'#132440','labelTextColor':'#132440','loopTextColor':'#132440','altBackground':'#f8f9fa','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
subgraph IDB["Identity boundary"]
IDP["Corporate IdP: OIDC or SAML"]
GRP["Groups: dispatch-ops, contractors"]
end
subgraph DEVB["Device boundary (untrusted until posture)"]
LAP["Managed laptop + Cloudflare One Client"]
CON["Contractor browser"]
end
subgraph CFB["Cloudflare policy and edge"]
ACC{"Access: identity, group, posture"}
GW["Gateway: DNS, network, HTTP"]
WK["Worker: dispatch-api"]
end
subgraph PVB["Private boundary: AWS VPC 10.20.0.0/16"]
TUN["cloudflared connector, two replicas"]
API["Private API 10.20.4.10:8080"]
DB[("Postgres 10.20.5.20:5432")]
end
IDP -->|"signed assertion"| ACC
GRP -->|"group membership"| ACC
LAP -->|"HTTPS dispatch.example.com"| ACC
CON -->|"HTTPS dispatch.example.com"| ACC
LAP -->|"DNS and private IP"| GW
ACC -->|"allow: signed JWT"| TUN
ACC -->|"deny"| DENY["403 block page: no path to VPC"]
GW -->|"CIDR route"| TUN
WK -->|"VPC Service binding"| TUN
WK -->|"Hyperdrive, TCP"| DB
TUN --> API
API --> DB
classDef primary fill:#132440,color:#ffffff,stroke:#0b172b;
classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a;
classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f;
classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420;
classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f;
class LAP,ACC,GW,TUN primary;
class IDP,GRP,CON,WK,API secondary;
class DENY danger;
Figure 1 shows two entry paths into the same VPC and one path that never enters it. Humans arrive through Access; the Worker arrives through a binding. The contractor browser and the managed laptop hit the same policy, but only the managed device can satisfy a posture requirement. The denied branch terminates at the edge, which is the property to test: a denied request must never reach the connector.
Trust boundaries are where a claim changes hands. Bellwether has five:
- Device to edge. The device is untrusted. Its only credential is the user's IdP session plus whatever posture signal the Cloudflare One Client can attest.
- Edge to identity. Cloudflare trusts the IdP's signed assertion for identity, but not for authorization. Group membership is a claim that must be mapped to a policy.
- Edge to private network. The connector trusts Cloudflare because it initiated an outbound connection; it must not trust arbitrary traffic that reaches the VPC by another route.
- Worker to private service. A VPC binding is a capability. Whatever the Worker can address through that binding is inside the Worker's authority.
- Private network to data. Database credentials, TLS verification, and network policy are separate controls from user identity. A valid Access session does not grant a SQL grant.
Figure 2 turns the same design into a layered ownership map. The left column is the control plane: it writes configuration, but it never carries a request. The bands on the right are where requests actually travel. When an incident review asks "who changed this," the answer comes from the control plane; when it asks "who used this," the answer comes from the evidence plane. Confusing the two produces the classic post-incident claim that "the logs show the policy was correct," when the logs only show what the policy decided.
The map is deliberately boring about arrows: every arrow points from a caller to something that can refuse it. If an arrow points at a resource that cannot say no, the diagram is hiding a control gap.
Design Access, Gateway, Tunnel, and Private Service Connectivity
Bellwether has one private API and six legitimate ways to reach it. Compare them on the same criteria: who calls, which Cloudflare object carries the authority, what credential is checked, what evidence exists, and where the plan boundary sits.
| Path | Caller | Cloudflare object | Credential checked | Primary evidence | Availability boundary |
|---|---|---|---|---|---|
| Public hostname | Employee browser | Access self-hosted app + Tunnel route | IdP assertion, group, device posture | Access requests, audit logs | Access is available on all plans; free-tier use is documented for up to 50 users |
| Private IP | Managed device | Access private network app + CIDR route | IdP assertion and client posture | Access requests, network sessions | One Client plus a Split Tunnel include for the CIDR |
| Service call | CI job or partner | Access app + Service Auth policy + token | Client ID and Client Secret | Access requests for non-identity traffic | Service tokens are capped at 50 per account by default |
| Worker to API | Worker | Workers VPC Service binding | No end-user identity; the binding is the authority | Worker logs, VPC Service metrics | Workers VPC beta; free during beta |
| Worker to database | Worker | Hyperdrive plus a TCP VPC Service | Database credential, optionally mTLS | Hyperdrive metrics, database logs | Free: 100k queries per day, 20 origin connections |
| Office to VPC | Site router | WAN GRE/IPsec on-ramp or CNI | Network-level reachability, not user identity | Network sessions, Network Firewall logs | Cloudflare WAN is enterprise-only |
The human path is three separate declarations. An Access application scopes the hostname, a policy decides the group, and a tunnel route makes the CIDR reachable. None of the three implies the others.
A binding is a capability, not an Access app
Access authorizes a request that arrives at an Access application. A Worker calling env.DISPATCH.fetch() exercises a capability the binding grants, so a route that forwards a user-controlled URL into that binding gives the user the binding's reach. A VPC Service binding pins host and port; a VPC Network binding routes by the URL supplied at runtime.
Gateway is not Access, and Access is not Gateway. Gateway evaluates DNS, network, and HTTP policy on traffic that travels through the Cloudflare One Client or a network location, in the documented order: DNS before resolution, resolver policies, DNS after resolution, egress policies, network policies, then HTTP. A DNS block does not stop a user who connects to an IP literal, which is why the network and HTTP layers exist; an Access-protected hostname still needs its own application-layer policy.
Figure 3 traces the human path with the two failures that matter in a review: policy denial and connector loss. The denial branch must stop at the edge. The connector branch is a reachability failure, not an authorization failure, and it should produce a distinct error rather than a misleading login loop.
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','activationBorderColor':'#132440','signalColor':'#5a6e82','signalTextColor':'#132440','noteBkgColor':'#c4873b','noteTextColor':'#132440','noteBorderColor':'#132440','labelBoxBkgColor':'#a8dede','labelBoxBorderColor':'#132440','labelTextColor':'#132440','loopTextColor':'#132440','altBackground':'#f8f9fa','fontFamily':'DM Sans, sans-serif'}}}%%
sequenceDiagram
autonumber
participant U as Operator with One Client
participant A as Cloudflare Access
participant T as Tunnel, two replicas
participant S as Private API 10.20.4.10
U->>A: GET https://dispatch.example.com
A->>A: Check IdP group and device posture
alt Identity or posture fails
A-->>U: 403 block page
Note over A,S: No request reaches the connector
else Policy allows
A-->>U: CF_Authorization cookie
U->>T: Request with signed Access JWT
alt Replica healthy
T->>S: HTTP to 10.20.4.10:8080
S-->>T: 200 response
T-->>U: 200 response
else Connector or route down
T-->>U: 502 or tunnel error 1033
Note over T,S: Reachability failure, not a policy denial
end
end
The important decision behind Figure 3 is where to terminate trust. The private API should accept traffic only from the connector's network position and validate the Access JWT when it needs the user's identity. Bellwether does that for writes and leaves reads to edge policy plus isolation. Validation adds a key-fetch dependency and clock-skew sensitivity; skipping it means the API cannot tell two users apart.
Two bindings, two different authorities. DISPATCH_API is a VPC Service pinned to one host and port, so the Worker cannot be tricked into calling the database or the metadata service. DISPATCH_DB is a Hyperdrive configuration whose origin is a TCP VPC Service; it pools connections near the database and caches eligible reads. The Worker holds no public database endpoint, and the tunnel never exposes the VPC.
For the office path, Cloudflare WAN (formerly Magic WAN) would replace the depot's MPLS handoff with an IPsec or GRE on-ramp, or a private Network Interconnect where latency justifies it. That is enterprise-only, so this capstone treats it as an architecture and tabletop exercise. The accessible substitute is a second Tunnel plus an ADR describing what changes when the WAN on-ramp arrives.
Implement Resource Ownership and Observability
A threat model for this platform is short enough to argue about in a meeting. Spoofing: a stolen CF_Authorization cookie or a leaked service token. Tampering: a dashboard change that drifts from Terraform, or a tunnel route added outside review. Repudiation: a Bypass policy, which Cloudflare documents as enforcing no Access controls and producing no Access log. Information disclosure: an over-broad VPC Network binding or a Hyperdrive cache holding regulated rows. Denial of service: one connector, one database pool, or one Identity Provider. Elevation of privilege: a service token with write scope reused by a read-only job.
Data boundaries deserve more precision than "traffic is encrypted." Three data sets cross three lines:
- Identity data. Email, group, IdP subject, device posture results, and source IP go to Cloudflare. Retention and export depend on the dataset and destination.
- Request data. For Access-protected hostnames, Cloudflare sees the URL, method, headers, and — if the application is not end-to-end encrypted past the edge — the body. Gateway HTTP inspection sees more.
- Application data. When a Worker reads from Postgres through Hyperdrive, the result set is materialized at the edge and, if query caching is on, may be cached in Cloudflare locations. That is a data-residency decision, not a performance setting.
The last point is the one teams miss. Hyperdrive caches eligible read-only responses by default and does not purge them on write, so a later matching read can return the old value until max_age expires. For a dispatch board that is an annoyance; for a permission table it is a security defect.
A write does not invalidate the read cache
With caching enabled by default and no invalidation on write, a Worker can read its own stale row until max_age expires, and stale_while_revalidate extends the window. Route authentication, permissions, and post-write reads through a separate cache-disabled Hyperdrive binding.
Ownership is the other half of observability. Figure 4 assigns each resource to the team that can change it and shows which log source proves what. Platform owns the IdP mapping, Access applications, and reusable policies. Network owns tunnels, CIDR routes, virtual networks, and WAN on-ramps. Application owns the Worker, its bindings, and the Hyperdrive configurations. Security and SRE own Logpush jobs, the evidence store, and the drill reports.
The evidence lane in Figure 4 also exposes a gap. Access has four policy actions — Allow, Block, Bypass, and Service Auth — and Bypass disables enforcement for matching traffic.
Bypass leaves no Access evidence
Cloudflare documents that a Bypass policy enforces no Access controls and produces no Access request log. A platform that claims complete allow-deny evidence while carrying a Bypass policy for a health check or an upload callback has a hole in exactly the place an auditor will look.
Plan Enterprise Extensions and Failure Recovery
The enterprise extensions are where the architecture stops being reproducible on a small account. Cloudflare WAN provides IPsec/GRE on-ramps, BGP peering, and Network Firewall; CNI replaces Internet transit with a private link. Those are enterprise-only, and DLP, CASB, browser isolation, and email security are add-on or plan-dependent.
A screenshot is not a validation
Enterprise-only behavior cannot be proven on a small account. Record each feature as an architecture decision record plus a tabletop with its assumptions and its trigger for adoption, rather than a dashboard screenshot captioned "validated."
The tabletop must be concrete. Bellwether's enterprise extension has four moves:
- Replace the depot's MPLS handoff with an IPsec on-ramp. Two tunnels from different providers, BGP failover, and a static route for
10.20.0.0/16while BGP converges. - Add CNI only if measurement justifies it. It is the right answer when jitter breaks the console, and the wrong answer when the problem is an application timeout.
- Put Network Firewall in front of the WAN path. Cloudflare warns that its rules apply to ICMP, so blocking ICMP from Cloudflare public IPs fails tunnel health checks.
- Add DLP and browser isolation at the data boundary. They change what a user can copy or download after access is granted; they do not fix an over-broad VPC binding.
Failure recovery is a set of documented behaviors, each with a detection signal and a manual escape hatch. Figure 5 contrasts the steady state with the two failures most likely to be exercised in a game day: loss of the active connector and loss of the primary database.
The connector behavior is documented, and the design rule follows directly from it.
Two replicas, two failure domains
A connector opens four outbound, post-quantum encrypted connections to at least two Cloudflare data centers. Replicas share one tunnel UUID, add four connections each, and Cloudflare routes to the closest replica. The documented ceiling is 25 replicas and 100 connections per tunnel; a single-replica tunnel is a scheduled outage.
Failure recovery is a documented behavior per dependency, not a hope. Each row pairs a detection signal with the documented mechanism and the manual escape hatch:
| Dependency | Detection signal | Documented mechanism | Escape hatch |
|---|---|---|---|
| Connector replica | cloudflared tunnel info shows fewer connections; 5xx rate; Access deny spike | Four connections per replica to at least two data centers; replicas share a UUID and Cloudflare routes to the closest | Restart the connector on the standby host |
| Postgres primary | Pool-layer connection errors while the database looks healthy | Hyperdrive pools near the origin and caps origin connections at 20 on Free and 100 on Paid, with defaults of 20 and 60 | Restart the pool as break-glass, then check the Hyperdrive config before blaming the database |
| Identity provider | New logins fail while existing sessions continue | Sessions stay valid until they expire; duration is 15 minutes to one month, 24-hour default | Short-lived, tightly scoped Service Auth token with its own policy and post-use review |
Break-glass is a scoped identity, not a bypass. A short-lived Service Auth token with its own policy and post-use review keeps the evidence chain intact, where a Bypass policy would leave none.
Build a Private Application and Reproducible Access Policies
The build is deliberately small: one private API, one database, two Access paths, one Worker, one evidence bundle. It is marked design-only because execution was not performed at the 2026-11-05 verification date; expected observations stay conditional, not invented.
Build a Private Application and Reproducible Access Policies
Status: design-only — not executed at the 2026-11-05 verification date. No hosted run was performed, so every observation below is conditional rather than measured.
| Input | Requirement |
|---|---|
| Account and zone | A Cloudflare account and a zone you control |
| Identity | An identity provider, or the one-time PIN login |
| Hosts | A Docker host or a small AWS VPC |
| CLI | cloudflared, wrangler, curl, jq |
| Terraform | 1.9 or later, Cloudflare provider pinned to 5.28.1 |
| Plan | Access and Tunnel on Free support up to 50 users; Workers VPC is free on all Workers plans while in beta; Hyperdrive Free allows 100,000 queries per day; Logpush depends on the datasets and destinations your plan exposes |
Minimal setup. Enterprise-only WAN, CNI, and Network Firewall stay in the tabletop above, not in this build.
| Component | Address | Detail |
|---|---|---|
| Postgres 16 | 10.20.5.20:5432 | dispatch database plus a read-only role |
| HTTP API | 10.20.4.10:8080 | GET /health, GET /loads, POST /loads/:id/assign |
| Test identities | IdP groups | One in dispatch-ops, one outside it |
| Without an AWS VPC | One Docker network | Use 10.20.0.0/16; the trust boundaries are unchanged |
- Record the baseline. Export Access applications, Gateway policies, and the tunnel list, and save
terraform planoutput with the date and provider version. - Create the connectors. Create a tunnel named
bellwether-dispatchand run two connectors on separate hosts. Confirm both share one tunnel UUID and each shows four connections. - Add the route. Add a Tunnel CIDR route for
10.20.0.0/16. If that range overlaps another route, assign a virtual network instead of the default network. - Build the human path. Create an Access self-hosted application for
dispatch.example.comwith a 15-minute session. Add an Allow policy requiringdispatch-opsand a posture check the contractor laptop fails, plus a Block policy for the contractor identity. Verify the block wins. - Build the private IP path. Create a private network application for
10.20.4.10:8080with the same group requirement. Add the CIDR to the Split Tunnel include list on a managed device; confirm an unenrolled device cannot reach the IP. - Prove service auth. Create a service token, scope it to a Service Auth policy on
ci.example.com, and enable strict service token authentication. Confirm a request without the token gets401or403, not a redirect. - Deploy the Worker. Use a VPC Service binding
DISPATCH_APIfor10.20.4.10:8080and aDISPATCH_DBHyperdrive configuration whose origin is the TCP VPC Service. Keep a second Hyperdrive configuration with caching disabled. - Add Gateway policy. Add Gateway DNS and HTTP policies blocking a test domain for
dispatch-ops. Confirm the DNS policy alone does not stop a direct IP request. - Exercise deny and failure. Request as an unauthorized user and confirm a 403 with an Access log row; stop one connector and confirm requests continue through the other, with a different
DestinationReplicaID. - Produce the evidence bundle. Collect 24 hours of Access requests, audit logs, Gateway DNS and HTTP logs, network sessions, and Worker logs; a policy export; an empty
terraform plan; and one ADR per non-obvious choice.
Expected observations are conditional, not measured.
| Check | Expected observation | Failure signal |
|---|---|---|
| Allowed user | App loads, with an Access log row marked allow | A 200 with no Access row |
| Denied user | Block page, and no request at the origin | An origin hit after the deny |
| Stopped connector | Reachability error or 502, not a policy denial | A login loop, or a policy-denial message |
| Cached read after write | The old row may return until max_age expires | The cache-disabled binding also returns the old row |
| Fresh read after write | The cache-disabled binding returns the new row | The fresh binding returns the old row |
| Missing service token | 401 or 403 under strict authentication | A 302 redirect to a login page |
Failure checks. An app reachable without an Access policy, a Bypass policy in the export, a request that reaches the origin after a deny, a single-replica tunnel, a service token with account-wide scope, or a Worker route that forwards a user-supplied URL into a VPC Network binding.
Cost dimensions: Access and Tunnel plan tier, Workers request volume, Hyperdrive query volume and origin connections, Logpush export and storage, database instance time, tunnel host compute, and staff time for the drills. No dollar figures are quoted because pricing and included usage change.
Cleanup: delete the Access applications and policies, revoke the service token, delete the Hyperdrive configurations, delete the Worker and its bindings, delete the tunnel routes and the tunnel, remove the containers, delete the Logpush jobs, and remove the test DNS records. Keep the evidence bundle and ADRs; they are the deliverable.
Figure 6 turns the card into a gate sequence. The loops matter: a failed deny test sends you back to policy design, not forward to the next step, and a stale-read failure sends you back to binding design, not to a larger cache.
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','activationBorderColor':'#132440','signalColor':'#5a6e82','signalTextColor':'#132440','noteBkgColor':'#c4873b','noteTextColor':'#132440','noteBorderColor':'#132440','labelBoxBkgColor':'#a8dede','labelBoxBorderColor':'#132440','labelTextColor':'#132440','loopTextColor':'#132440','altBackground':'#f8f9fa','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart LR
B["Baseline export + plan"] --> S["Stage one app, one group"]
S --> A{"Allow test: 200 and logged?"}
A -->|no| R1["Fix policy or posture; do not widen"]
A -->|yes| D{"Deny test: 403, origin untouched?"}
D -->|no| R2["Check app coverage and Bypass"]
D -->|yes| F{"Connector failure: still served?"}
F -->|no| R3["Add a replica in another domain"]
F -->|yes| H{"Write then read: fresh where required?"}
H -->|no| R4["Split cached and cache-disabled bindings"]
H -->|yes| E["Freeze evidence bundle and ADRs"]
R1 --> S
R2 --> S
R3 --> S
R4 --> S
classDef primary fill:#132440,color:#ffffff,stroke:#0b172b;
classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a;
classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f;
classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420;
classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f;
class B,R1 primary;
class S,R3,H,E secondary;
class A,R4 ok;
class D,R2,F danger;
Submit Allow-Deny Evidence, Architecture Decisions, and Recovery Results
A capstone submission is a set of claims, each with an observation that could have failed. Use the following pass/fail checklist; every item names the evidence, not the intention.
- E1 — Allow path. A named member of
dispatch-opsreachesdispatch.example.comand the origin serves200. Pass requires an Access request row with the application UUID, the user's email, and an allow decision. - E2 — Identity deny. A user outside the group receives a block page. Pass requires a deny row and zero matching requests in the origin or connector log.
- E3 — Posture deny. A managed-identity user on a device that fails the posture check is denied. Pass requires the same two observations as E2.
- E4 — Service auth. A CI request with a valid service token succeeds; the same request without it receives
401or403under strict authentication, not a302to a login page. - E5 — Reachability is not permission. In a controlled staging hostname, a tunnel route with no Access application is reachable, proving the negative control; delete it after.
- E6 — Private route isolation. An unenrolled device cannot reach
10.20.4.10:8080; an enrolled but unauthorized user is denied by Access. - E7 — Binding scope. The
DISPATCH_APIbinding reaches only the configured host and port; an attempt to address another host fails. - E8 — Freshness. A write followed by an immediate read through the cached binding may return the old row until
max_age; the cache-disabled binding returns the new row. - E9 — Connector resilience. Stopping one replica does not interrupt requests, and network session logs show the surviving replica.
- E10 — Evidence completeness. A 24-hour export contains the named datasets, the policy export contains no unexplained Bypass policy, and
terraform planis empty.
Score the design with six dimensions, each 0–2: identity and policy (are deny paths explicit and logged?), reachability (are tunnel, route, and binding scopes minimal?), data boundary (are cache, inspection, and residency decisions written down?), observability (does each claim have a dataset?), recovery (does each failure have a mechanism and an owner?), and reproducibility (can a second engineer rebuild it from the repository?). A total of 12 is possible; 9 or more passes only if E1–E4 and E10 pass.
Three ADRs carry the design: A1 uses a public hostname for humans and a VPC Service binding for the Worker; A2 splits cached from cache-disabled Hyperdrive bindings; A3 defers Cloudflare WAN until a named latency metric crosses a threshold. Recovery results record four timestamps — first failed request, detection, failover, full recovery — each with the log line that proves it.
Self-check.
Why doesn't the Access policy on dispatch.example.com protect 10.20.4.10:8080? Because Access authorizes requests to a specific application definition. The private IP is a different destination and, for client-based access, a different application type with its own policy and route. Covering one hostname does not cover the CIDR behind it.
What is the risk of a VPC Network binding in a Worker that forwards user input? The binding can reach anything the tunnel or Mesh network can reach, and routing follows the URL supplied at runtime. A user who controls the path becomes a confused deputy inside the private network. A VPC Service binding pins host and port and removes that choice.
Why can a read after a write return stale data? Hyperdrive caches eligible read-only queries by default and does not invalidate them on write. A later matching read may be served from cache until max_age expires, with stale_while_revalidate extending the window. Authentication, permissions, and post-write reads belong on a cache-disabled configuration.
Which failures are reachability failures rather than policy failures? A dead connector, a missing CIDR route, a Split Tunnel exclusion, an overlapping virtual network, and a database pool that cannot connect. They produce timeouts or tunnel errors, not block pages, so mixing them up sends responders to the wrong control plane.
Verification date: 2026-11-05. Behavior, plan boundaries, and limits were checked against Cloudflare documentation on that date; the Terraform provider release checked was 5.28.1, published 2026-10-20. No hosted execution was performed, so there are no tested runtime versions.
Unresolved limitations. Workers VPC is in beta and free during beta, and the Cloudflare Terraform provider 5.28.1 has no Workers VPC Service resource, so that part of the build is Wrangler- or API-managed and sits outside Terraform state. Cloudflare WAN, CNI, and Network Firewall are enterprise-only and were assessed by architecture and tabletop, not hosted validation. Logpush dataset and destination availability varies by plan and was not confirmed in a live account. No latency, throughput, failover time, or dollar figure in this article is measured; all such statements are mechanisms or team targets. The Hyperdrive cache, VPC metrics, and strict service token behavior reflect documentation published before the verification date and may change.
References. Cloudflare One overview: https://developers.cloudflare.com/cloudflare-one/ — Access policies and actions: https://developers.cloudflare.com/cloudflare-one/access-controls/policies/ — Application types: https://developers.cloudflare.com/cloudflare-one/access-controls/applications/choose-application-type/ — Service tokens: https://developers.cloudflare.com/cloudflare-one/access-controls/service-credentials/service-tokens/ — Tunnel configuration and replicas: https://developers.cloudflare.com/tunnel/configuration/ — Gateway order of enforcement: https://developers.cloudflare.com/cloudflare-one/traffic-controls/order-of-enforcement/ — Logpush for Zero Trust: https://developers.cloudflare.com/cloudflare-one/insights/logs/logpush/ — Workers VPC: https://developers.cloudflare.com/workers-vpc/ — Workers VPC binding API: https://developers.cloudflare.com/workers-vpc/api/ — VPC Services: https://developers.cloudflare.com/workers-vpc/configuration/vpc-services/ — Hyperdrive query caching: https://developers.cloudflare.com/hyperdrive/concepts/query-caching/ — Hyperdrive pricing: https://developers.cloudflare.com/hyperdrive/platform/pricing/ — Cloudflare WAN: https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-wan/ — Network Interconnect: https://developers.cloudflare.com/cloudflare-wan/network-interconnect/ — Cloudflare Terraform: https://developers.cloudflare.com/terraform/ — Cloudflare Pulumi: https://developers.cloudflare.com/pulumi/.
For the surrounding material, see Protect a Private Application With Access and Tunnel, Route Devices and Private Networks Through Cloudflare One, Connect Cloudflare to AWS, Azure, and Private Services, Understand Cloudflare's Enterprise Network Services, "Turn Cloudflare Traffic Into Useful Evidence", and "Manage Cloudflare With APIs and Infrastructure as Code".