Skip to content

Load the AWS WAF SDK on staging - #4845

Merged
reakaleek merged 2 commits into
mainfrom
feat/waf-staging-prod
Nov 12, 2026
Merged

reakaleek merged 2 commits into
mainfrom
feat/waf-staging-prod

Conversation

@reakaleek

@reakaleek reakaleek commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Why

  • Edge and demo require an AWS WAF token on the browser telemetry endpoints /docs/_api/v1/o/{t,l,m} (elastic/docs-infra#512). It works there as expected.
  • Staging needs the token in the browser before docs-infra can require it there (elastic/docs-infra#513).

Part of elastic/docs-eng-team#1192

What

  • Set waf_integration_url for staging. Staging pages then load the WAF SDK, page feedback sends through AwsWafIntegration.fetch, and telemetry exports wait for the token.
  • Prod is unchanged.

Notes

  • The SDK sets a cookie on a domain the web team owns. It writes aws-waf-token itself: about 480 bytes, path /, 4-day lifetime, on the page host. On staging that is staging-website.elastic.co. Merge only after the web team is fine with it there.
  • Prod is left out on purpose. On www.elastic.co the cookie would go with every request to the whole site. Before prod: cookie consent classification and privacy, Fastly caching with an extra cookie, and *.awswaf.com in any future Content-Security-Policy. That needs the web team's sign-off.
  • Same URL as edge and demo. All environments are in the elastic-web AWS account (197730964718).
  • Nothing enforces the token on staging yet, so behaviour is the same until Add admonitions #513 applies. Staging is behind Google sign-in, so the browser check after deploy needs a logged-in session.

🤖 Generated with Claude Code

@reakaleek
reakaleek requested a review from a team as a code owner November 12, 2026 21:46
@reakaleek
reakaleek requested a review from theletterf November 12, 2026 21:46
@reakaleek
reakaleek marked this pull request as draft November 12, 2026 21:50
@reakaleek reakaleek changed the title Load the AWS WAF SDK on staging and prod Load the AWS WAF SDK on staging Nov 12, 2026
@reakaleek
reakaleek marked this pull request as ready for review November 12, 2026 21:52
@reakaleek
reakaleek merged commit 25f4905 into main Nov 12, 2026
34 of 37 checks passed
@reakaleek
reakaleek deleted the feat/waf-staging-prod branch November 12, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant