Back to Cloudflare

Capstone D: Design and Validate a Zero Trust Multicloud Platform

November 5, 2026 Wasil Zafar 35 min read

Connect user access, private APIs, IaC, evidence, and resilience

Table of Contents

  1. Define Identities, Applications, Networks, and Trust Boundaries
  2. Design Access, Gateway, Tunnel, and Private Service Connectivity
  3. Implement Resource Ownership and Observability
  4. Plan Enterprise Extensions and Failure Recovery
  5. Build a Private Application and Reproducible Access Policies
  6. Submit Allow-Deny Evidence, Architecture Decisions, and Recovery Results

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:

PlaneWhat it decidesFailure if skipped
IdentityAn identity provider (IdP) authenticates a human or a workload; Cloudflare Access consumes the assertionCloudflare becomes the password store it was never meant to be
PolicyAccess 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 outboundA reachable service is treated as an authorized one
ReachabilityTunnel, Mesh, and WAN create paths; a tunnel UUID and a connector are reachability objects, not permissionsA route exists that no policy covers
DataWorkers VPC bindings and Hyperdrive connect a Worker to a private service or databaseThe Worker inherits more authority than the route it serves
EvidenceAccess, Gateway, network session, Worker, and audit logs record different parts of one requestA 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.

Define Identities, Applications, Networks, and Trust Boundaries
%%{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:

  1. 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.
  2. 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.
  3. 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.
  4. Worker to private service. A VPC binding is a capability. Whatever the Worker can address through that binding is inside the Worker's authority.
  5. 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.

Five trust boundaries and their owners for a multicloud dispatch platform Layers from untrusted devices through identity, Cloudflare policy, an AWS VPC, and data. A control plane column on the left writes configuration but is not in the request path. Boundary labels mark where a security claim changes hands. Five boundaries, named owners, one request path Configuration enters from the left. Requests travel through the bands. Control plane Terraform 5.28.1 IdP admin console Logpush job config Scoped API tokens Writes desired state, never carries a request Devices — untrusted Owner: IT / endpoint Managed laptop + One Client Contractor browser B1: device trust ends here Identity — authenticated, not authorized Owner: Platform Corporate IdP: OIDC / SAML Groups + posture claims B2: identity becomes a policy input Cloudflare policy and edge Owner: Security / Platform Access app + policy Gateway DNS / network / HTTP Worker dispatch-api bindings decide reach Hyperdrive pool + query cache B3: edge to private network Private network — AWS VPC 10.20.0.0/16 Owner: Network / App cloudflared 2 replicas, 1 UUID Private API 10.20.4.10:8080 Postgres 10.20.5.20:5432 B4: binding capability Data boundary Owner: Data / App Rows, cache entries, and backups. Encryption and grants are separate from identity. B5: data leaves the VPC only through an authorized path

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.

PathCallerCloudflare objectCredential checkedPrimary evidenceAvailability boundary
Public hostnameEmployee browserAccess self-hosted app + Tunnel routeIdP assertion, group, device postureAccess requests, audit logsAccess is available on all plans; free-tier use is documented for up to 50 users
Private IPManaged deviceAccess private network app + CIDR routeIdP assertion and client postureAccess requests, network sessionsOne Client plus a Split Tunnel include for the CIDR
Service callCI job or partnerAccess app + Service Auth policy + tokenClient ID and Client SecretAccess requests for non-identity trafficService tokens are capped at 50 per account by default
Worker to APIWorkerWorkers VPC Service bindingNo end-user identity; the binding is the authorityWorker logs, VPC Service metricsWorkers VPC beta; free during beta
Worker to databaseWorkerHyperdrive plus a TCP VPC ServiceDatabase credential, optionally mTLSHyperdrive metrics, database logsFree: 100k queries per day, 20 origin connections
Office to VPCSite routerWAN GRE/IPsec on-ramp or CNINetwork-level reachability, not user identityNetwork sessions, Network Firewall logsCloudflare 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.

# Human path: application, policy, and route are separate declarations.
resource "cloudflare_zero_trust_access_application" "dispatch" {
  account_id       = var.account_id
  name             = "Dispatch console"
  domain           = "dispatch.example.com"
  type             = "self_hosted"
  session_duration = "15m"

  policies = [{
    name       = "dispatch-ops allow"
    decision   = "allow"
    precedence = 1
    include    = [{ group = { id = var.dispatch_ops_group_id } }]
  }]
}

resource "cloudflare_zero_trust_tunnel_cloudflared_route" "dispatch_net" {
  account_id = var.account_id
  network    = "10.20.0.0/16"
  tunnel_id  = var.tunnel_id
  comment    = "Dispatch VPC"
}
# Route and policy fail independently, so check both.
cloudflared tunnel info "$TUNNEL_ID"
curl -sS -o /dev/null -w '%{http_code}\n' https://dispatch.example.com/health

# The private IP is a different destination with its own application and policy.
curl -sS -o /dev/null -w '%{http_code}\n' http://10.20.4.10:8080/health

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.

Design Access, Gateway, Tunnel, and Private Service Connectivity
%%{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.

# DISPATCH_DB: Terraform owns the Hyperdrive config.
# The origin is a TCP VPC Service, not a public database endpoint.
resource "cloudflare_hyperdrive_config" "dispatch_db" {
  account_id = var.account_id
  name       = "dispatch-db"

  origin = {
    scheme     = "postgres"
    database   = "dispatch"
    user       = var.dispatch_db_user
    password   = var.dispatch_db_password
    service_id = var.dispatch_db_service_id
  }

  caching = {
    disabled = false
  }
}
# DISPATCH_API and the cache-disabled binding are applied by Wrangler or the API,
# because provider 5.28.1 has no Workers VPC Service resource.
wrangler deploy
wrangler tail dispatch-api --format pretty

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.

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.

Resource ownership lanes and the log source that proves each layer Four lanes: Platform and Identity, Network, Application, and Security and Evidence. Each lane lists the resources it owns and sends arrows to the evidence lane. A callout marks Access Bypass policies as an unlogged path. Every resource has an owner and a proof source Dashed arrows are evidence exports, not request traffic. Platform Identity and Access policy IdP + groups OIDC / SAML SCIM membership Access apps self-hosted, private, infrastructure Reusable policies Allow, Block, Service Auth Service tokens scoped, rotated, tagged by env Network Reachability and routes Tunnel + replicas 1 UUID, 25 max 4 links, 2 DCs each CIDR routes and Split Tunnel includes Virtual networks for overlapping CIDRs VPC Services host and port pinned Application Code, bindings, database path Worker dispatch-api routes and auth VPC binding DISPATCH_API pinned target Hyperdrive cached reads pool near DB Second binding caching disabled fresh reads Security and SRE — evidence, not traffic Logpush jobs Access, audit, Gateway, network sessions ADRs decision and tradeoff record Drill report timestamps, not estimates Evidence store / SIEM 24h baseline, then retention policy Unlogged path: an Access Bypass policy matches before Allow and produces no Access request log.

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:

  1. 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/16 while BGP converges.
  2. 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.
  3. 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.
  4. 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.

Steady state and two failure paths for the dispatch platform Left panel shows a request through Access, the edge, active connector A, the private API, and the primary database, with a standby connector path. Right panel shows connector A lost, traffic moving to connector B, and the database failing over to a replica. A bottom note records the enterprise WAN alternative, which is not exercised. Same request, two outcomes Failover targets are team decisions; the diagram records mechanism, not measured time. Steady state Operator + One Client Access policy: allow Cloudflare edge Connector A, active Private API Postgres primary Every hop has a refusal point. The standby path is idle, not load-balanced. Dashed: connector B, same tunnel UUID, promoted only when A stops. Failure: connector A lost, primary DB demoted Operator + One Client Access policy: allow Cloudflare edge Connector B, promoted Private API Postgres replica Connector A: no heartbeat Detection: tunnel health, 5xx rate, Access deny spike. Enterprise alternative, not exercised: WAN GRE to CNI failover governed by BGP, with Network Firewall health checks permitting ICMP.

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.

# One tunnel UUID, two connector hosts, four connections each.
cloudflared tunnel create bellwether-dispatch
cloudflared tunnel route ip add 10.20.0.0/16 <TUNNEL_ID>
cloudflared tunnel run bellwether-dispatch   # host A
cloudflared tunnel run bellwether-dispatch   # host B

# Count connections before trusting the replica.
cloudflared tunnel info bellwether-dispatch

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:

DependencyDetection signalDocumented mechanismEscape hatch
Connector replicacloudflared tunnel info shows fewer connections; 5xx rate; Access deny spikeFour connections per replica to at least two data centers; replicas share a UUID and Cloudflare routes to the closestRestart the connector on the standby host
Postgres primaryPool-layer connection errors while the database looks healthyHyperdrive pools near the origin and caps origin connections at 20 on Free and 100 on Paid, with defaults of 20 and 60Restart the pool as break-glass, then check the Hyperdrive config before blaming the database
Identity providerNew logins fail while existing sessions continueSessions stay valid until they expire; duration is 15 minutes to one month, 24-hour defaultShort-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.

Capstone build

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.

InputRequirement
Account and zoneA Cloudflare account and a zone you control
IdentityAn identity provider, or the one-time PIN login
HostsA Docker host or a small AWS VPC
CLIcloudflared, wrangler, curl, jq
Terraform1.9 or later, Cloudflare provider pinned to 5.28.1
PlanAccess 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.

ComponentAddressDetail
Postgres 1610.20.5.20:5432dispatch database plus a read-only role
HTTP API10.20.4.10:8080GET /health, GET /loads, POST /loads/:id/assign
Test identitiesIdP groupsOne in dispatch-ops, one outside it
Without an AWS VPCOne Docker networkUse 10.20.0.0/16; the trust boundaries are unchanged
  1. Record the baseline. Export Access applications, Gateway policies, and the tunnel list, and save terraform plan output with the date and provider version.
  2. Create the connectors. Create a tunnel named bellwether-dispatch and run two connectors on separate hosts. Confirm both share one tunnel UUID and each shows four connections.
  3. 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.
  4. Build the human path. Create an Access self-hosted application for dispatch.example.com with a 15-minute session. Add an Allow policy requiring dispatch-ops and a posture check the contractor laptop fails, plus a Block policy for the contractor identity. Verify the block wins.
  5. Build the private IP path. Create a private network application for 10.20.4.10:8080 with 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.
  6. 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 gets 401 or 403, not a redirect.
  7. Deploy the Worker. Use a VPC Service binding DISPATCH_API for 10.20.4.10:8080 and a DISPATCH_DB Hyperdrive configuration whose origin is the TCP VPC Service. Keep a second Hyperdrive configuration with caching disabled.
  8. 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.
  9. 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.
  10. 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.

CheckExpected observationFailure signal
Allowed userApp loads, with an Access log row marked allowA 200 with no Access row
Denied userBlock page, and no request at the originAn origin hit after the deny
Stopped connectorReachability error or 502, not a policy denialA login loop, or a policy-denial message
Cached read after writeThe old row may return until max_age expiresThe cache-disabled binding also returns the old row
Fresh read after writeThe cache-disabled binding returns the new rowThe fresh binding returns the old row
Missing service token401 or 403 under strict authenticationA 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.

Build a Private Application and Reproducible Access Policies
%%{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-ops reaches dispatch.example.com and the origin serves 200. 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 401 or 403 under strict authentication, not a 302 to 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_API binding 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 plan is 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".