Skip to content

feat(security): add AdaptiveRateLimiterService with AI-based threat detection#267

Merged
LaGodxy merged 1 commit intoMettaChain:mainfrom
yusuftomilola:feat/adaptive-rate-limiting-243
Mar 29, 2026
Merged

feat(security): add AdaptiveRateLimiterService with AI-based threat detection#267
LaGodxy merged 1 commit intoMettaChain:mainfrom
yusuftomilola:feat/adaptive-rate-limiting-243

Conversation

@yusuftomilola
Copy link
Copy Markdown
Contributor

Summary

  • Add src/security/services/adaptive-rate-limiter.service.tsAdaptiveRateLimiterService
  • evaluate() returns a full allow/deny decision with adaptive limits per request
  • Behavioural anomaly detection: burst pattern detection and failure-rate tracking per IP
  • Per-IP ThreatProfile with trust score (0–100) and threat level (none/low/medium/high/critical)
  • Automatic 15-minute block on critical threat detection
  • API key tier management (free/basic/premium/enterprise) with configurable tier limits
  • Geographic rate limiting and country-level blocking via setGeoLimit
  • blockIp / unblockIp manual moderation and getThreats for threat dashboard

closes #243

…ettaChain#243)

Implement AdaptiveRateLimiterService providing:
- evaluate() returning allow/deny with adaptive limits per request
- Behavioural anomaly detection: burst detection and failure-rate tracking
- Per-IP ThreatProfile with trust score (0–100) and threat level
- Automatic 15-minute IP block on critical threat detection
- API key tier management (free/basic/premium/enterprise) with tier limits
- Geographic rate limiting and country-level blocking
- Manual blockIp / unblockIp moderation controls
- getThreats() to list all IPs above a given threat level
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Mar 29, 2026

@yusuftomilola Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@LaGodxy LaGodxy merged commit e4724c6 into MettaChain:main Mar 29, 2026
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.

[Backend] Implement Advanced Rate Limiting with AI-Based Threat Detection

2 participants