Skip to content

v1.5.0

Choose a tag to compare

@rennf93 rennf93 released this 09 Oct 10:03
· 40 commits to master since this release
Immutable release. Only release title and notes can be modified.
v1.5.0
0e5d397

v1.5.0 (2026-10-09)

The consumption release: the unified config, the route-config carrier knobs, the response-pass funnels, and the behavioral lanes land, training with the 4.3.2 route-config engine (v1.5.0)

Note

  • Trains with the engine: the guard-core-engine and guard-core-rs floors move to 4.3.2 (the route-config train)

Added

  • The get_cloud_providers_to_check route-over-global resolution (the RC2 rocket leg, over guard-core-rs#105's decide_route): the carrier route's block_cloud_providers list replaces the global one for the request (an empty route list falls back to the global config), an invalid route selector fails secure (the reference validates at decoration time), the global lane stays untouched off-route, and the clouds bypass skips the whole arm; six end-to-end twins drive the override, the route block, the off-route hold, the fallback, the fail-secure arm, and the bypass
  • The carrier's stage knobs at the per-stage seams (the RC1 rocket leg): the (method, path) carrier's remaining reference knobs consume at their pipeline positions through the engine's decision cores - ip_whitelist/ip_blacklist (the RouteIpGate arm before the global gate: a configured whitelist takes over the route verdict and skips the global lists, skip_ip_lists; the blacklist denies the reference 403 Forbidden; an invalid entry fails secure), per-route countries (blocked_countries/whitelist_countries through geo::check_countries, a passing route whitelist skipping the global geo stage, skip_countries; no geo handler leaves the request alone), required_headers plus the auth group and the api-key group (headers_auth::decide over the carrier rules with the route verifiers, the required sentinel, the fixed 401 shape), custom_validators (decide_custom_validators under the reference anonymous name, the validator's own status, the truthy non-response and the declining validator passing through), require_referrer (the referrer core's 403 shapes), time_restrictions (the start/end/timezone dict through the time-window core, missing bounds fail-open), and enable_suspicious_detection = false skipping the scan for its route (detection_enabled); thirteen end-to-end twins drive every knob on a matching route and its off-route silence
  • The security_headers_applied funnel (the H6 rocket leg, over guard-core-rs#103's composer and #104's accessor): when the security-header set lands on a forwarded response and the bus is installed, the fairing's on_response pass composes security_headers_applied_event and dispatches it over the bus - action headers_added over the security_headers handler, metadata path (display-redacted), headers_count (the rendered set, before the CORS verdict and the response modifier touch the view), has_csp, has_hsts; only the forwarded lane fires (the pipeline passed, Verdict::Clean, and no route guard refused - the reference process_response shape that carries the request path), guard-generated answers (blocks, the redirect, the fail-secure 500) apply the headers without firing (the reference's create_error_response lane), and a disabled set renders nothing and dispatches nothing
  • The CORS preflight short-circuit and the behavioral usage rules in the pipeline (the GAP-R10 rocket leg, over guard-core-rs#95's engine surface): an OPTIONS request carrying access-control-request-method has its preflight answer computed in on_request (the reference is_preflight + build_preflight_response; cors::is_preflight + build_preflight_response from the resolved CORS config) and on_response replaces whatever Rocket composed with it - a preflight answer is 200/400, statuses the fairing decides (Rocket's fairings cannot answer mid-flight, so the answer rides a request-local slot and the handler's output is never observed); CORS disabled or no response processor leaves OPTIONS to the pipeline. The route carrier's usage/frequency behavior_rules track per request through the response processor's shared tracker with a crossed ban rendering the activity-banned shape (the reference process_usage_rules, dispatched from the request pass before the check pipeline)
  • The maintenance trio and the full status payload (the GAP-R9 rocket leg): GuardFairing::reset (the reference reset(): the rate-limit windows drop, bans and violation counts untouched), refresh_cloud_ip_ranges + with_cloud_refresh_scheduler (the reference refresh_cloud_ip_ranges: one single-flight background refresh through the facade's CloudRefreshScheduler - the refreshed ranges land in the shared table, each provider's row restamped, false with no scheduler installed or while one is in flight, the reference's concurrent-caller gate), and agent_stats answering the reference property's no-agent shape ({"enabled": false, "degraded": false}, the AgentStats type re-exported); the status payload's provider rows carry the reference get_status shape - ready, last_refreshed (the unix-second stamp of the last range load, null before one, from CloudIpTable::provider_status), and entries - with the geo-ip component rendering the IpInfoManager health snapshot ({ready, last_refreshed, entries}) when the lifecycle manager is wired (the bare configured flag and null stay for the trait-only and absent arms)
  • The WebSocket guard for Rocket's official rocket_ws surface (fastapi-guard guard/websocket.py's make_guard_websocket, the GAP-A9 rocket leg): .manage(make_guard_websocket(WebSocketGuardConfig)) + the WebSocketGuard request guard on rocket_ws routes runs the reference check sequence before the handshake completes - fail-secure unknown address, the ban arm, the is_ip_allowed gate + country arms (a whitelist match skips countries), the ws rate limit (skipped for whitelisted IPs), then the path/query/header penetration scan - and a blocked handshake answers 403 Forbidden pre-accept with the close shape on x-guard-websocket-close / x-guard-websocket-close-reason (1008 Policy Violation policy denials, 1013 Try Again Later malfunctions, the panic in the check sequence contained). The guard also covers frames after the upgrade: WebSocketGuard::scan_frame scans one text/binary message through the engine (control frames pass), answers the reference close shape (close_frame + stream_error), and feeds the shared violation store installed by with_violation_feed (the reference's shared suspicious_request_counts): a crossed threshold bans the address through the shared IpBanManager, and the next handshake's ban arm rejects it; rocket_ws rides in as a dependency
  • The reference route-config carrier consumption (GuardFairing::with_route_configs + set_route_config, the GAP-R2 rocket leg): the engine's RouteConfigResolver ((method, path) -> Option<Arc<RouteConfig>>) resolves the route's RouteConfig once per on_request pass - a carrier stashed with set_route_config wins over the resolver (the reference request.state.route_config idiom) - and the pipeline consumes it with the reference semantics: bypassed_checks (and the "all" wildcard) skip the named reference checks at their pipeline positions (the fused stages map as documented: required_headers/authentication skip the headers-auth stage, ip_security skips the gate, ban, and geo arms, suspicious_activity skips the scan and its violation feed, rate_limit skips the whole tiers pass), require_https rides the HTTPS stage's carrier lane (decide_route; with no stage installed the route arm still composes the reference 301), max_request_size replaces the body cap the data guard enforces, blocked_user_agents runs additively before the global filter through the trusted-compile lane (a non-compilable route pattern fails secure 500), the rate-limit group becomes the route's tier (an invalid tier fails secure), and the detection-exclusion group resolves through the engine's detection view; RouteConfig/RouteConfigResolver re-exported
  • The unified-config consumption (GuardFairing::from_security_config, the GAP-R1 rocket leg): the 129-field SecurityConfig (the fieldized reference surface in guard-core-engine) builds the wired pipeline in one call - the detection budgets onto DetectConfig, the IP lists onto the gate, the rate-limit knobs onto the limiter, the ban group onto IpBanManager + IpBanConfig, enforce_https/trust_x_forwarded_proto onto the HTTPS stage, emergency_mode + its whitelist onto the emergency stage, custom_error_responses/on_block onto the response surface, the detection-exclusion group (with the reference's empty-set-disables-all-categories semantics) onto the scan, the observability group onto the log/redaction knobs, ReDoS-validated blocked_user_agents, and the security-headers/CORS/behavior response pass; invalid values fail closed through the new typed GuardConfigError; the reference exclude_paths carve-out lands as a first-class builder consumed first in the pipeline (an excluded path bypasses every request-side check, gate included, the response pass still renders); SecurityConfig, SecurityConfigError, GuardConfigError, and the LogLevel/LogFormat/BufferOverflowPolicy knob enums re-exported

Changed

  • The bypass consumption now uses the reference's coarse query vocabulary (the ip gate, the route IP restrictions, and the country arms query ip; the ban arm ip_ban; the cloud-provider check clouds; the rate limiter rate_limit; the penetration scan penetration; the "all" wildcard matches every query) - the previous wave keyed the bypass on the 17 stage names, a vocabulary the reference never queries (the stages it named are not route-bypassable in the reference at all, and their bypass conditions are removed); the require_https carrier lane falls back to the HTTPS stage's own resolver seam when no carrier route applies, and the custom-checks seam carries the body slot the engine's validator contract defines (decide_custom_request/decide_custom_validators take the body; the fairing's on_request phase never sees one - Rocket's data guard owns the stream - so it passes None, the two-phase flow's documented divergence)
  • The IP-gate denial path now renders the reference ip_filter behavior end to end: passive mode logs the crossing and forwards (no verdict stashed, no gate decision downstream), the on_block hook fires once with the reference payload keys (ip_security), and the custom-error body override wins over the family default - previously the gate denial rendered the family body unconditionally and skipped both
  • The CI coverage gate computes line coverage from the lcov export's per-line DA records instead of llvm-cov's summary table: llvm-cov 22's summary aggregation falsely reports missed lines that no line-level view (show text/html, lcov, cobertura, the JSON segment list) can see on the same profdata, and the divergence persists on the newest available toolchain (cargo-llvm-cov 0.9.1 + rustc 1.99.0). The gate keeps the same fail-closed 100%-lines semantics with nothing hidden or excluded; the summary table stays in the job as an informational printout. Evidence linked in the workflow (#37)