Skip to content

Verify Approov Tokens at the Edge with Cloudflare Workers

Simple diagram showing Approov Verifier for Cloudflare Workers

Approov Beta is now live

We've launched Approov Beta, a new GitHub organization where customers, partners and developers can explore upcoming Approov projects and collaborate with us before we make them generally available. 

The first project is the Approov Verifier for Cloudflare Workers. It runs in front of your API and verifies Approov tokens at the Cloudflare edge, so every request is checked as it arrives. It easily helps you decode an attestation's ARC, the code that tells you why an attestation has passed or failed. 

What Approov Beta is for

The new Approov Beta organization contains repositories that are feature-complete candidate builds that are going through final hardening. They're ready for you to:

  • review the source
  • deploy to staging
  • run integration tests
  • validate against your own apps and APIs

You are welcome to deploy these into production at your own risk. Stable, production-ready releases will continue to live in the main Approov GitHub organization.

Meet the Approov Verifier for Cloudflare Workers

This version of Approov's Cloudflare worker is our most latest reverse-proxy Cloudflare Worker that sits in front of your API. For every request, it:

  1. Reads the Approov token from a configurable header (Approov-Token by default).
  2. Verifies the token's signature, which tells it whether the token was issued by Approov and whether the attestation passed or failed.
  3. Optionally decodes the arc claim into device-property labels, checks token binding, and verifies message signatures.
  4. Sends the result to your backend, or blocks failed checks at the edge, depending on how you configure it.

Optional capabilities for this Worker are delivered as drop-in plugins: the ARC decoding plugin ships in the repository, and customer-specific confidential logic is delivered separately by Approov.

Two ways to run it: annotate or block

You choose where the decision is made: in your backend (annotate mode) or at the Cloudflare edge (block mode).

Mode

What happens to a request

Where the decision is made

Annotate

Every request is forwarded, with the Worker's verification result attached in an Approov-Result header

Your backend, which rejects anything that didn't pass

Block

Requests that fail a check are rejected at the edge; the rest are forwarded

The Worker, with your backend accepting traffic only from it

In annotate mode, the Worker replaces any Approov-Result header a client tries to send with its own authoritative result. The repository includes backend enforcement guidance for acting on that result and for preventing requests from bypassing the Worker to reach your origin directly.

Fits the way you already use Cloudflare

The repository documents three supported deployment topologies, so you can choose the one that matches your setup:

  • A workers.dev subdomain, the quickest way to try it out
  • A custom domain
  • A Worker Route in front of an existing origin, intercepting requests on an API domain you already manage in Cloudflare

If you use Cloudflare API Shield, there's a deployment checklist and a verification matrix for running API Shield and the Verifier together, so user identity and app integrity are checked side by side.

Try it and tell us what you think

To get started, you'll need:

  • Node.js 22 or later
  • An Approov account, configured to use an ECDSA or RSA key pair for signing tokens (learn about managing keysets here), and the Approov CLI 3.6.0 or later
  • A Cloudflare account with access to Workers

The repository includes a step-by-step Wrangler quickstart, a one-click Deploy to Cloudflare button, configuration validation that catches mistakes before you deploy, and troubleshooting guidance.

Because this is a beta, your feedback helps shape what we release. Follow Approov Beta on GitHub to keep up with new projects and pre-releases. If you're evaluating the Verifier, Watch the repository for updates, and open an issue or pull request to tell us what works and what doesn't.