Turnstile

Backed by: @pithy-sh/turnstile, its GET {basePath}/admin/widgets, answered by your own Worker. Scope: turnstile:widgets:read.

What it shows

Turnstile is the capability it reads, the widget read is the response behind it, and provisioning is how a widget gets its sitekey.

Which widget guards this environment, and how its challenges went, read live from your Worker. It appears in the rail under Operations, beside Secrets and Vector, when your Worker composes turnstile, at whatever path you mounted it. A widget is the environment as a running system, not your customers’ business.

The index lists every widget your config declares, visible first. Each row carries its sitekey, or No sitekey, and one chip:

ChipWhen
RealA real sitekey is in force, and Cloudflare is asked how its challenges went
Test keyOne of Cloudflare’s test keys, where one belongs: dev, staging, a feature build
MisconfiguredA test key anywhere else, prod included
Not configuredNo sitekey is in force here, so no widget renders

A config that declares no widget says so, rather than showing an empty list.

The record

Widget: the mode and the sitekey. For a test key or a misconfigured widget, also the outcome the key is fixed to: Always passes, Always fails or Always challenges.

Challenges: issued, solved and unsolved, and the solve rate. With nothing issued the rate reads Nothing issued, never 0%.

Siteverify: how many tokens siteverify passed in the window, and how many it refused.

Every event: each event type Cloudflare counted in the window, with its count.

Only a real widget has the last three. A test key’s outcome is fixed, so nothing is counted, and a misconfigured or unconfigured widget is not asked about at all.

The window is yours to choose

7, 30 or 90 days, opening on 30, the kit’s own default. A real widget’s record names the span it covers, from and to. A window is fixed when you choose it, and refreshing a chosen window chooses it again, ending now. Switching environment opens on 30 days again.

A window Cloudflare will not answer is refused, with your Worker’s sentence, which names the cap, and the chooser stays on screen so you can ask for another.

Your Worker’s sentence, not ours

A test key, a misconfigured or unconfigured widget, and both analytics refusals are drawn with the message your Worker sent, verbatim, as text. Your Worker knows its environment and its Cloudflare account, and we know neither, so the pane writes no remedy of its own.

The two refusals are turnstile/analytics_window and turnstile/analytics_unavailable, an account Cloudflare serves no Turnstile analytics. For those two codes, and only for a pane that names them, the dashboard reads your Worker’s error body: at most 4 KB, kept only when it is the kit’s error payload with one of the named codes, and never on a 401 or a 403. Every other failure is drawn with our own sentence.

Read once, held nowhere

The pane reads when you open it, on the current connection, and keeps nothing. The answer is parsed with the capability’s own schema, not cached, not even for the screen’s minute, and held in no Pithy table. A response that does not parse fails on screen, naming the environment.

A connection without turnstile:widgets:read is refused by name, and nothing is sent. The scope is a read, so it is in the default grant; Scopes has how to add one to a connection made before it existed.

It reads, and it never writes

Minting a widget and recording its account are not buttons here. Both belong to the CLI: pithy turnstile provision.

ESC