Skip to content

chore(release): 0.12.4 - #294

Merged
ndreno merged 14 commits into
release/0.12from
backport/0.12.4
Nov 8, 2026
Merged

ndreno merged 14 commits into
release/0.12from
backport/0.12.4

Conversation

@ndreno

@ndreno ndreno commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

0.12.4: security fixes and dependency updates backported to 0.12, on release/0.12 (cut at v0.12.3). Each commit is a cherry-pick of the squashed commit on main, with -x.

Backported

main PR Change
#252 spin 0.9.9 (0.9.8 was yanked)
#255 yaml_serde in place of serde_yaml
— s3 test: accept a failed write when an oversize upload is refused (7e39ae3)
#262 dependency updates for 29 advisories (Wasmtime 48.0.8, rustls, tokio, zstd-sys)
#263 barbacane-libinjection 0.1.2
#270 auth plugins and acl keep group names with commas whole
#268 control-plane compilations use the capabilities plugins embed
#271 revoking a data-plane API key ends its sessions
#269 host_ldap_bind refuses an empty password
#267 every artifact member is checked against the manifest on load
#284 the spec endpoint parses specs with the compiler's parser
#285 response-transformer refuses a response whose fields cannot be removed
#292 bounded metric method labels, mock placeholder values encoded

The last commit sets the versions to 0.12.4 and turns [Unreleased] into the 0.12.4 section, entries taken from main's CHANGELOG.

Not backported: the AI gateway, MCP and web UI removals, ADR-0034 (enabled: false), CI changes, and the fixes since #286 rated low.

