All notable changes to this package will be documented in this file.
- Documented Annabel security config publishing and route-level throttle presets.
- Moved Annabel integration provider to
codemonster-ru/annabelasCodemonster\Annabel\Providers\SecurityServiceProvider. - Added PSR-20 clock injection for deterministic rate-limit expiration and headers.
- Removed
Codemonster\Security\Providers\SecurityServiceProviderto keep this package framework-agnostic.
- Included the rate-limiting storage contracts, session/database/Redis storage implementations, and their integration tests in the distributed package.
- Trusted proxy support for rate limiting and IPv6 CIDR matching.
- Database and Redis throttle storages with atomic increments.
AtomicThrottleStorageInterfaceand atomicRateLimiter::attempt()flow.- Throttle presets with login (IP + account) support and
RateLimit-*headers. - Migration for throttle table and optional E2E tests for MySQL/Redis.
- Rate limiting key now uses request path (without query) by default.
csrf_field()respects configured input key;csrf_token()tries DI container when available.
LoginThrottleRequestsmiddleware (useThrottleRequestswithloginpreset).
- If you used
LoginThrottleRequests, switch toThrottleRequestswith theloginpreset. - For multi-node deployments, configure
storageasdatabaseorredis. - If you set a custom table name, ensure the migration uses
security.throttle.table.
- CSRF:
Codemonster\Security\Csrf\VerifyCsrfToken, token managerCodemonster\Security\Csrf\CsrfTokenManager, helperscsrf_token()andcsrf_field(). - Rate limiting:
Codemonster\Security\RateLimiting\ThrottleRequests,Codemonster\Security\RateLimiting\RateLimiter, storage contracts andSessionThrottleStorage. - Integration with Annabel:
Codemonster\Security\Providers\SecurityServiceProvider. - Tests for CSRF and rate limiter.