Skip to main content

Snakeway v0.18.0

This release fixes correctness defects across the data plane and configuration validation. It also enforces a canonical device pipeline order. Several changes alter behavior that operators may have come to rely on. Read the upgrading section before you deploy.

Highlights​

  • The device pipeline always runs in one canonical order. The order of your configuration files can no longer silently disable a security control.
  • Two remotely reachable crashes are fixed, including one where a single request could terminate the whole proxy.
  • snakeway config check now catches a much larger set of errors before they reach a running server.

Breaking Changes​

The device pipeline order is enforced​

Devices now always run in a fixed canonical order, independent of which files declare them or in what order the files are listed:

  1. Request Filter
  2. Identity
  3. Network Policy
  4. Request Rate Limiting
  5. WASM devices, in configuration order within the slot
  6. Structured Logging

Before this release, the pipeline ran in configuration file order. If your devices rely on file name ordering, verify their behavior after upgrading.

The static route index field is now honored​

The index field on a static route is now served as configured. Before this release, the value was ignored. A route that set the field answered every directory request with index.html, and a route that left the field out answered none. If you set a custom filename and relied on index.html being served, either move your content to the configured filename or set the field to index.html.

snakeway run --test fails when the runtime state build fails​

run --test now runs the same runtime state build the server start performs. It exits 1 when the build fails, where it exited 0 before. Scripts that check the exit code now report these configurations.

A request with no healthy upstream now answers 502​

When no upstream of a service is available, the proxy now answers 502 Bad Gateway. Before this release, it answered 500 Internal Server Error, which reports a proxy fault rather than an unreachable upstream. Dashboards and alerts that watch for 500 responses on upstream failures need to watch for 502.

The public and admin binds now reject multicast (such as 224.0.0.1) and link-local (such as 169.254.1.1) addresses with a validation error. Before this release, such configurations passed the check and failed at startup with a misleading message. The public bind now also accepts the literal 0.0.0.0, which previously only the all keyword covered.

The HTTP-01 challenge requires a redirect listener​

A bind with tls set to the HTTP-01 ACME challenge now requires a redirect_http_to_https block, which is the only listener that serves the challenge. Before this release, such a configuration passed validation, could never issue a certificate, and leaked challenge tokens on every retry.

Changed​

  • snakeway config check validates route paths the way the proxy does. The check reports a route path without a leading slash, and a duplicate path across service and static routes, instead of letting the server fail at startup or on a later reload.
  • An ingress that declares services or static files under a bind_admin-only listener now produces a warning that lists what is ignored. Before this release, they were dropped silently and the check reported success.
  • Redirect listener uniqueness is checked per address, not per port. Two binds on different interfaces may share a redirect port. A redirect port that collides with a bind or admin port on the same address is rejected, which prevents binding two listeners on one socket.
  • A reload that changes ws_max_connections now applies to new connections. Before this release, the limit was fixed at the first connection, and every later reload silently had no effect. Routes removed by a reload stayed in the admin statistics forever.
  • A route path with a trailing slash is normalized to the form the proxy matches on. Before this release, such a route was accepted and could never match a request.
  • Duplicate upstream socket paths are compared canonically. Redundant path forms such as a . component no longer bypass the uniqueness rule.
  • snakeway config check warns when an include pattern matches no files or skips an unreadable path. Before this release, both silently loaded nothing and the check reported success.
  • The ACME memory store warning is now part of the config check report. You see it at the decision point instead of only in server logs after startup.
  • The public bind accepts the keyword all and the literal 0.0.0.0 interchangeably. Before this release, the keyword was accepted and the equivalent literal was rejected.

Fixed​

  • A single request with a malformed percent encoding next to a multibyte character in the query string, such as /api?%%é, no longer crashes the proxy. The query decoder now works on bytes, rejects the malformed sequence, and forwards raw multibyte characters in the query unchanged. Before this release, such a request panicked the worker thread, which aborted the whole process in the release build. Raw multibyte query values were also silently rewritten as Latin 1 garbage characters.
  • A Range request against a static file that is truncated or partially rewritten while it is being served no longer crashes the proxy. The served range is now fitted to the bytes actually read. Before this release, the validated range was sliced against a buffer that could be shorter than the range, which panicked the worker thread and aborted the process in the release build.
  • An upstream whose health cooldown has expired stays admissible on every selection decision until an outcome lands. Before this release, each decision that did not select the upstream restarted its cooldown. With failover, a dead primary therefore delayed recovery by up to a full cooldown.
  • A failed request attempt no longer marks the previous attempt's upstream as successful. Before this release, a retry after a transport failure could flip a dead upstream back to healthy and even close a half-open circuit on it.
  • A half-open circuit probe whose request never started now returns its slot. Before this release, a failure between selection and peer build could leave the circuit unable to admit any probe until a reload or restart.
  • A success reported for a service that a reload removed no longer writes counters. A re-added service no longer inherits stale counts and latency.
  • The active request counter is updated with one atomic step. Before this release, a decrement followed by a separate zeroing store could erase a concurrent request's increment and transiently report wrong active request counts.
  • on_response devices now run before a static file response is written. Their header and status mutations therefore apply. Before this release, the pipeline ran after the response was already on the wire and its result was discarded.

Internal Changes​

  • Reloads and DNS refreshes no longer block the single worker control runtime on WASM compilation, hostname resolution, and file reads. A stalled resolver now delays only its own lookup, bounded by a timeout, instead of stalling reload outcomes, signal handling, and certificate renewal together.
  • The GeoIP databases are read through a memory-mapped file that must be replaced by rename. Truncating or rewriting the file in place while the proxy runs can fault every lookup and terminate the process. The update procedure is now documented in the identity device guide.

Upgrading​

  • Review device ordering. Configurations that worked because of file name order keep working, but a configuration whose devices depended on a pipeline order different from the canonical one changes behavior. The canonical order is listed under Breaking Changes.
  • Check every static route that sets index. The configured filename is served now, where it was ignored before.
  • Update dashboards and alerts that key on 500 responses for upstream failures. A request with no healthy upstream now gets a 502 response.
  • Scripts that call snakeway run --test should check the exit code. A configuration that fails the runtime state build now exits 1.
  • Configurations with interface = "all" keep working. The literal 0.0.0.0 is now accepted as the same address.