]>
Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
feat(ocpp2): implement in-memory auth cache with rate limiting and TTL
Add InMemoryAuthCache with comprehensive security features:
- LRU eviction when cache reaches capacity
- TTL-based automatic expiration (configurable, default 1h)
- Built-in rate limiting (10 req/min per identifier, configurable)
- Memory usage tracking and comprehensive statistics
- 45 conformance tests covering G03.FR.01 requirements
Security improvements:
- Mitigates S2 (rate limiting prevents DoS on auth endpoints)
- Mitigates S3 (TTL prevents stale authorization persistence)
- Tracks evictions, hits, misses, expired entries
Completes Phase 2.3 (Security Hardening) and G03.FR.01 cache tests.