rate_limit: reject unknown keys in the YAML configuration
- Dominant language
- C++
- Stars
- 2k
- Forks
- 874
- Avg merge
- 6d 15h
- Merged PRs (30d)
- 46
Description
The rate_limit YAML parser reads each setting by direct key lookup and ignores anything it does not recognize. A typo or a stale key name silently leaves the setting at its default, with no diagnostic at config load.
This is how `max-age` went unnoticed: every worked example in the documentation spelled the queue and ip-rep aging key with a hyphen, while the parser reads `max_age`, so those configurations parsed cleanly and did nothing.
Parsing sites:
* `plugins/experimental/rate_limit/sni_selector.cc` — `lists`, `ip-rep`, `selector` nodes
* `plugins/experimental/rate_limit/limiter.h` — `queue`, `metrics` sub-nodes
* `plugins/experimental/rate_limit/ip_reputation.cc` — `ip-rep` and `perma-block` sub-nodes
Each node should be validated against the set of keys it accepts, and an unrecognized key should fail the configuration load rather than be dropped.
Contributor guide
Assessment
This issue has not been assessed yet.