Skip to content

Load the AWS WAF SDK on prod - #4846

Merged
reakaleek merged 1 commit into
mainfrom
feat/waf-prod
Nov 13, 2026
Merged

reakaleek merged 1 commit into
mainfrom
feat/waf-prod

Conversation

@reakaleek

Copy link
Copy Markdown
Member

Why

  • The prod browser telemetry endpoints /docs/_api/v1/o/{t,l,m} accept unauthenticated writes (elastic/docs-eng-team#1192).
  • Edge, demo and staging already require an AWS WAF token there. Prod needs the token in the browser before elastic/docs-infra#514 can require it.

Part of elastic/docs-eng-team#1192

What

  • Set waf_integration_url for prod. Prod pages then load the WAF SDK, and telemetry exports wait for the token.
  • Nothing enforces the token on prod until elastic/docs-infra#514 is applied.

Notes

  • The SDK sets an aws-waf-token cookie on www.elastic.co: about 480 bytes, path /, 4-day lifetime. It goes with every request to the site, not only /docs.
  • elastic.co, elastic.co/docs and elastic.co/docs/api all redirect to www.elastic.co, so the token is always issued for www.elastic.co.
  • Same URL as the other environments. All of them are in the elastic-web AWS account (197730964718).
  • After deploy, check that the prod head has the script tag and that /o/* requests carry the cookie. Then mark elastic/docs-infra#514 ready.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@reakaleek
reakaleek requested a review from a team as a code owner November 13, 2026 08:37
@reakaleek
reakaleek requested a review from technige November 13, 2026 08:37
@reakaleek
reakaleek merged commit 4886bba into main Nov 13, 2026
44 of 46 checks passed
@reakaleek
reakaleek deleted the feat/waf-prod branch November 13, 2026 08:42
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