Repository navigation
feat(pipeline): reference parity for exclude_paths, client resolution, config wiring and the response pass - #85
Merged
Conversation
…lient resolution and config wiring
… config and response pass parity
…status statements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #84
This brings rocket-guard-rs to parity with the Python reference. It needs the engine API from Guard-Core/guard-core-rs#143, so CI stays red until that merges. Merge order: guard-core-rs#143, then this PR (independent of the other adapters).
exclude_pathsuses the engine matcher and a scoped pipeline (ban check, global IP, country and cloud rules, rate limit, then the scoped response pass).GuardExclusionScopedis a request guard. The CORS preflight runs before the exclusion decision.ClientPolicy(trusted proxies, depth,X-Forwarded-For,with_client_policy) instead of Rocket'sclient_ip(), which honorsX-Real-IPfrom any peer. A peer-less request gets 403Client address could not be determinedunderfail_secure; the WebSocket guard takes the same policy.from_security_configgoes through the engine's sharedWiring(from_security_config_withtakes the injected agent), with liveagent_stats, metrics, the event bus, the cloud refresh andspawn_dynamic_rules. The response processor shares the ban manager with the ban stage.body_read_timeout, 500 on error), runs the modifier without a processor, and an all-bypass route calls the downstream and applies only the modifier.auth_verifierwas not the fallback for route auth rules.docs/api.md, AGENTS.md, CLAUDE.md, Cargo.toml and the CHANGELOG.Not applied:
route_resolution_strict(Rocket resolves routes afteron_request) and the request-body part ofbody_read_timeout. The TLS listener path is untested because thetlsfeature is off.Gates run locally: check, fmt, clippy (also the workspace), the engine probe build, tests (152 unit, 45 integration, 39 parity, 18 API), docs with
-D warningsand the 100% line coverage gate. I did not run the MSRV job here.