Repository navigation
feat(pipeline): reference parity for exclude_paths, client resolution, config wiring and the response pass - #84
Merged
Conversation
… config and response pass parity
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 #83
This brings actix-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 tower and axum).
exclude_pathsuses the engine matcher and a scoped pipeline (ban check, global IP, country and cloud rules, rate limit, then the scoped response pass with metrics, security headers, CORS and the modifier).GuardExclusionScopedmarks the request.X-Forwarded-For(with_client_policy), with the 403Client address could not be determinedfor a peer-less request underfail_secure; the WebSocket guard takes the same policy.from_security_configgoes through the engine's sharedWiring(from_security_config_withtakes the injected agent), withagent_stats, metrics, the event bus, the cloud refresh andspawn_dynamic_ruleswired from the config. The response processor now shares the ban manager with the ban stage, so a return-rule ban is enforced.Hostheader as the connecting peer and trustedX-Forwarded-Protounconditionally throughconnection_info(); the IP gate decision was read before the gate ran; a route's auth rules ignored the globalauth_verifier.docs/api.md, the CHANGELOG.Not applied:
route_resolution_strict(actix resolves routes after the middleware), the request-body part ofbody_read_timeout, and theredisfeature passthrough. The CORS preflight still answers before the pipeline, and usage rules still run before it, unlike the reference.Gates run locally: check, fmt, clippy, the engine probe build, tests (169 unit, 27 integration, 40 parity, 16 API), docs with
-D warnings, the 100% line coverage gate and the MSRV 1.92 check.