Repository navigation
Barbacane v0.12.3
Wasmtime moves to 48.0.5 for five advisories. Two reach the gateway: a plugin could run past its fuel budget, or corrupt the GC heap using GC references and exceptions. A response to a request carrying Authorization is no longer cached unless the upstream allows a shared cache to reuse it, and responses rate-limit lets through now carry the documented X-RateLimit-* headers. A plugin configuration with an unknown key inside a nested object, such as request-transformer's headers, now fails compilation with E1023 instead of being ignored, so a spec that compiled under 0.12.2 can be refused: compile yours before upgrading a running gateway. The MSRV is 1.95. No artifact change: 0.12.x artifacts load as they are.
Security
- wasm runtime: Wasmtime is upgraded from 47.0.4 to 48.0.5 for RUSTSEC-2026-0315 (GHSA-m63x-6p34-q65x). With fuel metering and Cranelift, both of which the gateway uses, a plugin containing
call_refortry_tablecould drop the fuel its callees consumed and run for exponential time on linear fuel. RUSTSEC-2026-0316, in the component-modelValAPI, is fixed by the same release; the gateway loads core modules and does not use that API. - wasm runtime: the same upgrade fixes RUSTSEC-2026-0326 (GHSA-hw8m-q44c-ggrf). A GC reference live across a
try_callcould be left unrooted, so a plugin using GC references and exceptions, both enabled by default since Wasmtime 47, could corrupt the GC heap and execute incorrectly. RUSTSEC-2026-0325 and RUSTSEC-2026-0327, fixed by the same release, are in component validation and the component-model async ABI; the gateway loads core modules.
Added
- request-transformer:
skip_if_empty: trueskips anaddorset(headers, query parameters, body) whose value references a variable that resolves to an empty string, absent values included.Authorization: "Bearer $cookie.sso_token"undersetthen sends no header for a request without the cookie, instead ofBearer. Values without variables are always written, and the option is off by default.
Changed
- plugin config: the nested objects of
request-transformer(headers,querystring,path,path.replace,body),response-transformer(headers,body) and thekafkaandnatsack_responsereject unknown keys, so a key in the wrong place (such asskip_if_emptyunderheaders) fails compilation withE1023instead of being ignored. A test requires every object schema in a plugin'sconfig-schema.jsonto stateadditionalProperties;jwt-auth'spublic_key_jwkstays open, as a JWK may carry other members. - MSRV: the minimum supported Rust version is 1.95, required by Wasmtime 48. The Docker images build with
rust:1.95.
Fixed
- wasm runtime: initialising a plugin gives the config write a fresh fuel and time budget. The plugin's
allocran on what instantiation had left, so a slow instantiation (a loaded host, an instrumented build) could fail it and the route answered500. A failingallocnow names its cause (out of fuel, timeout, or the trap) instead of onlyalloc failed. - docs: the transformation guide gives the order request-transformer applies header operations in (remove, rename, set, add; query and body: remove, rename, add). It listed add first.
- cache: a response to a request carrying
Authorizationis no longer stored unless it allows a shared cache to reuse it (public,s-maxageormust-revalidate, per RFC 9111 §3.5), or the middleware varies onauthorization. An upstream returning a user-specific response withoutCache-Controlcould have it served to other users.Cache-Controldirectives are now matched by name, so an extension such asx-private-hintno longer prevents caching. The caching guide now describes what the middleware does:max-ageandno-cacheare not interpreted, and the query string is part of the key. - rate-limit: allowed responses carry the
X-RateLimit-Policy,X-RateLimit-Limit,X-RateLimit-RemainingandX-RateLimit-Resetheaders, as documented. They were set only on the request forwarded to the upstream, so clients never received them. With stacked instances, the response reports the policy with the fewest requests remaining, and a429from one of them carries only the rejecting policy'sRateLimitheaders. The plugin now declares thecontext_setcapability. - oidc-auth: an empty
issuer_overridemeans unset, so the issuer from the discovery document is expected. It was taken as the expected issuer itself, so every token was refused withinvalid_token. Anenv://reference to a variable set but empty resolves to exactly that. - vacuum ruleset:
barbacane-auth-opt-out-explicitis removed. It reported every operation that set its ownx-barbacane-middlewareswithout an auth plugin as dropping auth, but operation middlewares are merged with the global ones, so those operations keep the global auth; onlyx-barbacane-middlewares: []removes it.barbacane-auth-opt-out.jsis still published and reports nothing, so download scripts that list it keep working. The vacuum guide's download loops now list the functions the ruleset uses; the CI example namedbarbacane-no-duplicate-middlewares, which does not exist.