Skip to content

Enforce Cloud Armor metadata rate-limit rule - #3762

Merged
anth-volk merged 2 commits into
masterfrom
feat/armor-enforce-metadata
Aug 30, 2026
Merged

Enforce Cloud Armor metadata rate-limit rule#3762
anth-volk merged 2 commits into
masterfrom
feat/armor-enforce-metadata

Conversation

@anth-volk

@anth-volk anth-volk commented Jul 21, 2026

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).
  • Re-exports the live pol-api-lb policy on 2026-08-30. The refreshed snapshot is byte-for-byte identical to the 2026-07-21 enforced-policy snapshot, confirming that the deployed configuration has not drifted.

Verified: normal (gzip) metadata fetches return 200 post-enforcement; rule state confirmed via security-policies describe (1000 preview=false, 1100 preview=true); current deployed policy re-exported and compared with the prior snapshot.

🤖 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 85.49%. Comparing base (64b3b3a) to head (bef82ac).
⚠️ Report is 197 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3762      +/-   ##
==========================================
+ Coverage   80.03%   85.49%   +5.46%     
==========================================
  Files          70       95      +25     
  Lines        4342     5902    +1560     
  Branches      809     1032     +223     
==========================================
+ Hits         3475     5046    +1571     
+ Misses        648      559      -89     
- Partials      219      297      +78     

☔ 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.

@anth-volk
anth-volk merged commit 5a9e9da into master Aug 30, 2026
12 checks passed
@anth-volk
anth-volk deleted the feat/armor-enforce-metadata branch August 30, 2026 14:43
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