Commit Graph

1112 Commits

Author SHA1 Message Date
overtrue d0cf899674 docs(security,kms): add KMS version policy and close doc/compat gaps
- Register RUSTFS_ENCRYPTION_MULTIPART_SEGMENT_NONCE and RUSTFS_KMS_ENVELOPE_AAD default-flip compatibility entries in docs/architecture/compat-cleanup-register.md with matching RUSTFS_COMPAT_TODO source markers.
- Add docs/architecture/kms-format-version-policy.md (indexed in docs/architecture/README.md) covering all 12 persisted KMS/SSE formats, ciphertext stream frame types, evolution rules, deprecation process, and why no standalone migration framework is built.
- Add scripts/check_kms_format_versions.py and scripts/test_check_kms_format_versions.py wired into scripts/check_architecture_migration_rules.sh and .config/make/tests.mak.
- Update docs/testing/ci-gates.md release validation tables and exits to match the live release-candidate.yml -> release-complete.yml -> release-publish.yml pipeline.
- Fix inaccurate OIDC other_audiences wording in docs/operations/oidc-provider-requirements.md and docs/operations/oidc-console-integration.md.
- Record verified closed-advisory dispositions and closure audit rules in docs/testing/security-regressions.md without marking open P1 items as fixed.

Refs: rustfs/backlog#2703, rustfs/backlog#1667, rustfs/backlog#1641, rustfs/backlog#2662, rustfs/backlog#2724, rustfs/backlog#1506
2026-11-27 06:37:50 +08:00
hector 08575786c6 ci: remove schedule-only rio-v2 lanes from CI (#9652)
The rio-v2 test, debug-binary, and e2e jobs in ci.yml ran only on the
nightly schedule and manual dispatch. Drop them, the ci-feat-rio cache
warm job that existed for them, and the merge-gate entries that named
them. The rio-v2 feature and minio-interop workflow stay. Default debug,
e2e, and S3 lanes are unchanged.

Bump the CI plan contract so a base planner that still lists those jobs
cannot authorize the new required set.

Co-authored-by: hector <majinghe@users.noreply.github.com>
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
2026-11-27 05:17:00 +08:00
Hauser Zhi 2e9e206d02 fix(ecstore): reject startup without a local endpoint (#9638)
* fix(ecstore): reject startup without a local endpoint

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Signed-off-by: Hauser Zhi <housemecn@gmail.com>

* perf(ecstore): resolve startup DNS once per host

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Signed-off-by: Hauser Zhi <housemecn@gmail.com>

* fix(ecstore): reject zero-port storage endpoints

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Signed-off-by: Hauser Zhi <housemecn@gmail.com>

* fix(ecstore): bound startup DNS by the topology deadline

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Signed-off-by: Hauser Zhi <housemecn@gmail.com>

* fix(server): exit promptly after a startup DNS timeout

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Signed-off-by: Hauser Zhi <housemecn@gmail.com>

* perf(ecstore): skip unused endpoint identity scans

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Signed-off-by: Hauser Zhi <housemecn@gmail.com>

* fix(log-analyzer): track startup DNS failures

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Signed-off-by: Hauser Zhi <housemecn@gmail.com>

* test(ecstore): preserve fresh copy-heal upload initiation

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Signed-off-by: Hauser Zhi <housemecn@gmail.com>

---------

Signed-off-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: qunjiazhu <qunjiazhu@gmail.com>
Co-authored-by: Chris An <anzhengchao@gmail.com>
2026-11-27 01:18:31 +08:00
Hauser Zhi dbb9ca60fc fix(perf): validate steady Warp rates and tail latency (#9637)
* fix(perf): validate steady Warp rates and tail latency

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* test(server): count plaintext SSE-C warnings directly

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

---------

Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: qunjiazhu <qunjiazhu@gmail.com>
Co-authored-by: Chris An <anzhengchao@gmail.com>
2026-11-27 00:37:05 +08:00
Hauser Zhi 9a65ac95f7 fix(ecstore): bound compressed GetObject range reads (#9639)
* fix(ecstore): bound compressed GetObject range reads

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* chore(ci): tighten compressed reader error ratchet

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* perf(ecstore): stream object ranges directly to callers

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* perf(ecstore): decode compression indexes without reframing

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* perf(rio): reuse verified plaintext block buffers

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* test(server): count SSE-C warnings without collecting

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* test(admin): distinguish explicit and implicit IAM denials

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

---------

Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: qunjiazhu <qunjiazhu@gmail.com>
2026-11-27 00:34:45 +08:00
Hauser Zhi 1f9841e7a5 feat(perf): support a steady Warp completion rate gate (#9630)
Allow raw PUT validation to require a completion rate after a fixed
cutoff in the common active interval. Preserve the whole-window report
when the requested steady rate falls below the minimum.

Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: qunjiazhu <qunjiazhu@gmail.com>
2026-11-26 09:57:15 +08:00
overtrue 1004b3d0dc ci(security): remove stale embedded-secret exemptions superseded by 1180ebf34
Revert c6ca50ab39 after 1180ebf349 replaced the three AKIA* dummy unknown access keys in sec_signature_matrix_test.rs with non-AKIA TEST* dummy keys, making the three NON_SECRET_LITERALS entries in scripts/check_embedded_secrets.sh stale.
2026-11-25 22:36:43 +08:00
overtrue c6ca50ab39 ci(security): excuse synthetic unknown access key ids
Quick Checks failed the embedded-secret guard on three fixed GHSA
fixtures in sec_signature_matrix_test.rs. Those ids must stay
well-formed and unknown so both stacks return InvalidAccessKeyId.
Exempt only those exact strings and leave the tests unchanged.
2026-11-25 22:25:35 +08:00
overtrue f0bad7d57b fix(testing): record signed conformance rulings for gateway@4a4360da
Implement maintainer sign-off item 3 from rustfs/backlog#2684#issuecomment-7163283798 for T3.4 (rustfs/backlog#2775):

- Extend scripts/check_conformance_rulings.py to accept exact ordered `failures = [...]` lists (for multi-diagnostic and multi-line golden/exact_utf8 diffs) alongside single-line `failure = "..."`, and allow the signed ledger IDs `rustfs/backlog#2684`, `rustfs/backlog#2762`, and `rustfs/gateway#1349`. Keep strict ordered exact equality, 90-day expiry bounds, schema validation, and stale-ruling rejection, with expanded --self-test coverage.
- Populate .config/conformance-rulings.toml with all 45 remaining exact diagnostics observed live against rustfs@c010acf6e and rustfs/gateway@4a4360da (51 total ruled, expires 2027-02-01), keeping the existing 6 rulings intact.
2026-11-25 21:49:37 +08:00
overtrue 2180cb7f9b fix(testing): accept signed CreateBucket Location in wire replay
Record the maintainer-signed accepted-change ruling from rustfs/backlog#2684#issuecomment-7163283798 in gateway wire replay and the S3 stack rollback guide:

- Keep location in HEADERS in scripts/gateway_wire_replay.py so PostObject 303 redirects and all other operations still compare Location byte-for-byte.
- Exempt only CreateBucket PUT 200 responses where the only difference is candidate adding a single Location: /<bucket> header matching the canonical path-style or virtual-hosted target bucket, recording those entries under accepted_differences without wire data while keeping unruled differences fail-closed.
- Add positive and fail-closed negative regression tests (including a synthetic 93-CreateBucket + PostObject 303 batch check) in scripts/test_gateway_wire_replay.py.
- Document the signed PutBucketPolicy (8f81762a6) and CreateBucket (8676d2f3b) client-visible behavior changes in docs/operations/s3-stack-rollback.md.
2026-11-25 21:17:22 +08:00
overtrue 328d157f36 ci(mint): run nightly dual-stack comparison with diff-table gate
Upgrade .github/workflows/mint.yml from a weekly report-only single-stack run to a nightly dual-stack comparison between the pinned reference release (.config/reference-binary.toml) and the current checkout candidate, gated by a fail-closed (sdk, test, legacy, gateway) diff table (scripts/mint_stack_diff.py) for rustfs/backlog#2774 (T3.3).
2026-11-25 15:44:35 +08:00
overtrue c255d6b8ed feat(gateway): wire native extension tables and admin route census
Pin rustfs-gateway crates to 9d98970d8c54da31a509f77516ca4a690ac1f794 and assemble the S3 metadata listing and control-plane extension tables from the generated native dialect modules.

Add admin_route_census, scripts/check_gateway_admin_census.py, and control-plane integration coverage for canonical and MinIO alias admin routes, buffered payload verification, and presigned Object Lambda precedence.

Refs: rustfs/backlog#2770, rustfs/backlog#2734
2026-11-25 12:41:25 +08:00
唐小鸭 2fd613157b refactor(sse): extract SSE into the rustfs-sse crate and layer it (#9574)
* refactor(sse): extract server-side encryption into rustfs-sse crate

Move the SSE-S3 / SSE-KMS / SSE-C key resolution, metadata and authorization logic out of rustfs/src/storage/sse.rs into a new crates/sse (rustfs-sse) so its outward references are explicit.

The crate depends only on rustfs-config, rustfs-kms, rustfs-policy, rustfs-s3-types and rustfs-utils. It does not reach the storage engine, IAM, the gateway or the server binary; scripts/check_architecture_migration_rules.sh now pins that dependency set.

Everything the crate needs from the running server arrives through the SseHost port (current KMS service, KMS manager state, bucket default encryption, per-key authorization). The host is an explicit parameter on every entry point that needs it rather than a global, so a missing installation cannot silently fall back to the local key provider.

The crate reports failures as SseError, which carries the S3 error code. The KMS-to-S3 error mapping moves with it and rustfs/src/error.rs reuses it, so response codes and messages are unchanged. The source of an SSE-internal error is no longer wrapped in StorageError::Io.

rustfs/src/storage/sse.rs stays as the adapter: it implements the host, binds the entry points to this server and converts back to ApiError, and keeps the conversions that cross the engine boundary (read-side resolver, multipart completion gate, reader error mapping).

Tests split with the code. Four provider round-trips over rio streams move to storage/sse_test.rs because the crate does not depend on rio. Cross-crate test seams sit behind the test-util feature, enabled only from the rustfs dev-dependencies. The rio-v2 CI lane and cache warm-up now include -p rustfs-sse so the rio-v2-only SSE tests keep running.

* refactor(sse): remove three unused configuration helpers

get_sse_type, sse_configuration_to_metadata and SseTypeV2::to_metadata have no caller in the crate, its tests, or the server. All three carried #[allow(unused)], which is what kept the compiler from reporting them.

* refactor(sse): split the crate root into core and kms modules

Move every item of the single-file crate into modules without changing
any of them:

- core/s3: what S3 defines for SSE (request headers, scheme selection,
  SSE-C validation, key-policy authorization)
- core/keying: how RustFS seals and records object keys (key material,
  direct and object-key forms, stored metadata, encryption context)
- core/{request,write,read,rewrap,audit}: the per-request entry points
- kms: data-key providers (KMS-backed, local master key, MinIO
  builtin-KMS ciphertext) and the provider registry

The rio-v2 only modules carry the feature gate at module level instead
of on each item. Inline tests move to a crate-level tests module. The
public surface is unchanged and is now an explicit re-export list in
lib.rs; visibility is otherwise tightened to pub(crate) or private.

Documentation that cited the old file now points at the module that
holds the symbol.

* refactor(sse): add an explicit startup step for process-level state

Give rustfs-sse one entry point, `startup::init`, for the state that is
fixed for the lifetime of the process. The server calls it where it used
to log the SSE-KMS key policy mode.

- Resolve the key policy enforcement switch once and log its mode.
- Check `RUSTFS_SSE_S3_MASTER_KEY` at startup and report it through the
  `sse_local_master_key` event as `loaded`, `not_set`, or `invalid`. An
  unusable value is logged as an error; startup still succeeds and
  requests fail exactly as before.
- Return a `StartupReport` so the caller can see both results. Repeated
  calls return the first report without logging again.

Anything that follows the KMS service state stays resolved per request:
the service follows configuration and can be started, restarted, or
stopped from the admin API while the process runs.

`get_local_sse_dek_provider` becomes synchronous, since it never awaited
anything. The "Using RUSTFS_SSE_S3_MASTER_KEY for SSE-S3" line that was
logged when the key was first used is replaced by the startup event.

* refactor(sse): split the write path into S3 scheme and keying mode

The write entry points mixed two questions: which SSE scheme S3 asks for,
and how this build forms and stores the object key. Give each a home.

- `core/s3/scheme.rs` gains `resolve_write_scheme`, which validates the
  headers and resolves the request, then the bucket default, to a
  `WriteScheme`. PutObject and CreateMultipartUpload now share it; the
  second copy of that decision (`SseTypeV2`,
  `prepare_sse_configuration_v2`) is removed.
- `core/keying/` gains one constructor per key source
  (`new_key_under_customer_key`, `new_session_key_under_customer_key`,
  `new_key_under_data_key`) in each mode. `keying/mod.rs` is the only
  place that says which mode a build writes.
- `core/write.rs` only orders the steps and no longer carries any
  `rio-v2` conditional compilation.

No behavior change. A multipart session still validates the SSE-C key at
creation only in the mode that seals the session key under it.

`SseTypeV2` leaves the public surface; nothing outside the crate used it.

* refactor(sse): split the read path into S3 scheme and keying mode

The read entry points decided the scheme, authorized the key, and
recovered the object key in one function, with the SSE-C preamble and
the managed key resolution written out twice. Separate the steps.

- `core/keying/stored.rs` (new) recognizes how a stored object was keyed
  (`recognize_stored_managed_key`) and recovers its key
  (`open_under_customer_key`, `open_under_stored_data_key`). The unwrap
  body moves there unchanged.
- `core/s3/ssec.rs` gains `require_matching_ssec_key` and
  `stored_ssec_algorithm`, shared by the unwrap and the response-header
  paths.
- `core/read.rs` orders the steps: recognize, name the key, authorize,
  recover. Both read entry points resolve the key through one helper, so
  authorization and the response header cannot name different keys.
- `core/keying/` no longer imports from `core/s3/`: the request check
  `reject_kms_context_location_override` moves to `core/s3/headers.rs`,
  and the legacy SSE-C nonce hashes with `md5` directly.

`rio-v2` conditional compilation is now confined to `core/keying/` and
`kms/`. No behavior change: the order of checks on a read is preserved.

* docs(sse): describe the module layout and its layer rules

Record in the crate instructions what the split settled: where startup
state, the entry points, the S3 layer, the keying layer, and the
data-key providers live, and the rules that keep them apart.

- `core/keying/` never imports from `core/s3/`; `core/s3/` reads stored
  metadata only through `core/keying/metadata.rs`.
- `rio-v2` conditional compilation stays under `core/keying/` and `kms/`.
- A new stored format is added under `core/keying/` without changes
  under `core/s3/`.

* refactor(sse): let each keying mode own its stored record

One function wrote the stored metadata of every keying mode, and one
function read it back, each switching on the mode and the build inline.
Give a mode both directions of its own record instead.

- `core/keying/direct.rs` records and reads the Direct record
  (`record_customer_key_nonce`, `record_wrapped_data_key`,
  `read_wrapped_data_key`).
- `core/keying/object.rs` records and reads the sealed-key record in
  MinIO's slots (`record_sealed_customer_key`,
  `record_data_key_in_minio_slots`, `read_sealed_data_key`).
- `encryption_material_to_metadata` records the scheme and hands the key
  to the mode that formed it.
- `core/keying/stored.rs` reads in three named steps: the recognition
  order of the modes (`read_stored_data_key`), the choice of the
  provider that unwraps the data key (`unwrap_stored_data_key`), and the
  opening of the object key. A stored key carries its mode as
  `StoredKeyMode` rather than as an optional sealed key.

No behavior change. The stored metadata is identical for every
combination of scheme, mode, sealed key, key id, context, and size in
both builds, and the order of the read-side failures is preserved.

* test(sse): add a black-box suite that compares two server binaries

Unit tests cannot show that moving SSE into its own crate left what a
client sees, and what lands on disk, unchanged. This suite drives a real
server process and can compare two binaries.

- 30 cases over six process configurations: no key source, a loaded and
  an invalid local master key, the Local KMS backend with per-key
  authorization off and enforced. They cover round trips and response
  headers, bucket default encryption, CopyObject, multipart uploads,
  run-time KMS stop and start, malformed requests and authorization.
- Every HTTP exchange inside a case is recorded as an observation:
  status, error code and message, SSE headers, response header names,
  body hash, and the encryption metadata key names stored for the
  object. `diff` compares two runs field by field against a closed list
  of accepted differences.
- `cross` has one binary write every stored form and another read the
  same data directory.
- A registered binary is pinned by SHA-256, and a run fails when the
  stored form does not match the build the binary was registered as.

Results for this branch against its base, default build: 93 verdicts and
252 exchanges equal, no blocking difference; the only accepted one is the
new `sse_local_master_key` startup event. Cross reads pass in both
directions, 42 objects each.

The suite also pins two behaviors that predate this branch. Multipart
responses for SSE-C uploads carry `x-amz-server-side-encryption: AES256`
besides the customer-key headers; MP-03 records that as a known deviation.
A `rio-v2` build cannot read back encrypted objects of roughly 64 to
128 KiB, or of 3 MiB and more, so under that build the comparison only
shows that both binaries fail the same cases.

* test(sse): stop the black-box suite from overlooking two regressions

The known-deviation marker in MP-03 accepted any SSE headers that
contained the expected ones, so an unrelated extra header, the raw
customer key included, was still reported as the known deviation. It now
tolerates exactly the one documented difference and fails on anything
else.

The observation of a result document kept only the set of element names.
A wrong part size, a missing part or reordered parts in a listing changed
nothing, so a comparison between two binaries could not see them. It now
keeps every leaf with its value in document order and reduces only the
elements that vary between runs: upload ids, timestamps, markers and
ETags of encrypted objects.

`suite.py selftest` checks both offline, together with the rules of the
comparison. Against the previous observation code it fails on the three
listing cases. The comparison of this branch with its base still shows no
blocking difference in either build.

* test(sse): prepare the black-box suite for P1 cases and more backends

The suite could only run P0 cases on six built-in configurations with one
shared site each. The next groups of cases need more than that:

- `run --level p0|p1|all`, and a `skip` verdict for a case the backend's
  capability table rules out.
- `register_config` lets a case module add a process configuration with
  what it needs before the process starts, once it answers, and at the
  end of the run. The two Local KMS configurations now use the same
  mechanism instead of special cases in the driver.
- `isolated` cases get a site of their own on a fresh data directory and
  may restart it with another configuration or environment.
- Exchange hooks and post-run checks, for modules that keep everything a
  run saw and judge it as a whole.
- Case modules are discovered by file name, and the binary registry can
  be shared between state directories.

The P0 results and the comparison with the base are unchanged.

* test(sse): cover run-time state, authorization, leaks and stored form

Three groups of cases are added to the black-box suite, with what they
need to run.

Run-time state (14 cases). A write follows the state the process is in
now, a read follows what the object recorded: the master key across
restarts, KMS stopped, started and configured at run time, a deployment
moving between key sources, a changed backend, and keys disabled,
destroyed and rotated. New configurations: Local KMS with a master key,
Vault Transit, Vault KV2 and the Static backend. Vault is a development
server started by the driver with a token generated per run; when it
cannot be started its cases report an environment error.

Authorization and leaks (18 cases). Per-key authorization on bucket
defaults, both ends of a copy, multipart uploads, every read entry point,
anonymous access, internal work and audit entries. Every exchange of a
run is archived with secrets redacted, and four checks over the whole run
look for key material in responses and server logs, for internal headers,
and for unexpected internal-error messages.

Stored form (8 cases). What an encrypted object looks like on disk is
read with the repository's `dump_fileinfo` tool and held to one manifest
per build: every metadata key with its exact value or, for random values,
its shape. The cases also search the drives for plaintext, customer keys
and unwrapped data keys. `cross` records the stored form of everything
the writer stored.

Compared with the base on the default build, all levels: 382 verdicts and
887 exchanges equal, no blocking difference; 86 case runs pass on each
side. Three cases report a known deviation that predates this branch: the
multipart SSE-C response header (MP-03), an SSE-KMS write that turns from
400 into 503 after a refused KMS start (KS-09), and a read by a caller
without a grant that reveals whether the key was destroyed or KMS is
stopped (SEC-05). The manifests were written from the base binaries and
the branch stores the same form in both builds.

Each group was shown to fail when it should: Vault unavailable gives
environment errors, the two authorization configurations swapped fail the
matrix both ways, a planted key is found in a log and in a response, a
`rio-v2` binary registered as the default build fails the manifest and
the build check.

* test(sse): expect only customer-key headers on SSE-C multipart replies

MP-03 recorded the extra `x-amz-server-side-encryption: AES256` header on
SSE-C CreateMultipartUpload and CompleteMultipartUpload responses as a
known deviation. The header is gone on main, so the case now checks the
intended headers directly; left as a marker it would report the deviation
as fixed and fail the run.

On both builds the base and this branch pass the case.

* test(sse): take the black-box suite out of this repository

The suite under `scripts/test/sse_blackbox/` drives a server binary from
the outside and compares two binaries. It is a product-level test
harness, not part of the server's own tests, and belongs with the other
external test suites rather than in this repository.

The directory is removed, with the paragraph in `crates/sse/AGENTS.md`
that pointed to it. No server code changes.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
2026-11-25 06:19:21 +08:00
overtrue c40ae06c5e fix(testing): verify the embedded Git revision of E2E binaries 2026-11-25 06:14:33 +08:00
overtrue c8867b64bd test(gateway): identify wire header drift and replay empty ranges 2026-11-25 05:13:31 +08:00
overtrue 8bbd578c95 fix(ci): attribute unsupported conformance controls to the runner 2026-11-25 03:18:23 +08:00
overtrue f475b7dd7c fix(testing): compare Location in gateway wire replay 2026-11-25 00:34:30 +08:00
GatewayJ 47e27180f2 feat(signer): support optional FIPS signing for S3 SigV4 (#9219)
* feat(signer): support optional FIPS signing for S3 SigV4

* test(signer): verify AWS-LC services used by SigV4 hashing

---------

Co-authored-by: Chris An <anzhengchao@gmail.com>
2026-11-24 23:15:35 +08:00
overtrue 92a78f9352 test(gateway): compare recorded S3 lifecycle and multipart response headers 2026-11-24 23:10:35 +08:00
overtrue 5e8d81e39a test(gateway): compare object lock headers in wire replay 2026-11-24 22:25:05 +08:00
overtrue 02a802b240 test(gateway): compare object metadata headers during wire replay 2026-11-24 21:07:16 +08:00
Chris An 159c23cfba chore(e2e): trace the gateway crate in s3s-e2e logs (#9607) 2026-11-24 20:18:29 +08:00
overtrue 9939a73d50 test(gateway): pin three legacy HTTP connection outcomes 2026-11-24 14:58:04 +08:00
overtrue ff735e5f04 test(gateway): record both Ceph addressing styles in nightly runs 2026-11-24 14:38:39 +08:00
overtrue 08bdff6d3b ci(gateway): isolate conformance and client matrix fixtures 2026-11-24 14:38:05 +08:00
overtrue 4529bfcbc7 test(gateway): verify full conformance inventory and legacy heads 2026-11-24 14:37:01 +08:00
overtrue a6c080a794 ci(gateway): replay signed Ceph requests against the pinned release 2026-11-24 13:40:17 +08:00
overtrue 16a8874afb ci(gateway): cover nightly wire workloads and scope smoke runs 2026-11-24 13:28:15 +08:00
overtrue 0f0594b0e9 ci(gateway): record and verify nightly wire samples 2026-11-24 13:28:15 +08:00
overtrue 2b02e5c850 test(compat): verify the pinned client matrix inventory 2026-11-24 12:30:54 +08:00
overtrue 88037b557b ci: retire the gateway integration branch workflow 2026-11-24 12:26:50 +08:00
cxymds 17946efa94 feat(scanner): expose durable bucket scan progress (#9556) 2026-11-24 03:30:15 +08:00
overtrue ac5f274a71 build(gateway): keep legacy protocol references only in independent test oracles 2026-11-23 23:07:40 +08:00
overtrue a1af0a9a48 ci(gateway): reject legacy S3 packages in normal dependency trees 2026-11-23 23:06:43 +08:00
overtrue 18f5090671 fix(test): adapt the shared read benchmark to historical GET APIs 2026-11-23 14:50:06 +08:00
chapman 2cc25bcb25 fix(s3): map CompleteMultipartUpload checksum mismatch to BadDigest (#9494)
* fix(s3): map CompleteMultipartUpload checksum mismatch to BadDigest

Return structured rustfs_rio::ChecksumMismatch errors from SetDisks::complete_multipart_upload when a completion checksum header mismatches the upload's algorithm, checksum configuration, FULL_OBJECT digest or part-count suffix, or COMPOSITE digest, so the S3 usecase maps rejections to HTTP 400 BadDigest instead of 500 InternalError without publishing the object or retiring the upload.

Fixes #9272

* fix(ecstore): preserve legacy unconfigured-upload checksum behavior

Let unconfigured multipart uploads continue delegating want_checksum validation to Checksum::matches against the empty combined part-digest buffer instead of rejecting every non-empty header outright. Non-matching digests still return ChecksumMismatch (400 BadDigest), while empty-buffer digests such as CRC32 AAAAAA== preserve the legacy 200 echo behavior pinned by embedded_gateway_stack_test.

* fix(ecstore): reject zero-part full-object checksum suffixes

* fix(ecstore): accept stored-record full-object checksums

A wire -N suffix (including -0) sets MULTIPART without INCLUDES_MULTIPART, while stored multipart records carry both flags with want_parts == 0. Treat only the former as a suffixed claim so a matching stored-record FULL_OBJECT checksum still completes, and cover it alongside the existing -0 and -1 rejections.

---------

Co-authored-by: Chris An <anzhengchao@gmail.com>
2026-11-23 04:16:46 +08:00
Chris An b19c06f4de fix(scanner): revisit compacted prefixes with active lifecycle rules (#9551)
Co-authored-by: cxymds <cxymds@gmail.com>
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
2026-11-23 04:13:57 +08:00
cxymds 1b2615cdb5 fix(replication): recover permanently decommissioned sites (#9491)
* fix(replication): durably decommission unreachable sites

* fix(replication): declare native error macro at removal boundary

* fix(replication): preserve removal state and edit execution context

* fix(replication): use storage boundary aliases in removal tests

* fix(replication): sign local removal probes with the admin session

* fix(admin): scope legacy test helper bounds to the method

* test(connect): stabilize concurrent rotation timeout coverage

---------

Co-authored-by: Chris An <anzhengchao@gmail.com>
2026-11-23 04:12:51 +08:00
CCWinston 05446be442 fix(connect): align agent v1 job schema and fail-closed fixture validation (#9487)
* fix(connect): align agent v1 job schema and fail-closed fixture validation

Align the Agent v1 job envelope schema with the Rust runtime constants and
make fixture validation fail closed instead of silently skipping unknown or
unapproved cases.

- Pin drive CPU, memory, output, sample-period and timeout limits to the
  runtime values and require 64-char lowercase hex keyIds plus canonical
  Base64URL encoded Ed25519 signatures and nonces.
- Select the schema for each reject vector from that vector's own base
  instead of always using the first accept-vector schema.
- Fail on schema gaps unless they are explicitly allowlisted, and fail on
  unknown bases, duplicate IDs, invalid pointers and stale allowlist entries.
- Enable jsonschema FormatChecker so date-time values are actually asserted.
- Add Python regression suites, the fixture verifier, the regression runner
  and a GitHub Actions workflow.

Verified with scripts/run_agent_v1_regression.sh:
- 25/25 Python tests pass, 16/16 standalone schema tests pass.
- Fixture manifest: ok=68 bad=0.
- Accept vectors 2/2; reject vectors 10 rejected by schema and 2 approved
  runtime semantic gaps.

* fix(connect): validate JSON Pointer array indices and root manifest coverage

Two fail-closed gaps in the fixture verifier:

- Array tokens were converted with int(), which also accepts "-1" and "01".
  A reject vector such as /items/-1 could invalidate a different element and
  still be reported as rejected. Validate each token against the RFC 6901
  array-index grammar before indexing, including for removal.
- The root manifest was never compared with the fixture sets on disk, so an
  empty or partial root still reported success. Require every fixture set to
  be listed exactly once at the root, and fail on missing, extra or duplicate
  entries.

Add regressions for negative and zero-padded indices, empty root manifests,
unlisted fixture sets and duplicate root entries.

* fix(ci): pin agent protocol workflow actions

* fix(ci): bound the agent protocol regression job

* fix(ci): register the agent protocol validation workflow

---------

Co-authored-by: WinstonCCC <WinstonCCC@users.noreply.github.com>
Co-authored-by: Chris An <anzhengchao@gmail.com>
2026-11-23 04:12:43 +08:00
Pernav Jain 6632490a32 fix(policy): accept S3 lifecycle action aliases (#9467)
* fix(policy): accept S3 lifecycle action aliases

* fix(policy): export standard lifecycle action names

* fix(iam): preserve lifecycle policy storage compatibility

* test(admin): compare STS policy as JSON

* fix(ci): use IPv4 for runtime package setup

---------

Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: GatewayJ <835269233@qq.com>
Co-authored-by: Chris An <anzhengchao@gmail.com>
2026-11-23 03:49:36 +08:00
Chris An 99a1803773 test(ci): fix storage fixture races (#9547)
* test(ci): make storage fixtures wait for their prerequisites

* test(ci): allow equal timestamps for parallel scanner probes
2026-11-21 09:11:53 +08:00
overtrue 6e417a458e test(upgrade): exercise the official 1.0.5 gateway baseline 2026-11-20 14:50:43 +08:00
overtrue 5b703b61f9 test(ci): align storage guard fixtures with the surviving helper rule 2026-11-20 12:00:53 +08:00
Chris An 31e0798637 refactor(storage): retire the legacy S3 storage edge (#9527)
* test(storage): restore POST form metadata policy fixture

* test(storage): follow the current PUT path in contract checks

* fix(storage): verify archive transport EOF before parsing the final frame

* test(rustfs): restore main verification after gateway migration

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>

* refactor(storage): retire the legacy S3 storage edge

* fix(storage): bound the audited multipart copy future and trace LIST quorum causes

* fix(deps): align bindgen and prettyplease on syn 3 for FIPS builds

* fix(storage): expose the typed legacy cause on owned errors

* test(storage): preserve stream lengths and request facts on retired seams

---------

Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
2026-11-20 10:07:52 +08:00
overtrue a52b51b764 refactor(app): drop s3s entrypoints and move test seams to owned types 2026-11-20 05:23:37 +08:00
overtrue 9c0bc265c3 ci: drop RUSTFS_S3_STACK from reference parity, nextest notes and the connect boundary guard 2026-11-19 16:15:49 +08:00
overtrue 74bf3ca5fa ci(nightly): run the dual-stack nightly on the gateway stack and archive the both-stack scripts 2026-11-19 16:15:49 +08:00
overtrue 31c4f4a7ff ci(acceptance): judge one server and drop the legacy reference run and the stack diff 2026-11-19 16:15:48 +08:00
overtrue 3fb8d861f0 ci(e2e): run the distributed, replication and migration-interop lanes on one stack 2026-11-19 16:15:48 +08:00
overtrue 23a2593aac ci: fold the gateway-stack lanes into the main lint, test and e2e jobs 2026-11-19 16:15:48 +08:00