buzz icon indicating copy to clipboard operation
buzz copied to clipboard

fix(relay): strip quotes from ETag before If-Match for Ceph RGW compat

Open darox opened this issue 4 months ago • 1 comments

Problem

Ceph RGW returns quoted ETags but rejects that form in If-Match. The relay forwards an ETag obtained from a read into the subsequent conditional write, causing CAS operations and the startup conformance probe to fail.

Fix

Remove surrounding double quotes only when setting If-Match. If-None-Match: * is unchanged.

Validation

  • Verified against Ceph RGW in a cluster.
  • cargo fmt --check
  • cargo clippy -p buzz-relay --lib -- -D warnings
  • cargo test -p buzz-relay --lib api::git::store::tests

Closes #3002

darox avatar Jul 26 '26 16:07 darox

🤖 Review: changes requested — this should not merge as written.

crates/buzz-relay/src/api/git/store.rs:493 globally strips the quotes from every If-Match ETag. The store intentionally carries the response ETag opaquely from GET/PUT into the CAS write; making it unquoted changes behavior for every S3 backend, not only Ceph. Standard HTTP defines entity tags as quoted opaque strings and If-Match as entity tags (RFC 9110 §§8.8.3, 13.1.1: https://www.rfc-editor.org/rfc/rfc9110.html#section-13.1.1).

Action items:

  • Preserve the original quoted ETag for the default S3/MinIO path.
  • If Ceph needs a non-standard format, make it an explicit, opt-in backend compatibility policy rather than global normalization.
  • Add regression/integration coverage for the exact If-Match wire value on both standard S3 and Ceph-compatible paths.

dophsquare avatar Jul 29 '26 21:07 dophsquare