Indexer: enforce LCD-heavy route rate limits in production (#363) #873
No reviewers
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic!873
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-363-lcd-heavy-rate-limits-prod"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
GitLab #363 (H7 follow-up from #361): production indexers can no longer accidentally disable the LCD-heavy per-IP rate limit.
RUN_MODE=prod:RATE_LIMIT_LCD_HEAVY_RPS=0(andRATE_LIMIT_RPS=0) are clamped to defaults 10 / 60 with startuptracing::warn!messages.main.rs).deploy-dex-local.sh) setsRATE_LIMIT_LCD_HEAVY_RPS=10while keepingRATE_LIMIT_RPS=0for Playwright/UI bursts.docs/operator-secrets.md, cross-linked fromskills/AGENTS_INDEXER_API_LCD_SECURITY.mdanddocs/indexer-invariants.md.prod_lcd_heavy_rate_limit_enforced_when_env_zerocovers the prod config path (clamp + 429 +Retry-After).Acceptance checklist
cd indexer && cargo test --lib config::tests::prod_forces_nonzero_rate_limits_when_zerodocs/operator-secrets.md,skills/AGENTS_INDEXER_API_LCD_SECURITY.mdcd indexer && cargo test --test security prod_lcd_heavy -j 1 -- --test-threads=1cd indexer && cargo test --test api_route_solve(debounced quote paths succeed); live burst manual on QA indexerVerification for third parties
Related: #361, #278, #355, #239
changed the description
changed the description
Security review — MR !873
Commit reviewed:
f29d2de543bd09522429fc7e20cdd12de96c1dc9Scope: Production LCD-heavy rate-limit enforcement (#363):
config.rsprod clamp + startup warnings,main.rseffective-limit logging,deploy-dex-local.shlocal profile, docs, security integration test.Outcome:
FINDINGS: 0medium+ — NONESummary
Reviewed added/modified paths and traced attacker-controlled inputs to sinks. This MR is defensive hardening only; no new HTTP routes, LCD query logic, auth layers, or dependencies.
RATE_LIMIT_*=0)RunMode::Prodstill forces 60/10 RPS via existingapply_rate_limit_layerpath; MR adds constants,tracing::warn!, and integration test coverage. Not bypassable via request input.PeerIpKeyExtractor(socket peer IP); no trustedX-Forwarded-For.api/mod.rs; no new unthrottled LCD fanout paths.RATE_LIMIT_RPS=0,RATE_LIMIT_LCD_HEAVY_RPS=10)API_BIND=127.0.0.1. Does not weaken prod whenRUN_MODE=prod.Inline threads: none (no medium+ findings).
Prior security-review comments on this MR: none found.
mentioned in issue #363
mentioned in commit
823daf68ee