* feat(vector): integrate S3 Vectors catalog and APIs
Add scoped Vector resources, managed Lance storage, IAM checks, and
Gateway REST JSON operations with compatibility and recovery tests.
* fix(vector): adapt owned requests and preserve native quota errors
* test(ci): exercise Vector KMS archive consumers
* feat(vector): add maintenance and recovery workflows
* test(multipart): assert typed quota refusal causes
Verify the retained quota cause and its current and limit values alongside the existing refusal-order assertions. Remove the retired authentication compatibility entry after the main rebase.
* fix(vector): move maintenance dispatch guard ownership
Retain the namespace guard in the returned maintenance owner. Synchronize Gateway dependencies for corpus recording and format the existing audit test in its external module.
* feat(vector): add shared pagination sessions
* fix(vector): bound managed request and catalog futures
* test(vector): adapt managed fixtures to Gateway request envelopes
* test(vector): verify maintenance across uniform deployments
* test: simplify SSE-C counting and Catalog fixture ownership
* fix(test): propagate owned device validation errors
* fix(auth): bound early authorization futures
* feat(vector): complete resource pagination and bucket retirement
* fix(vector): harden bucket lifecycle, retirement, authz, and layering
Preserve continuous bucket incarnation fencing across Vector bucket Catalog parent initialization, map deleted-bucket races during DeleteVectorBucket to NotFoundException, and re-evaluate IAM, resource policies, and ABAC bucket tags inside the storage bucket lock across all five Vector bucket mutations.
Scale used-bucket Catalog retirement proof, plan, and execution linearly across multi-resource multi-page histories, sweep uncommitted pre-authority page artifacts before rewriting authority records, enforce manifest completeness and immutable delete-intent source-copy identity, and allow same-name recreation over v4 deleted Vector tombstones.
Make ListVectorBuckets and ListIndexes resilient to concurrent deletions with single-pass bucket authorization and bounded sparse-prefix scan budgets, preserve literal plus characters when decoding UntagResource tagKeys query parameters to match Gateway SigV4 canonicalization, and normalize operation-scoped Kms*Exception codes across all 21 S3 Vectors APIs.
Extract ManagedLanceObjects into app::vector_usecase::managed_objects, inject background node admission into Vector maintenance startup to eliminate the app-composition cycle, and widen scripts/check_layer_dependencies.sh to detect inline reverse-layer crate paths while recording the 12 pre-existing non-Vector inline edges from main in scripts/layer-dependency-baseline.txt (backlog#1834) with zero Vector exemptions.
* chore(vector): remove Batch 1 dead code and test debug residue
* chore(vector): remove Batch 2 dead test code and gate test-only APIs
* refactor(vector,iam): simplify dead branches and pass-through wrappers
* fix(object,test): bound PutObject futures and cover reconciled routes
* feat(vector,object,connect): activate S3 Vectors and fix CI regressions
* test(object,vector): fix copy future size check and vector dispatch test
Set explicit trace level on 60 object write, delete, and multipart span call sites across the facade, store, set, disk, and Swift protocol layers. Lifecycle and admin spans keep their existing INFO level.
This avoids recording bucket and object span fields on hot paths at the default INFO log level while leaving error events and lifecycle observability unchanged.
Route single-pool Store::prepare_get_object_reader calls through SetDisks::prepare_get_object_reader_metadata with the request range and MetadataReadPurpose::GetObjectReader, and keep conditional read context active during DefaultObjectUsecase reader preparation. This restores QuorumSelected metadata cache hits, verified_inline_body reuse, and metadata early-stop regressed by #9680 while preserving pre-unwrap SSE-KMS authorization.
* fix(ecstore,sse): close rio-v2 interop gaps on imported drive sets
A rio-v2 build that takes over a drive set written in the compatible format could not start once a KMS was configured, and several object reads and writes disagreed with what the other server stores or expects.
- Startup: the IAM migration now opens KMS-sealed IAM records. The record path is part of the key context, so the migration callback receives it, and the context text is escaped the way it was sealed.
- GET of a single-part encrypted object: whether an object holds one cipher stream per part is read from the marker the object records, not guessed from the ETag length. A sealed ETag is longer than an MD5 and sent these objects down the per-part path, which failed authentication.
- ETag: a sealed ETag is opened for GET and HEAD responses.
- HEAD: the public SSE headers are derived from the stored sealing metadata, and the KMS key id is answered in ARN form on GET and HEAD.
- Content length: an object sealed under an object key records no plaintext size when it is a single-part upload; the size is derived from the stored size of its parts.
- Compression: the compression and actual-size keys are also written in the casing the other server looks up.
- User metadata is stored under the x-amz-meta- prefix so it comes back as user metadata on both sides. Keys starting with "internal-" keep their bare form, because the prefixed form falls into a namespace reads hide.
- Replication: the metadata comparison skips the prefixed user metadata, which the target's HEAD answers without the prefix and which therefore never compared equal.
- ListObjectVersions and the metadata listing extension report the plaintext size of encrypted and compressed versions. This is the only intended behaviour change in a default build.
Three differences stay as they are: the other server cannot read SSE-S3 objects this build writes, listings do not open sealed ETags, and an SSE-KMS write is refused when only a static master key is configured.
Each fix has a regression test that fails without it.
* build: rename cargo feature rio-v2 to m-compatible
The feature selects the stored layout a build reads and writes, not a version of the stream crate, so it is named after that. The rename covers the feature key in every crate that forwards it, all cfg attributes, the CI job ids, names and artifacts, the CI gate and its tests, the validation scripts, the compat compose build argument, the debug launch configuration and the documentation.
The crate rustfs-rio-v2, its path and module name, the tests named after that reader implementation, and the backend_name() strings are unchanged. There is no alias: a build that passed --features rio-v2 must pass --features m-compatible.
No behaviour change in either build.
* refactor(ecstore,sse): select the build variant at one point per module
The m-compatible feature was tested at about 220 places, most of them inside function bodies. Each area that differs between the two builds now has a pair of modules exporting the same functions, and one place that picks between them, so call sites no longer name the build.
- ecstore: io_support/rio.rs selects rio/{native,m_compatible}.rs for the stream readers and writers, the compression scheme and index encoding, and the write-side encryptors. object_api/readers.rs selects readers/{native,m_compatible}.rs for range plans, the multipart layout, plaintext sizes that are not recorded, empty parts and the decompressed stream.
- sse: the sealed-ETag branch moves out of core/read.rs into core/keying/, where this crate keeps its build-specific code, and decrypt_kms_sealed_config is exported in both builds.
- utils: the four checks in metadata_compat.rs become one predicate.
- Tests that exist in only one build move to tests/native.rs and tests/m_compatible.rs child modules, gated once where they are declared. The set of test names is unchanged apart from one rename.
The attribute now appears 95 times; in ecstore it is left on the two selection points and on tests. crates/ecstore/AGENTS.md records the convention.
scripts/error-other-format-baseline.txt changes because that ratchet counts per file: 11 existing call sites moved from object_api/readers.rs (19 to 8) into the new readers/m_compatible.rs (11). The total stays at 564.
No behaviour change in either build. docs/architecture/minio-file-format-compat.md gains a table of where the variant lives and a corrected statement of what a default build can read.
* fix(s3): compare read preconditions with the answered ETag
A HEAD or GET of an object whose stored ETag is sealed answers with the ETag clients were shown for it, but If-Match and If-None-Match were still compared with the stored form. A client sending back the ETag HEAD answered with got 412 for If-Match and no 304 for If-None-Match.
- HEAD and GET compare the ETag conditions with the ETag the response carries, and a 304 carries that ETag.
- The storage layer ends a conditional read on the stored ETag before a body is opened, and cannot await the answered one. For a stored ETag in sealed form it no longer ends the read on an ETag condition and leaves the decision to the request layer. Without this a matching If-Match ended the read with no body to answer with.
- A default build stores no sealed ETag: the form test is constant false there and its behaviour is unchanged.
Tests: a round trip on a real store takes the ETag from HEAD and sends it back to GET and HEAD as If-Match and If-None-Match, and sends the stored form to show it matches nothing; unit tests cover the precondition helper, the storage-layer decision and the form test in both builds. With either half of the fix switched off the round trip fails.
* fix(s3): compare copy-source conditions with the answered ETag
x-amz-copy-source-if-match and x-amz-copy-source-if-none-match on CopyObject and UploadPartCopy were compared with the stored ETag of the source. For a source whose stored ETag is sealed that is not the ETag a read answers with, so the ETag from HEAD was refused with 412.
Both compare the ETag a read of the source answers with, as GET and HEAD do since the previous commit. It is resolved after the source's key authorization and only when the request names an ETag. A default build stores no sealed ETag and is unchanged.
Tests: on a real store, a customer-key source with a sealed stored ETag is copied with the ETag from HEAD as copy-source-if-match through both operations; the stored form as if-match and the answered ETag as if-none-match are refused. The fixture is shared with the read round trip. With either call site switched back the test fails.
* fix(s3): answer a date-conditioned GET 304 with the answered ETag
A GET that carried only If-Modified-Since resolved no answered ETag, because the lookup was limited to requests naming an ETag, and its 304 fell back to the stored ETag. For an object whose stored ETag is sealed the 304 then carried a different validator than HEAD answers with.
GET resolves the answered ETag for every conditional request, so a 304 carries it whichever condition produced it. HEAD already did. An unconditional GET still skips the lookup, and a default build stores no sealed ETag and is unchanged.
Tests: the sealed-ETag round trip takes Last-Modified from HEAD, sends it back as If-Modified-Since to GET and HEAD, and requires the 304 of both to carry the ETag HEAD answered with. With the lookup limited to ETag conditions again, the GET half fails.
---------
Co-authored-by: overtrue <anzhengchao@gmail.com>
The io_uring driver thread counts a read out of `in_flight` before it
drops the completed entry, and that entry's owner still holds a clone of
the read's memory reservation. Two background-memory tests waited only
for `in_flight == 0` and then asserted the exact budget figure, so a
driver thread preempted between the decrement and the drop left one
chunk's reservation visible. A merge-queue run failed that way with
13311 instead of 8192: 5119 is one 4096-byte O_DIRECT chunk at offset 17
with 512-byte alignment.
Wait for the budget itself to settle (bounded) before each exact
assertion, including after the last slice of a single-operation read is
dropped, where the owner shares the returned allocation's receipt. The
exact assertions are unchanged.
* ci: stop Actions cache thrashing, fix orphan keys, and trim paid runner waste
Consolidate sm-standard-4 and ubuntu-latest shared Rust caches, fix six orphan cache-shared-key references and rust-cache env-hash mismatches, archive e2e_test once in dual-stack-nightly, move prebuilt fuzz and nixl-check lanes to ubuntu-latest (guarding fuzz metadata probe with RUSTUP_AUTO_INSTALL=0), and deduplicate artifact-only manual packaging runs.
Refs: https://github.com/rustfs/backlog/issues/3379
* test(ci): merge step-level env in nightly e2e workflow provenance test
Align BinaryProvenanceTests.test_nightly_workflow_builds_and_runs_matching_features with GitHub Actions env precedence (workflow -> job -> step) while keeping RUSTFS_E2E_LOG_DIR pointed at the gitignored fixture target dir, and assert RUSTFS_BUILD_FEATURES stays out of job-level env so Swatinem/rust-cache keys match cache-warm.yml.
* fix(s3,kms): pre-auth KMS decrypt, widen SigV4 hoist, strict types
Pre-authorize SSE-KMS object reads before DEK unwrapping across all S3
GetObject and CopyObject read paths, widen SigV4 query hoisting to cover
allowlisted S3 request properties with matching authorization and header
fallbacks, and reject unknown fields on the remaining KMS key-metadata
request types.
- Authorize `kms:Decrypt` on prepared metadata snapshots before entering
`into_reader()` / `into_reader_for_copy()` across GetObject (cache
disabled, cache enabled, cold-fill producer, bypass fallback, and
mid-stream resume) and CopyObject, normalizing mixed-case encryption
metadata and resolving default KMS key IDs in `rustfs_sse`.
- Widen `hoist_signed_query_params` for SigV4 requests to an explicit
allowlist of S3 request properties (`x-amz-object-lock-*`, `x-amz-acl`,
`x-amz-grant-*`, `x-amz-tagging*`, `x-amz-storage-class`,
`x-amz-website-redirect-location`, `x-amz-copy-source*`,
`x-amz-metadata-directive`, `x-amz-checksum-*`,
`x-amz-snowball-auto-extract`, managed SSE headers) while preserving
SigV2 non-widening, unsigned-header rejection, payload-hash handling,
and Object Lock / tagging authorization and handler validation.
- Add `#[serde(deny_unknown_fields)]` to `UpdateKeyDescriptionRequest`,
`TagKeyRequest`, and `UntagKeyRequest` in `rustfs-kms`.
Refs: rustfs/backlog#2702, rustfs/backlog#3143, rustfs/backlog#1641
* fix(s3): preserve signed copy conditions and POST upload semantics
* fix(ci): stop sending deprecated policy field in s3-tests add-user
rustfs/rustfs#9677 hardened /rustfs/admin/v3/add-user to fail closed when a non-empty deprecated policy field is provided. scripts/s3-tests/run.sh was still passing policy=readwrite in the add-user body even though it immediately calls set-user-or-group-policy right after, and awscurl returned exit 0 on XML <Error> responses so provisioning silently failed and broke all alt-user s3-tests.
Remove the deprecated policy field from the add-user payload, check awscurl responses for XML <Error> elements in provisioning, and add a regression unit test in scripts/s3-tests/test_runner_tools.py.
Refs: rustfs/backlog#1246
* fix(ci): fail S3 user provisioning on HTTP errors without logging responses
* fix(iceberg): reject repeated warehouses before validating bucket names
* test(ecstore): wait for relaxed writes on the foreground lane
* test(quota): isolate concurrent real-disk probes in CI
* test(ecstore): scope upload lock identity helper to its Linux test
* ci: allow cold builds to finish all fuzz binaries
* test(s3): exercise the streaming reader callback on resume
* perf(targets): avoid temporary Vec and String allocs in ARN, net, and store keys
* fix(targets): reject lone-dot hosts while preserving trailing-dot FQDNs
* perf(scanner-metrics): reuse latency ring buffer and avoid eviction key clones
* fix(scanner-metrics): restore 60-slot ring length when totals was drained
Set [profile.release.package.rustfs] codegen-units = 16 while preserving codegen-units = 1 and lto = "thin" across all storage, erasure-coding, crypto, and I/O workspace crates so forced rustfs/build.rs rebuilds in release/nightly workflows parallelize LLVM codegen across multi-core runners.
Refs: https://github.com/rustfs/backlog/issues/3379
* perf(replication): avoid rule clones and repeated tag decoding in rule evaluation
* fix(replication): pass compare_actionable_rules directly to sort_by
* fix(security): harden RPC, proxies, egress DNS, and OIDC
Harden internode RPC authentication/quotas, trusted-proxy allowlisting,
protocol IAM policy conditions, outbound DNS egress pinning, and OIDC
redirect and HTTPS enforcement:
- Trusted proxies: replace broad private/link-local peer trust in simple
mode with the configured trusted-proxy allowlist (defaulting to
loopback-only) and update proxy integration coverage.
- Protocol gateways & FTPS: populate standard IAM condition keys
(SourceIp, SecureTransport, CurrentTime, EpochTime, UserAgent,
Referer, principal metadata) in gateway authorization and replace the
unchecked FTPS fallback IP parse with explicit connection context.
- Bucket listing RPC: fail closed with entry index diagnostics instead
of silently dropping malformed BucketInfo entries on encode/decode.
- Internode RPC streams & replay cache: add framed HMAC-SHA256 response
authentication with sequence/digest/EOF verification and
post-verification endpoint pinning for read_file_stream and walk_dir,
plus canonicalized per-peer entry and memory-budget replay cache
isolation.
- Outbound DNS egress: unify storage/tier, remote S3 replication
targets, on-demand migration HTTP, Azure Blob, GCS, Keystone, and OIDC
outbound checks onto OutboundPolicy and connection-time
OutboundDnsResolver (with redirect blocking on Keystone) to stop DNS
rebinding to loopback/link-local/metadata targets.
- OIDC redirects & transport security: trust forwarded scheme/host only
from verified trusted proxies, never reflect untrusted request headers
into STS credential or logout redirects, and reject plaintext http://
OIDC URLs for non-loopback hosts unless explicitly opted in via
RUSTFS_IDENTITY_OPENID_ALLOW_INSECURE_TRANSPORT.
Refs: rustfs/backlog#1470, rustfs/backlog#1473, rustfs/backlog#1472, rustfs/backlog#1506
* fix(egress): restrict GCS endpoints and restore tier compatibility
* ci: tighten the GCS error-format baseline
* fix(ci): stop sending deprecated policy field in s3-tests add-user
rustfs/rustfs#9677 hardened /rustfs/admin/v3/add-user to fail closed when a non-empty deprecated policy field is provided. scripts/s3-tests/run.sh was still passing policy=readwrite in the add-user body even though it immediately calls set-user-or-group-policy right after, and awscurl returned exit 0 on XML <Error> responses so provisioning silently failed and broke all alt-user s3-tests.
Remove the deprecated policy field from the add-user payload, check awscurl responses for XML <Error> elements in provisioning, and add a regression unit test in scripts/s3-tests/test_runner_tools.py.
Refs: rustfs/backlog#1246
* fix(ci): fail S3 user provisioning on HTTP errors without logging responses
* fix(iceberg): reject repeated warehouses before validating bucket names
* test(ecstore): wait for relaxed writes on the foreground lane
* test(quota): isolate concurrent real-disk probes in CI
* test(ecstore): scope upload lock identity helper to its Linux test
* fix(oidc): preserve HTTPS in dynamic callbacks
* ci: allow cold builds to finish all fuzz binaries
* chore(deps): bump rustfs/gateway pin to b6007d13
* fix(ci): stop sending deprecated policy field in s3-tests add-user
rustfs/rustfs#9677 hardened /rustfs/admin/v3/add-user to fail closed when a non-empty deprecated policy field is provided. scripts/s3-tests/run.sh was still passing policy=readwrite in the add-user body even though it immediately calls set-user-or-group-policy right after, and awscurl returned exit 0 on XML <Error> responses so provisioning silently failed and broke all alt-user s3-tests.
Remove the deprecated policy field from the add-user payload, check awscurl responses for XML <Error> elements in provisioning, and add a regression unit test in scripts/s3-tests/test_runner_tools.py.
Refs: rustfs/backlog#1246
* fix(ci): fail S3 user provisioning on HTTP errors without logging responses
* fix(iceberg): reject repeated warehouses before validating bucket names
* test(ecstore): wait for relaxed writes on the foreground lane
* test(quota): isolate concurrent real-disk probes in CI
* test(ecstore): scope upload lock identity helper to its Linux test
* ci: allow cold builds to finish all fuzz binaries
* test(security): expand authz, OIDC, table LIST, and audit coverage
Add end-to-end, integration, and property-based security regression suites
closing in-repo RustFS test gaps across authorization, table-bucket LIST
isolation, OIDC web-identity federation, streaming SigV4 chunks, multipart
checksum algebra, and auth-failure audit delivery:
- Add table-bucket LIST isolation E2E tests across ListObjectsV2,
ListObjectVersions, and ListMultipartUploads covering delimiter
CommonPrefixes, opaque cursor confidentiality, cursor-attack rejection,
and >1000-object all-hidden raw page traversal.
- Wire fast delete_authorization_test, table_list_isolation_test,
oidc_web_identity_e2e_test, and auth_failure_audit_test cases into
.config/nextest.toml e2e-smoke (updating e2e-smoke/e2e-full selection
digests and raising security-smoke-floor to 29).
- Expand delete_authorization_test with anonymous force-delete / spoofed
REPLICA denial and Object Lock (GOVERNANCE bypass, COMPLIANCE, Legal
Hold) enforcement regressions.
- Add OIDC AssumeRoleWithWebIdentity E2E matrix (E2E-01..E2E-13, multi-
audience, inline session-policy intersection) and rustfs-iam web-identity
integration tests (tampered payload, alg=none, HS256 confusion,
malformed/missing-iss tokens, OTHER_AUDIENCES, concurrent JWKS rotation,
multi-provider routing, refresh_token flow, and iat/exp/nbf boundaries).
- Add signed aws-chunked truncated-terminator and reordered-chunk negative
E2E tests (PutObject and UploadPart), multipart ETag-of-ETags and
COMPOSITE/FULL_OBJECT checksum proptests in rustfs-rio and rustfs-ecstore,
live audit webhook denial delivery tests (with honest characterization of
gateway SignatureDoesNotMatch auditing), and fuzz/proptest + GHSA
regression admission rules in AGENTS.md and adversarial-validation.md.
Refs: rustfs/backlog#2675, rustfs/backlog#2724, rustfs/backlog#1151
* test(security): bound listing checks and allow new audit events
* fix(ci): stop sending deprecated policy field in s3-tests add-user
rustfs/rustfs#9677 hardened /rustfs/admin/v3/add-user to fail closed when a non-empty deprecated policy field is provided. scripts/s3-tests/run.sh was still passing policy=readwrite in the add-user body even though it immediately calls set-user-or-group-policy right after, and awscurl returned exit 0 on XML <Error> responses so provisioning silently failed and broke all alt-user s3-tests.
Remove the deprecated policy field from the add-user payload, check awscurl responses for XML <Error> elements in provisioning, and add a regression unit test in scripts/s3-tests/test_runner_tools.py.
Refs: rustfs/backlog#1246
* fix(ci): fail S3 user provisioning on HTTP errors without logging responses
* fix(iceberg): reject repeated warehouses before validating bucket names
* test(ecstore): wait for relaxed writes on the foreground lane
* test(quota): isolate concurrent real-disk probes in CI
* test(ecstore): scope upload lock identity helper to its Linux test
* ci: allow cold builds to finish all fuzz binaries
* fix(helm): provide writable temporary storage for scanner restores
Paged usage checkpoints larger than 1 MiB need a temporary file during restore. Mount a disk-backed emptyDir at /tmp in each RustFS pod and honor existing mounts on upgrade.
Fixes#9672
* fix(ci): stop sending deprecated policy field in s3-tests add-user
rustfs/rustfs#9677 hardened /rustfs/admin/v3/add-user to fail closed when a non-empty deprecated policy field is provided. scripts/s3-tests/run.sh was still passing policy=readwrite in the add-user body even though it immediately calls set-user-or-group-policy right after, and awscurl returned exit 0 on XML <Error> responses so provisioning silently failed and broke all alt-user s3-tests.
Remove the deprecated policy field from the add-user payload, check awscurl responses for XML <Error> elements in provisioning, and add a regression unit test in scripts/s3-tests/test_runner_tools.py.
Refs: rustfs/backlog#1246
* fix(ci): fail S3 user provisioning on HTTP errors without logging responses
* fix(iceberg): reject repeated warehouses before validating bucket names
* test(ecstore): wait for relaxed writes on the foreground lane
* test(quota): isolate concurrent real-disk probes in CI
* test(ecstore): scope upload lock identity helper to its Linux test
* ci: allow cold builds to finish all fuzz binaries
* perf(ecstore): defer destination preflight on fused non-inline commits
Extend deferred destination preflight to non-inline fused rename_data commits on Linux, skip descriptor-cache part path construction and invalidation when committing inline objects, and use io_get_object_open_path for staged multipart data directories on Linux.
* fix(ecstore): gate can_defer_dst_preflight with cfg(target_os = "linux")