Skip to content

Enforce Cloud Armor metadata rate-limit rule#3762

Open
anth-volk wants to merge 1 commit into
masterfrom
feat/armor-enforce-metadata
Open

Enforce Cloud Armor metadata rate-limit rule#3762
anth-volk wants to merge 1 commit into
masterfrom
feat/armor-enforce-metadata

Conversation

@anth-volk

Copy link
Copy Markdown
Collaborator

Summary

  • Enforces the /{cc}/metadata per-IP throttle (30/60s) on pol-api-lb — removes preview. Worst legitimate per-IP rate in the preview window was 5/min (6× headroom); the rule's target is overnight scraper waves.
  • Keeps the /{cc}/calculate(-full) throttle (75/60s) in preview: observed legitimate/partner clients run 39–88/min on that path, so enforcing would 429 real use — including a partner's documented "fall back to the internal API when household API latency > 30s" behavior.
  • Adds the enforced-policy snapshot under docs/migration/armor/ and documents that Cloud Armor throttle rules only log CONFORM in preview (so enforcement readiness is judged from raw LB-log rate analysis, not preview outcome counts).

Verified: normal (gzip) metadata fetches return 200 post-enforcement; rule state confirmed via security-policies describe (1000 preview=false, 1100 preview=true).

🤖 Generated with Claude Code

metadata (30/60s) enforced 2026-07-21: worst legit per-IP rate observed in
the preview window was 5/min, 6x under the threshold. calculate (75/60s)
stays in preview — observed legit/partner clients run 39-88/min there, so
enforcing would 429 real use including the partner's API fallback. Also
documents that Armor throttle rules log only CONFORM in preview, so
enforcement readiness must be judged from raw LB-log rate analysis.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.03%. Comparing base (64b3b3a) to head (1543d24).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3762   +/-   ##
=======================================
  Coverage   80.03%   80.03%           
=======================================
  Files          70       70           
  Lines        4342     4342           
  Branches      809      809           
=======================================
  Hits         3475     3475           
  Misses        648      648           
  Partials      219      219           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant