docs: rewrite README as a user-facing overview - #31
Merged
Conversation
The README opened by describing itself as a proof of concept and led with the WASM rationale, so a reader had to infer what the service actually does. Lead with that instead: Traefik cannot validate Cloudflare Access cookies itself, this answers 200 or 403 for it. Adds a plain-language request walkthrough, the background refresh intervals (24h keys, 1h app list) so operators know it is self-updating, a configuration table clarifying that CF_ORG is the account ID, and a compose example reduced to the variables that actually do something. Also documents a property that was previously undocumented: every AUD in the account is accepted for every protected route, because get_aud() returns the whole list and passes it to set_audience(). Two apps behind one instance can therefore accept each other's tokens, which matters when choosing what to put it in front of.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The README opened by calling itself a proof of concept and led with the Traefik WASM rationale, so a reader had to work out what the service actually does. This leads with that instead, in plain language: Traefik can't validate Cloudflare Access cookies itself, and this answers
200or403on its behalf.What's in it
CF_ORGis the Cloudflare account ID, which the variable name doesn't suggest.:0.4.0tag pinned instead of:latest.devbox run test/devbox run build, matching CI.One thing newly documented
Every AUD in the account is accepted for every protected route:
get_aud()returns the whole application list and hands it toset_audience(), so a token minted for one app validates against a route protected for another. Two apps behind a single instance can accept each other's tokens.That's an architectural property rather than a defect, but it wasn't written down anywhere, and it's the kind of thing that changes whether you'd put this in front of a writable dashboard. Verified against the code rather than assumed.
Also noted that only
linux/amd64images are published, so arm64 hosts need emulation or a local build.Trimmed from the supplied compose example
NVIDIA_VISIBLE_DEVICES,group_add,TZ,dns,healthcheck,privileged,stdin_open,tty,pull_policyandplatformwere dropped. They're either defaults, host-specific artifacts, or inert here —TZin particular does nothing, since expiry checks use Unix timestamps and the distroless runtime carries no tzdata.🤖 Generated with Claude Code