Notes

  • One conflict, in barbacane-compiler/src/lib.rs (fix(artifact): check every archive member against the manifest on load #267): the export list keeps McpConfig, which 0.12 still has.
  • barbacane-compiler 0.12.4 no longer exports load_plugins, load_specs and verify_plugin_checksum: fix(artifact): check every archive member against the manifest on load #267 replaced them with ArtifactArchive, the verified load path. Nothing in the workspace uses them; a crate outside it that does would not build against 0.12.4.
  • Behaviour changes a 0.12.3 user can meet, all in the CHANGELOG: x-auth-consumer-groups writes , as %2C and % as %25; response-transformer body pointers must start with / (E1023); a control-plane compile refuses a plugin without an embedded manifest (E1041).
  • The artifact format version stays 7.
  • The release date in the CHANGELOG is 2026-11-06; adjust it if the tag lands later.

Locally: fmt and clippy clean; unit tests for the compiler (218), plugin SDK (50), telemetry (23), barbacane-wasm (251) and the data plane (137) pass. CI runs the full suite here.

After merging, tagging v0.12.4 on release/0.12 starts the release workflow.

ndreno added 14 commits November 6, 2026 22:06
spin 0.9.8 is yanked from crates.io, and `cargo deny check` warns about it. It comes in through multer, axum's multipart parser in barbacane-control; 0.9.9 is within multer's range, so only the lockfile changes.

Signed-off-by: Nicolas Dreno <nicolas.dreno@barbacane.dev>
(cherry picked from commit 04a0f82)
serde_yaml 0.9 is deprecated, and its parser unsafe-libyaml is
unmaintained (RUSTSEC-2024-0449, ignored in deny.toml since #249).
yaml_serde is serde_yaml continued by the YAML Organization, with the
same API, and its parser libyaml-rs is unsafe-libyaml under the YAML
Organization's maintenance. The swap is a rename at each call site and
the advisory ignore is removed.

Compared with serde_yaml 0.9 on 151 YAML and JSON files from this
repository and the playground, 11 published specs (GitHub JSON and
YAML, Stripe JSON and YAML, Box, Asana, Kubernetes, AsyncAPI examples)
and 36 edge cases (YAML 1.1 booleans, leading-zero and underscore
numbers, non-finite floats, merge keys, duplicate keys, tags, alias
bomb, nesting past 128), yaml_serde produces the same values and the
same errors, at the same speed.

libyaml-rs is still the c2rust translation of libyaml. Moving to a
parser written in safe Rust is tracked in #254.

fuzz/Cargo.lock is left as is: it has not followed the workspace since
June, and resolving it changes 78 packages.

Signed-off-by: Nicolas Dreno <nicolas.dreno@barbacane.dev>
(cherry picked from commit 27a9b10)
a_body_over_the_limit_is_refused_before_the_plugin failed on #257's integration shard 3 with reqwest::Error { kind: Request, ... BrokenPipe }. The gateway answers 413 from the declared Content-Length without reading the body (main.rs, the content-length check before the body is read), and closes the connection while the client is still writing the MAX_BODY + 1 bytes; whether the client reads the 413 or fails its write depends on timing. The test accepts either outcome and still asserts that nothing reaches S3.

Signed-off-by: Nicolas Dreno <nicolas.dreno@barbacane.dev>
(cherry picked from commit 7e39ae3)
cargo deny failed on main's CI from 2026-11-01 with 29 advisories.

Fixed by updates within the existing requirements:
- wasmtime 48.0.5 -> 48.0.8 (cranelift 0.135.8): 17 advisories. The one
  reaching the gateway with arbitrary code is RUSTSEC-2026-0379 (aarch64
  Cranelift miscompiles a large br_table, letting a plugin jump to
  arbitrary code), which affects the linux/arm64 images and the aarch64
  binaries. RUSTSEC-2026-0364 (exceptions) and -0359 (GC recursive types)
  concern features left on; the rest are component-model only or need
  i31/nullref arguments on host-to-guest calls.
- rustls 0.23.46, rustls-webpki 0.103.16, webpki-roots 1.0.11: six.
- tokio 1.54.1: RUSTSEC-2026-0386.
- zstd-sys 2.1.2: RUSTSEC-2026-0410.

p256 0.13 -> 0.14 in barbacane-test (test-only) moves crypto-bigint to
0.7 (RUSTSEC-2026-0387); `to_encoded_point` is `to_sec1_point` there.

Ignored, with the reason in deny.toml: RUSTSEC-2026-0391, -0398, -0403 in
zstd 0.13 / zstd-safe 7. rskafka 0.6 (latest) and wasmtime-internal-cache
(through 50.0.1) still require zstd ^0.13. The gateway produces Kafka
records with Compression::NoCompression and never consumes, does not
enable the Wasmtime cache, and builds zstd-safe without `seekable`.

Signed-off-by: Nicolas Dreno <nicolas.dreno@barbacane.dev>
(cherry picked from commit e775fa6)
The WAF's libinjection classifiers follow libinjection 4.0.1: `1.e`-style
numbers produce no SQLi token, `LIKE (` after an operand is not a
function, a 0xFF byte no longer ends HTML5 tokenizing, and the XSS
event-handler list has 432 entries. barbacane-waf 0.1.1 already admits
0.1.2, so only Cargo.lock changes.

(cherry picked from commit 2f8a3f4)
Auth plugins publish groups in x-auth-consumer-groups and auth.groups
joined with commas, and acl splits on commas, so a group name containing
a comma (an LDAP DN with group_name_from_dn off, an RDN value with an
escaped comma, a single-group oidc claim, a scope or array element) was
read as several groups.

barbacane_plugin_sdk::groups encodes the list losslessly: names joined
with `,`, and inside a name `,` written as %2C and `%` as %25. Names
without either character are unchanged. apikey-auth, basic-auth,
jwt-auth, ldap-auth, oauth2-auth and oidc-auth encode with it, and acl
decodes with it. Each plugin keeps its rule for what counts as one
group (a jwt-auth string claim with commas is still a list).

The acl fixture gains two operations whose basic-auth user has a DN as
its role: a deny rule naming the DN, and an allow rule naming a part of
it. The access_control tests check both are refused.

(cherry picked from commit 35665a1)
Control-plane compilations built every plugin bundle with empty
capabilities and through barbacane_compiler::compile, so their
artifacts carried capabilities_enforced: false. The worker now reads
each registry plugin's body_access and host_functions from the
plugin.toml embedded in its WASM (barbacane_compiler::embedded_capabilities)
and compiles with compile_with_capabilities, which marks the artifact
capability-authoritative like compile_with_manifest. A plugin without an
embedded manifest is refused with E1041, since its capabilities are
unknown.

The worker also derives secret_fields from the embedded config schema,
so the plaintext-secret warning (E1070) applies to control-plane builds,
and the E1040 message no longer points at a UI page.

Bundle construction moves into registry_bundle, a pure function with
unit tests; with the previous behaviour restored, both worker tests and
the compile_with_capabilities test fail.

(cherry picked from commit c4baef4)
…271)

A data plane's WebSocket session is authenticated once, at registration.
The connection manager now records the API key each session registered
with, and the revoke endpoint signals that key's sessions, which send a
disconnect message and a policy-violation close frame. Each session also
rechecks its key at the heartbeat interval (ApiKeysRepository::is_active),
so a key that expires, or one revoked through another control-plane
instance, ends the session within one interval.

The authz security test registers a data plane over the WebSocket,
revokes its key through the API and checks the socket closes within five
seconds.

(cherry picked from commit 1f1500d)
A simple bind with a DN and an empty password is an unauthenticated bind
(RFC 4513 §5.1.2), which a directory may accept without checking the DN.
host_ldap_bind is the host's credential check, so it now returns
invalid_credentials for an empty password before connecting. ldap-auth
already refused it itself; the host now does for any plugin with the
ldap capability.

The test listens on a local port standing in for the directory and
checks that the bind is refused without a connection being made.

(cherry picked from commit ca449bf)
#267)

The data plane reads a .bca once (ArtifactArchive::read), refusing a
member path that appears twice, and verifies it before using any of it
(ArtifactArchive::verify): artifact_hash, then every member against the
checksums the hash covers (the checksum table and source_specs), then
parses routes, specs, plugins and the WAF rule set from the verified
bytes. A member the manifest does not list, or a listed member the
archive lacks, is refused. Each plugin is read only from
plugins/<name>.wasm, and its plugins[].sha256 must agree with the
checksum table. The signature check runs before the members are parsed.

load_specs, load_plugins, load_waf_rules, verify_plugin_checksum and
verify_waf_rules are replaced by this path; the WAF stage takes the
verified rule set. The compiler refuses two specs with the same file
name (E1058), since the archive stores specs by file name.

The artifact integrity security tests rewrite artifacts so that every
member stays well formed (valid routes JSON, a valid module with its
manifest digest updated, a plugin entry pointed at another member, a
rewritten spec, a duplicated member) and check that the gateway refuses
each one.

(cherry picked from commit 04fe9f1)
/__barbacane/specs/{file} reads every spec with yaml_serde, as the
compiler and the merged spec endpoints do, whatever its file name, strips
the x-barbacane-* extensions, and answers 500 for a spec that does not
parse.

The specs tests gain a spec written in YAML under a .json file name,
served parsed and without its extensions.

(cherry picked from commit 17c7e88)
…emoved (#285)

With `body.remove` configured, a response is answered 502 problem+json
(urn:barbacane:error:response-transform-failed) when its body is not
JSON or a remove pointer does not parse. `body.allow_non_json: true`
lets a body that is not JSON through unchanged, for operations whose
upstream also returns other content types. Without `remove`, a body that
is not JSON passes through as before.

The config schema requires every body pointer (add and rename keys,
rename targets, remove items) to start with `/`, so a mistyped pointer
fails compilation with E1023.

The plugin tests cover both refusals, `allow_non_json` and the
passthrough without removals; plugin_schemas covers the pointer pattern.

(cherry picked from commit 4880fee)
)

telemetry: every recorder labels the method as itself when it is GET,
HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH or QUERY, and as
OTHER otherwise, so the series count does not depend on what clients
send. Paths were already route templates or one unmatched label.

mock: placeholder values come from the request and are encoded for the
configured content_type: as the inside of a JSON string for
application/json and +json types (with <, > and & escaped too), as HTML
text for any other type.

The observability and dispatchers guides document both.

(cherry picked from commit 73ddb4f)
@coderabbitai

coderabbitai Bot commented Nov 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one): 1

  • deep-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ndreno
ndreno merged commit 90fd8b3 into release/0.12 Nov 8, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant