Dev pages demonstrating the ENCODE WAF CAPTCHA gate - #2090
Merged
Conversation
ENCODE fronts www.encodeproject.org with an AWS WAF that challenges browser-looking requests, returning 405 with x-amzn-waf-action: captcha. This blocks any igv.js-based app from loading ENCODE tracks during local development. Two dev pages make the failure observable. dev/encode/see-the-captcha.html presents the challenge to a human: the WAF challenges a plain top-level navigation, with no Origin header and no igv.js involved, so clicking a link to an ENCODE bigWig renders a live, solvable AWS WAF puzzle. Also embeds it inline (the response sets no X-Frame-Options and no framing CSP) and dumps the raw challenge HTML that a bigWig reader receives in place of binary data. dev/encode/encode-captcha-gate.html is the diagnostic view: raw range-request probes against two gated ENCODE bigWigs plus an ungated control, the same URLs loaded through igv.js so the partial-page failure is visible, and a copy-pasteable curl repro built from the page's own origin. Measured against the live host: the challenge response carries access-control-allow-origin: * and access-control-expose-headers: x-amzn-waf-action, so page JavaScript can read both the status and the header naming the cause. Reporting "the provider blocked this request" instead of "405" needs no server-side cooperation. Also adds an 'encode' -> 'ENCODE' section label to the dev dashboard generator and regenerates dev/dev.html. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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
ENCODE fronts
www.encodeproject.orgwith an AWS WAF that challenges browser-looking requests, returning405 Method Not Allowedwithx-amzn-waf-action: captcha. The status code is misleading — nothing about the request used the wrong verb — so the failure sends you looking in the wrong place. The practical cost is that no igv.js-based app can load ENCODE tracks during local development, and we can't reproduce user-reported bugs involving ENCODE data on our own machines.Everything written about this so far has been about a status code and a header. Neither of us had actually seen the CAPTCHA.
What's here
dev/encode/see-the-captcha.html— presents the challenge to a human. The key finding: the WAF challenges a plain top-level navigation, with noOriginheader, no localhost, and no igv.js involved. Clicking a link to an ENCODE bigWig renders a live AWS WAF "Human Verification" page with a solvable puzzle widget loaded fromcaptcha.awswaf.com. The page offers three views:X-Frame-Optionsand no framing CSP)dev/encode/encode-captcha-gate.html— the diagnostic view. Raw range-request probes against two gated ENCODE bigWigs plus an ungated control, the same URLs loaded through igv.js so the partial-page failure is visible, and a copy-pasteablecurlrepro built from the page's own origin.Measurements against the live host
One correction to the internal write-up this came from: the challenge response is fully readable from page JavaScript. It carries
access-control-allow-origin: *and, notably,access-control-expose-headers: x-amzn-waf-action. This is not a CORS failure, and reporting "this data provider blocked the request" instead of "405" needs no server-side cooperation — the honest signal is already reachable in the browser.Also
Adds an
'encode' -> 'ENCODE'section label toscripts/buildDevDashboard.cjsand regeneratesdev/dev.html.Testing notes
Use a private/incognito window. Solving a WAF challenge earns an
aws-waf-tokenfor the host that waves you through afterward, so a repeat visit may hand you a file download instead of the puzzle. Both pages warn about this.These are dev pages only — no library code changes.
🤖 Generated with Claude Code