- Add custom RateLimitMiddleware using governor crate for per-IP rate limiting - Two-tier rate limiting: destructive (20 req/min, burst 10) and read (120 req/min, burst 30) - Health endpoints (/health, /api/v1/system/info) exempt from rate limiting - Add max_queue_depth to JobManager (default: 100, configurable via config.yaml) - Return 429 Too Many Requests with Retry-After header when queue is full - Add RateLimitConfig to config.yaml with all rate limit settings - Add 10 tests covering rate limiting, queue depth, and configuration defaults
12 lines
417 B
Rust
12 lines
417 B
Rust
//! Config Module - YAML config with auto-reload
|
|
//!
|
|
//! Handles configuration management as defined in SPEC.md:
|
|
//! - YAML config file loading and parsing
|
|
//! - Config validation before reload (prevent service offline)
|
|
//! - Auto-reload on file change via notify watcher
|
|
|
|
pub mod loader;
|
|
pub use loader::{validate_certs, AppConfig, CertStatus, EnrollmentConfig, RateLimitConfig};
|
|
pub mod validator;
|
|
pub mod watcher;
|