Skip to content

fix(route): route country rules and the unknown client identity follow the reference - #89

Merged
rennf93 merged 1 commit into
masterfrom
fix/route-country-unknown-identity
Oct 15, 2026
Merged

rennf93 merged 1 commit into
masterfrom
fix/route-country-unknown-identity

Conversation

@rennf93

@rennf93 rennf93 commented Oct 15, 2026

Copy link
Copy Markdown
Member

Closes #88

  • fix(route): the route ip_whitelist / ip_blacklist verdict and the route blocked_countries / whitelist_countries verdict now go through the engine's RouteIpGate::evaluate_access, the reference check_route_ip_access. A route whitelist match no longer overrides a blocked country, blocked_countries is asked first, the route country arm has no loopback exemption, and a matching route country whitelist skips the global geo stage.
  • fix(ip): the unknown client identity (no resolvable client address) is denied by a route ip_whitelist or whitelist_countries and by a global whitelist (IpGateConfig::evaluate_unknown), as in the reference. The global country whitelist already denied it.

I added tests/route_country.rs over 2125 rows generated by running the reference (route, global and route+global compositions, including the unknown identity and loopback). On master 158 of 640 route rows, 2 of 45 global rows and 136 of 1440 combined rows fail. This PR needs the guard-core-rs engine PR (Guard-Core/guard-core-rs#149) first, because it uses the new engine API through the sibling path dependency, so its CI stays red until that PR is merged. Fmt, clippy (default and all features), tests, doc, 100% coverage and the MSRV 1.92 check and test pass locally.

@github-actions github-actions Bot added documentation Docs, README, governance files tests Test suite changes area: lib Touches src/ (Rocket Fairing adapter — currently a single-file lib stub) labels Oct 15, 2026
@rennf93
rennf93 merged commit de93f13 into master Oct 15, 2026
11 of 15 checks passed
@rennf93
rennf93 deleted the fix/route-country-unknown-identity branch October 15, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: lib Touches src/ (Rocket Fairing adapter — currently a single-file lib stub) documentation Docs, README, governance files tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(route): route country rules and unknown client identity diverge from the reference

1 participant