Hardening work on the pg-pkg API surface.
Task
pg-pkg has no rate-limiting middleware. Add per-IP rate limiting (e.g. via actix-governor) to the /v2 scope in pg-pkg/src/server.rs, with tighter limits on the /start, /key, and /api-key/validate endpoints.
- add
actix-governor (or equivalent) rate-limiting middleware to the pg-pkg /v2 route scope in pg-pkg/src/server.rs
- apply stricter per-IP limits to
POST /start, GET /key, GET /key/{timestamp}, and GET /api-key/validate
- expose the rate limit via
Cargo.toml feature or dependency
- add integration tests that verify 429 responses after the limit is exceeded
Hardening work on the
pg-pkgAPI surface.Task
pg-pkghas no rate-limiting middleware. Add per-IP rate limiting (e.g. viaactix-governor) to the/v2scope inpg-pkg/src/server.rs, with tighter limits on the/start,/key, and/api-key/validateendpoints.actix-governor(or equivalent) rate-limiting middleware to thepg-pkg/v2route scope inpg-pkg/src/server.rsPOST /start,GET /key,GET /key/{timestamp}, andGET /api-key/validateCargo.tomlfeature or dependency