Add .config/advisory-exceptions.toml (schema_version=1) and scripts/security/check_advisories.py to enforce pinned cargo-deny (0.20.2), advisory-db freshness (<=24h verified cache fallback), bidirectional deny.toml alignment, 90-day max UTC validity windows, exact version scope matching, and PR base-diff approval checks.
Wire security-advisories into ci.yml (ALWAYS_JOBS, required-checks, alert-on-failure, PLAN_CONTRACT=10), align daily audit.yml while preserving all four cargo-deny categories, and register --self-test in make script-tests.
Historical RUSTSEC-2023-0071 (transitive rsa 0.9.10 via openidconnect 4.1.0; direct rsa upgraded to patched 0.10.0 in PR #9492) retains its expired 2026-07 review window and intentionally fails closed until maintainer risk acceptance or upstream upgrade lands.
Refs: rustfs/backlog#2668
* fix(ecstore): skip rebalance re-copy when target holds the version
A rebalance that stops after an object version is committed on the target pool and before its source copy is removed leaves that version in both pools. The next run uploaded every part of a multipart object again and only found the existing copy when the create-only completion was refused, so a retry cost the whole object.
Look up the pool the copy would be written to before starting the multipart upload, and settle on it when it already holds the strictly equivalent version. Decommission with a capacity owner already does this; callers without one now do too. A lookup that fails or finds no equivalent copy falls through to the unchanged copy path.
* fix(ecstore): require write quorum before skipping the rebalance re-copy
The pre-check settled on the target copy whenever an object read returned the equivalent version. That read answers from read quorum: on a 2+2 set with two drives offline it still returns matching metadata, the entry reported the version as moved, and the source copy was removed while the target held two readable shards. The copy path it replaced needs a write quorum to start, so it kept the source in that state.
Count the drives of the target set that hold the version in the committed data directory, once per drive slot and in one fanout, and settle only when a write quorum of them agree. A copy below that leaves the decision to the unchanged copy path.
Add a rebalance entry test on a 2+2 target: with two target drives offline the source survives and stays readable; with the drives back the entry completes on the committed copy without rewriting it.
---------
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: Chris An <anzhengchao@gmail.com>
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>
* fix(policy): scope NotAction Allow to named action families
Confine Allow statements built from NotAction to the action families named in their exclusion list so S3 NotAction policies on wildcard or bucket resources cannot implicitly grant admin, STS, or KMS actions. Fail closed when both Action and NotAction are empty, preserve explicit Deny + NotAction reach across all action families, and preserve explicit admin NotAction coverage for sibling admin actions.
Refs: rustfs/backlog#3321
* fix(policy,utils): eliminate exponential wildcard matching
Replace recursive backtracking in wildcard matching (rustfs-policy and rustfs-utils) with iterative O(name.len())-space dynamic programming that collapses consecutive '*' wildcards and preserves allocation-free fast paths for literal and single-'*' patterns. Also cap versioning ExcludedPrefixes count (100) and byte length (1024) in validate_bucket_versioning_update as defense in depth.
Refs: rustfs/backlog#3318
* fix(policy): prefer parent over raw sub for aws:userid variable
Share a single resolve_userid_values helper between VariableResolver::resolve and resolve_multiple that prefers the issuer-scoped parent claim over raw sub, aligning the ${aws:userid} policy variable with the aws:userid condition key derived in auth facts while retaining sub as a fallback when parent is absent.
Refs: rustfs/backlog#3339
* fix(policy): treat anonymous-matching principals as public
Add Principal::is_public() matching either '*' or the empty anonymous account '' through the same wildcard matcher used during request authorization, and switch execute_put_bucket_policy and execute_get_bucket_policy_status to use it so empty and leading-'?' principals cannot bypass BlockPublicPolicy or evade public status classification.
Refs: rustfs/backlog#3357
* fix(s3select): restrict SQL functions to an explicit allowlist
Replace unfiltered DataFusion default scalar, aggregate, and window UDF registration in SimpleFunctionMetadataManager with an explicit S3 Select allowlist, register allowlisted scalar aliases directly, and remove the session scalar-function fallback from MetadataProvider::get_function_meta.
Wrap retained expanding scalar functions (concat, concat_ws, to_char) and any manually registered count-sized functions (repeat, lpad, rpad) with a pre-allocation result-size guard that also re-wraps scalar UDFs produced during expression simplification.
Refs: rustfs/backlog#3317
* fix(s3select): bound SQL operator and nesting depth at parse
Add BoundedRustFsDialect enforcing a per-parse infix/postfix operator budget (MAX_SELECT_OPERATORS) via Dialect::parse_infix returning ParserError::RecursionLimitExceeded, and wire it into both ExtParser::parse_sql and legacy_json_source_from_input.
Also bound set-operation keyword counts before parsing (preventing deeply nested SetExpr chains from overflowing on drop) and bound nested field-access chains during statement preparation.
Refs: rustfs/backlog#3319
* fix(s3select): bound uncompressed record sizes and decoding
Apply RecordSizeTracker (MAX_SELECT_RECORD_BYTES) across uncompressed plain, ScanRange, and ScanRange header reads in EcObjectStore, recognizing CR, LF, and CRLF line endings for default CSV inputs without a custom RecordDelimiter.
Bound session batch sizes and disable batch coalescing for CSV and JSON Lines, replace DataFusion's unbounded stock listing table scan with a byte-bounded, memory-pool-accounted DelimitedSelectTable, keep multi-record JSON Lines schema sampling within the session memory pool budget, and add a StreamFilterOutput physical optimizer rule so FilterExec streams filtered batches without re-coalescing.
Refs: rustfs/backlog#3348
* fix(rpc): gate gRPC boot-epoch proofs on verified signatures
Stop computing and attaching secret-keyed boot-epoch, replay-cache, and msgpack capability response proofs before gRPC authentication runs in RpcRequestPathService::call.
Gate proof generation on an RpcSignatureVerified request marker raised by check_auth only after the internode HMAC signature has verified, including post-HMAC rejections (stale boot epoch, replay-scope retries, replay detection, and replay-cache/background admission resource exhaustion) required for cluster recovery.
Verify the method-bound v2 HMAC signature before returning replay_scope_required in verify_tonic_rpc_signature_with_policy so unsigned, legacy-only, or forged callers never trigger a post-HMAC rejection reason or consume replay-cache capacity.
Refs: rustfs/backlog#3326
* fix(keystone): namespace parent_user by Keystone user ID
Set Credentials.parent_user in KeystoneAuthProvider::keystone_token_to_credentials to the namespaced Keystone identity (keystone:<user_id>, matching access_key) instead of the bare Keystone username.
This prevents an external Keystone username from colliding with a local IAM user or the root access key in service-account ownership checks and the is-admin handler while keeping the username available in Credentials.name and claims["keystone_username"].
Update the keystone unit tests and HTTP/3 external stack test expectations, and add regression coverage verifying colliding usernames are never placed in parent_user.
Refs: rustfs/backlog#3362
---------
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
* fix(ecstore): stop bucket presence checks at read quorum
A metadata-only bucket probe can finish after the existing read quorum has confirmed the volume. Preserve full error reduction when quorum has not been reached and keep ordered bucket info and mutation callers on their existing path.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* perf(ecstore): bound PUT rename dialing after write quorum
Share a post-quorum connection deadline across remote rename producers. Unresolved connections can be skipped before dispatch while active mutations drain under the normal namespace owner.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* perf(ecstore): simplify quorum probes and rename fanout
Keep presence-only probes typed as unit results and share their cross-set error reduction with bucket-info queries. Reuse one path owner across disk rename tasks and allocate a connect deadline only when there is a spare.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* perf(ecstore): bound PUT rename preparation after quorum
Apply a single pre-dispatch deadline to remote routing and permit admission. Encode the request once those resources are available and keep existing ownership for dispatched mutations.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* test: fix SSE-C lint and native multipart copy-heal setup
Count warning matches directly and bind native multipart staging to the real bucket incarnation while preserving the historical version fixture.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* test(ecstore): qualify retention fixture metadata type
The default test build includes this fixture without the test-util imports.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* test(scanner): seed checkpoint owner metadata directly
Keep the production object threshold and physical checkpoint barriers while avoiding a full PUT for every fixture entry.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* fix(ecstore): serialize Windows trash cleanup per entry
Keep the per-path lease in the physical deletion worker and compile Unix-only test helpers only on their supported platforms.
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>
* fix(sosapi): distinguish pending and invalid usage proof
Expose neutral bucket usage states from the existing snapshot cache. Maintain the legacy scalar projection and map only pending certification to undefined SOSAPI usage.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* ci(test): isolate three disk-bound ECStore probes
Reserve nextest capacity for the physical Apply barrier and the two same-name multipart probes in the CI profile. Preserve their deadlines, assertions, and internal concurrency.
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>
Track the maximum of each sampled stage window. Keep the existing
summary API and row format while exposing the maxima separately.
Unlock before sorting and format stage rows into shared buffers.
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: qunjiazhu <qunjiazhu@gmail.com>
Keep each writer's disk permit with the physical directory sync
and acquire one global permit per admitted batch. Route non-inline
grouped commits through the same admission and rollback path.
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>
* fix(s3): skip redundant reads for plain bulk deletes
Plain unversioned DeleteObjects entries use source metadata read under the storage write lock. Skip the advisory read that duplicates lock acquisition per request entry, preserve condition and version boundaries, and exercise 16 duplicate DELETE entries while a writer holds the key.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* test(s3): use the storage facade for the delete barrier
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* fix(s3): skip redundant bulk preflight for suspended versions
Apply the same locked-source path to unconditioned, versionless entries in suspended buckets. Verify that duplicate requests reach storage while a writer owns the object and that the suspended delete publishes its marker.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* fix(test): import the delete barrier through the public API
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>
Keep commit_opts.expected_bucket_incarnation_id unchanged when callers pass None in capture_commit_metadata_snapshot_for_options_in, retain preloaded prefix-object Object Lock results until after acquiring the object write lock in SetDisks::delete_object, allow collect_list_parts_results to prove an empty part directory when at least read_quorum disks report FileNotFound and fewer than read_quorum disks are unavailable, and align account_permissions, multipart completion quota, and data-movement replacement tests with #9646.
Refs: rustfs/backlog#3329
Refs: rustfs/backlog#3333
Refs: rustfs/backlog#3345
Refs: rustfs/backlog#3349
Map VersionMarker::parse failures in list_objects::parse_version_marker to StorageError::InvalidVersionID instead of propagating uuid::Error as StorageError::Other, which mapped to HTTP 500 InternalError.
StorageError::InvalidVersionID maps to S3ErrorCode::InvalidArgument (HTTP 400) across ListObjectVersions, metadata version listings, and table-isolated version listings. Add regression tests for invalid version-id-marker rejection and control-character delimiter handling.
#9646 authorizes s3:PutObjectTagging after s3:PutObject when the
request carries object tags. The bucket-tag OPA contract still
consumed only PutObject, so the next GetObjectVersion check saw the
tagging decision. Keep the existing checks and record the tagging
decision for the tagged put and each successful copy.
* fix(admin): validate bucket name in v3 inspect-data
Refs: rustfs/backlog#3320
* fix(admin): enforce SSE-KMS auth on zip download & inspect-data
Refs: rustfs/backlog#3316
* fix(admin): restrict site-replication peer routes to replicator
Refs: rustfs/backlog#3324
* fix(admin): bound ZIP download staging concurrency, size & idle
Refs: rustfs/backlog#3338
* fix(admin): redact sensitive headers in Object Lambda payload
Refs: rustfs/backlog#3360
* fix(iam): enforce session policy bounds on service accounts
Promote copied creator session policies into embedded service-account policies on create, block bounded non-federated callers from replacing their policy boundary, cap policy-bounded STS expiration, and prevent policy-bounded or non-owner root-parented updates from escaping via policy, secret, status, or expiration changes.
Refs: rustfs/backlog#3323
* fix(admin): block restricted STS service-account owner fallback
Reject STS sessions carrying sessionPolicy or sessionPolicy-extracted claims from owner self-service fallbacks in ListServiceAccount, InfoServiceAccount, InfoAccessKey, ListAccessKeysBulk, and DeleteServiceAccount while preserving revision-bound deletes, active policyless user handling, and unrestricted Console STS sessions.
Refs: rustfs/backlog#3334
* fix(iam): persist MFA lockout state on failed verifications
Persist mutated MfaRecord instances through the compare-and-set loop in mfa::store::update even when the mutation closure returns an error, so failed_attempts and locked_until survive across requests and engage rate-limit lockouts while unchanged rejections avoid creating records.
Refs: rustfs/backlog#3356
* fix(admin): deny restricted STS parent credential mutations
Add CredentialMutationDenial::RestrictedSession in CallerIdentity::from_credentials to reject STS sessions carrying sessionPolicy or sessionPolicy-extracted claims from mutating their parent's password or MFA, while preserving TableStorageSession precedence and unrestricted Console STS sessions.
Refs: rustfs/backlog#3353
* fix(iam): require step-up proof to re-enroll active MFA
Require proof of the active second factor inside mfa::service::enroll's CAS update and verify the current secret key in AccountMfaEnrollHandler when MFA is already enabled, preserving first-time enrollment without a current code and enforcing persisted failure lockouts on failed step-up codes.
Refs: rustfs/backlog#3346
* fix(oidc): use LRU state eviction and per-IP authorize limit
Switch OidcStateStore auth and logout caches from TinyLFU to LRU eviction so full caches admit new logins instead of discarding them while abandoned entries age out.
Add a bounded per-client-IP token-bucket rate limit to OidcAuthorizeHandler keyed on the verified peer/trusted-proxy IP so a single client cannot churn through the state store during another user's IdP round-trip.
Refs: rustfs/backlog#3337
* fix(oidc): bind callback provider to state before code exchange
Thread the callback route provider_id from OidcCallbackHandler through FederatedIdentityService::complete_authorization_code and StandardOidcAuthentication::exchange_identity into OidcSys::exchange_code.
Reject mismatched session.provider_id != provider_id immediately after consuming the single-use state and before constructing any client or sending any outbound token request (RFC 9700 section 4.4).
Refs: rustfs/backlog#3358
* fix(oidc,sts): sanitize public OIDC and STS verification errors
Stop echoing raw FederationError::CodeExchange diagnostics from OidcCallbackHandler so internal provider settings (config_url, token_endpoint, client_id) stay in server logs while preserving the invalid/expired state message and load-balancer affinity hint.
Sanitize FederationError::TokenVerification in AssumeRoleWithWebIdentity into fixed, actionable client-facing failure categories while stripping backend metadata-refresh diagnostics so internal discovery URLs are never exposed.
Refs: rustfs/backlog#3359
* fix(oidc): bind console OIDC login state to initiating browser
Have OidcAuthorizeHandler emit an HttpOnly, SameSite=Lax rustfs_oidc_state cookie (Secure over HTTPS, scoped to the callback path, 300s Max-Age) carrying the authorization state.
Verify the cookie against the callback state query parameter with constant_time_eq in OidcCallbackHandler before consulting the federation service or consuming the server-side state, and clear the cookie on callback completion.
Refs: rustfs/backlog#3363
* fix(idp,iam): classify listed STS sessions by claims for revoke
Add guess_sts_user_provider to classify listed STS accounts directly from decoded claims rather than requiring a non-empty session_token (which list_sts_accounts strips), and use it in revoke_matching_sts_accounts and collect_access_keys_for_user.
Return the store-loaded UserIdentity from verify_temp_user_persistence in set_temp_user_with_generation so freshly issued STS sessions cache decoded JWT claims on the issuing node while strictly preserving sts_generation.
Refs: rustfs/backlog#3365
Check the owning instance's registry after the queued renewal and heal
finish. Preserve the contention check and verify that both registries
publish the same new disk handle.
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: qunjiazhu <qunjiazhu@gmail.com>
Bump the pinned rustfs/gateway revision to 095d4763a3f58a5e1d22fe7a231bf1c105473de8
(#1620, independent service-scoped dialects with single-segment path claims) and
add an independent SigService::S3 reserved-console host for console-disabled
listeners (such as the S3 port when a dedicated console listener is enabled).
Both default (/rustfs/console) and custom single-segment console prefixes (/ui,
/UI_assets) plus root icon paths now bypass S3 bucket-name parsing while keeping
original-URI SigV4 verification intact: anonymous and SigV2 requests receive
403 AccessDenied and validly signed SigV4 requests receive 501 NotImplemented,
matching RustFS 1.0.5 while preserving extension/Object Lambda precedence and
dedicated console listener 200 responses (rustfs/backlog#2771).
Align the canonical external middleware stack order comment and
baseline::MIDDLEWARE_LAYER_COUNT (22 -> 24) with EXTERNAL_STACK_CENSUS,
add middleware_matrix_census to pin the 19 Keep + 5 KeepRetainedCompat
T2.12 adjudication and forbid reintroducing the five deleted s3s patch
layers, and update the retained server::legacy_compat module headers to
record their active outer-edge duties per rustfs/backlog#2771.
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>
* fix(ecstore): use recovery deadline for bulk delete prepare
Wait for the complete per-drive batch response under the bounded delete recovery deadline. Preserve the ordinary control timeout for single-object preparation and discovery.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* perf(ecstore): defer batch marker cleanup after receipt quorum
Use the existing recovery worker for committed marker cleanup when the batch fits the hint queue and the current hint generation is present. Keep the existing inline path under backpressure.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* perf(ecstore): reduce bulk delete results once per key
Reuse the per-drive group results for quorum reduction, rollback, and marker purge, avoiding the per-object disk-error matrix. Keep certified cleanup inline after the crossover experiment increased immediate verification and cleanup time.
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>
Add GatewayStack::object_lambda_fallback backed by an Object Lambda
companion control-plane dialect and service that omits native admin
routes, mount all remaining 5 GET native control-plane admin operations
(completing 12/12 native claimed admin routes with pre-body IAM
enforcement) while preserving header-signed and presigned Object Lambda
requests (#1577), and bump the pinned rustfs/gateway revision to
ecafc085de850e1be0c22ba173bf1accc68e75c5 so admin route census enforces
the Object Lambda fallback invariants fail-closed.
Attach IndeterminateAudit as AuthzAuditSink and Observer on GatewayStack so enforced Decision::Indeterminate responses are audited once at the final response boundary without consuming denial rate-limiter budget on discarded pending decisions.
Defer standalone audit runtime initialization when IAM bootstrap is Deferred so init_audit_runtime runs once inside the IAM recovery loop strictly after AppContext installation and before FullReady publication, while keeping inline and embedded startup behavior intact.
Remove sts_query_compat_test::test_bucket_tags_opa_contract from [nightly_extra].e2e in .config/gateway-corpus-tests.toml.
In gateway-acceptance run 45627579166, 314 of 315 nightly E2E cases passed and wire replay passed (502 requests compared, 0 unruled differences, 93 accepted CreateBucket Location differences); the sole failure was test_bucket_tags_opa_contract, which relies on a 5-second OpaMock timeout and SIGKILL offline disk mutation (seed_legacy_duplicate_bucket_tags) rather than ordinary S3 wire shapes. Keeping the remaining 314 E2E and 367 Ceph cases preserves comfortable margin above the 1000-entry corpus gate.
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.
Replace AKIAUNKNOWNEMPTY0001, AKIAUNKNOWNFORGED002, and AKIASTSUNKNOWN000001 in crates/e2e_test/src/sec_signature_matrix_test.rs with non-AWS-prefix 20-character dummy unknown access keys (TESTUNKNOWNEMPTY0001, TESTUNKNOWNFORGED002, TESTSTSUNKNOWN000001).
Preserves the exact unknown-key rejection test semantics while satisfying scripts/check_embedded_secrets.sh without weakening the guard.
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.
Include /crates/dialect-rustfs-admin/src/native/ in the sparse-checkout of rustfs/gateway in .github/actions/quick-checks/action.yml.
Commit 3f04fea9b mounted native control-plane admin routes, causing gen_rustfs_admin_route_inventory.py to inspect crates/dialect-rustfs-admin/src/native/ops.rs and native/ops/*.rs; the prior sparse-checkout only listed native/extensions.rs, causing blobless CI checkouts to fail with missing Cargo.lock objects.
Record the maintainer-signed accepted-change exemption from rustfs/backlog#2684#issuecomment-7163283798 (commit 8f81762a6) for external reference-binary comparisons only:
- Exempt only the exact (PutBucketPolicy, negative, error_code, InvalidArgument -> MalformedPolicy) tuple when SideA::Reference is active.
- Keep same-binary self-comparison and any mutated or multi-field difference fail-closed.
- Surface exempted entries in Report.accepted_differences and stdout while preserving reference-parity.yml JSON compatibility.
- Update .config/e2e-smoke-selection.txt and .config/e2e-full-selection.txt for the three new unit tests.
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.
Provide the pinned reference release and libfaketime clock to the e2e-full leg of dual-stack-nightly.yml, matching ci.yml:1094-1212.
Fixes the sole nightly failure (703/704 passed; persistence_parity::persistence_byte_parity failing with missing pinned RUSTFS_PERSISTENCE_REFERENCE_BINARY) while keeping the e2e-smoke leg free of persistence-only environment variables and failing closed if either e2e-full input is missing.
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.
Add diverse single-node plain-HTTP E2E and implemented Ceph tests to [nightly_extra] in .config/gateway-corpus-tests.toml while keeping [wire_replay] unchanged. Verified locally with --features corpus-record and gateway corpus ingest: 315 E2E + 367 Ceph tests captured 16,609 raw entries (0 secrets) and retained 1,076 unique entries (632 rustfs-e2e + 444 s3-tests, within the required 1000-2000 gate).
Bump rustfs/gateway pin from 6cb25e95ee33aefeacac057bebdc31344765238e
to 4a4360da67abb59868e57a8da5c0b64cf924ef0a (conformance external SigV2
clock fix, c-cred-0004 external skip, and difftest/fuzz tooling only;
zero runtime crate changes) and align docs/operations/s3-stack-rollback.md
to the current pinned conformance rulings URL.
Replace the OOM-prone Dockerfile.source release LTO build on 16 GB
ubuntu-latest (run 45570760149) with a build-candidate job on
sm-standard-4 matching ci.yml and reference-parity.yml (reading the
warmed ci-dev-ea7eec74fe14 cache via ./.github/actions/setup and
scripts/e2e_binary.py).
In the ubuntu-latest mint matrix, build a lightweight ubuntu:26.04
runtime image (glibc >= both sm-standard-4 Ubuntu 24.04 glibc 2.39 and
the pinned 1.0.5 reference binary's glibc 2.31), symmetrically bind-mount
either the verified reference or candidate binary read-only at
/usr/bin/rustfs, and enforce SHA-256 provenance on both legs.
Move test-only RequestEnvelope::from_s3s and its 5 legacy conversion tests into admin/router.rs, move the 8 pure RequestEnvelope::from_parts tests into app/context/envelope.rs, delete storage/legacy_s3_test_types.rs and storage/s3_compat/, remove the legacy s3 test re-exports, and tighten .config/s3s-footprint-baseline.txt to files=3.
Mount the 7 non-GET native control-plane operations ahead of the ControlPlane catch-all with pre-body IAM admission, bucket-scoped ConfigUpdate enforcement, notification target parameter validation, and site-replicator public-admin rejection, while keeping the 5 GET routes on ControlPlane so presigned Object Lambda URLs (#1577) continue to succeed without touching GatewayStack.
Add c-cred-0021 to .config/conformance-rulings.toml under rustfs/gateway#1120,
matching c-cred-0013, c-cred-0016, and c-cred-0026. Both official RustFS 1.0.5
and the native gateway candidate return the expected 403 refusal and close the
HTTP/1 connection afterwards, producing the exact single connection_after
diagnostic. Expires 2027-02-01.
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).
Replace the remaining #[cfg(test)] s3s oracles in rustfs/src/protocols/client.rs with pinned native expectations across copy-source validation, request envelope projection, retention millisecond truncation, PutObject input/output/error projections, and session bucket-listing credentials. Remove PutObjectWriteInput::from_legacy and its unused PutObjectInput re-exports, drop rustfs/src/protocols/client.rs from .config/s3s-edge-allowlist.txt, and tighten .config/s3s-footprint-baseline.txt to files=4.
Migrate the remaining storage_api::s3 test imports and compatibility shims in extract, get_response_test, head_response_test, internal_put, on_demand_migration_put, and shared directly to rustfs_gateway_types, rustfs_s3_types, rustfs_utils, rustfs_rio, and pinned expected wire values.
Call the six copy_method_only fixtures through CopyObjectWriteInput and
native S3Error codes. Storage class, REPLACE, source version, null
directory version, and the unreadable-encryption refusal stay asserted.
Delete the unused test helpers copy_method_only and
CopyObjectWriteInput::from_legacy.
Refs: rustfs/backlog#2750
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
Compare UploadPartCopy refusals with rustfs_s3_types::S3Error instead of
legacy_error_for_test. Error codes, the invalid part-number message, and
the admission, deleted-source, and range assertions stay the same.
Add crates/e2e_test/src/sec_signature_matrix_test.rs covering the 6x7 signature and admission matrix across SigV4 header, SigV4 presigned, SigV2 header, SigV2 presigned, PostObject policy, and anonymous requests plus HEAD empty-body parity and five historical GHSA/security regressions on both the released 1.0.5 reference binary and the gateway stack. Update .config/e2e-full-selection.txt for Darwin and Linux.
Construct RequestEnvelope fixtures from RequestHead, Extensions, and owned gateway DTOs in owned_authorization_test.rs, and prune the six newly-unused legacy S3 DTO re-exports.
Reuse authenticated pre-stream rejections on the active Control connection
generation before spending serialization and weighted admission work.
Keep signed unary fallback and the existing ambiguous-outcome handling.
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: qunjiazhu <qunjiazhu@gmail.com>
* fix(decommission): keep scanner progress on its owning set
* test(decommission): initialize a ledger-capable pool for retry
* test(e2e): register the gateway trailer test in smoke selection
---------
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
* 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>
Keep each bucket, key, storage class unknown-class, and object-lock
retain-until date. Metadata, tagging, SSE, and the other object-lock
fields stay absent. InvalidStorageClass, InvalidArgument, and
InternalError assertions stay.
* feat(iam): show OIDC profile name and avatar from UserInfo
Console sessions from providers that keep profile claims out of the ID
token (for example Authelia or Zitadel defaults) showed the internal
issuer-scoped identity hash instead of a username.
During the authorization code exchange, fetch the provider's UserInfo
endpoint when the ID token lacks username, email, name or picture. The
response is used only when its subject matches the ID token subject.
Failures are logged and the login continues with the ID token claims.
The resulting display profile is sanitized (bounded text without control
characters, https avatar URL without credentials) and stored in the
session as one nested object, which policy condition expansion ignores,
so authorization inputs are unchanged. Account info responses now also
return display_name and picture.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(gateway): align embedded ACL and copy precondition expectations
* test(gateway): align embedded ACL and copy precondition expectations
* fix(gateway): defer early authorization when OPA plugin is active
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: overtrue <anzhengchao@gmail.com>
* fix(admin): block service account owner-fallback authz bypass
Prevent service accounts from falling back to parent-user self-service ownership in DeleteServiceAccount, InfoServiceAccount, ListServiceAccount, and ListAccessKeysBulk, and enforce explicit Deny checks (deny_only) on owner fallbacks for regular users and non-service-account STS sessions. Keep service-account lookup errors behind authorization so unauthorized callers receive uniform AccessDenied responses.
Fixes#9514
* test(admin): initialize global action credentials in #9514 handler test
* fix(iam): classify service-account actions in self-service deny check
Include ListServiceAccountsAdminAction and RemoveServiceAccountAdminAction in self_service_deny_check so active regular users without attached policies retain owner self-service fallback and plugin-attempt STS sessions are terminally denied. Add IAM unit tests and update the #9514 handler test to share the canonical AppContext/IamSys instance with policyless owner and plugin-attempt STS coverage.
* fix(iam): bind owner-fallback service account delete to revision
Read service-account identity and ETag revision directly via Store::service_account_revision, and execute owner-fallback deletes conditionally via Store::delete_service_account_revision using If-Match against the authorized identity revision before touching any mapped policy. On mismatch or replacement across nodes, both the replacement service account and its mapped policy survive intact, no peer deletion notification is emitted, and the caller receives AccessDenied. Unrestricted admin RemoveServiceAccount deletes continue to remove corrupt on-disk records, covered by new ObjectStore/IamSys and admin handler regression tests.
* chore(ci): keep fork workflow tree for agent push limits
Restore pre-merge GitHub Actions paths on the contributor fork so the
Cloud Agent token can fast-forward the PR branch after merging main.
Co-authored-by: Chris An <overtrue@users.noreply.github.com>
* fix(admin): use storage_api::config module and sync workflows
Route save_admin_config and read_admin_config calls in the #9514 service_account handler test through crate::admin::storage_api::config to satisfy the admin storage_api domain-module boundary guard, and restore .github workflow files to match origin/main.
* test(gateway): align embedded ACL and copy precondition expectations
* test(gateway): align embedded ACL and copy precondition expectations
* fix(gateway): defer early authorization when OPA plugin is active
---------
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Chris An <overtrue@users.noreply.github.com>
Co-authored-by: overtrue <anzhengchao@gmail.com>
* fix(ecstore): avoid formatting disk state on multipart rename
* test(gateway): align embedded ACL and copy precondition expectations
* test(gateway): align embedded ACL and copy precondition expectations
* fix(gateway): defer early authorization when OPA plugin is active
---------
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: overtrue <anzhengchao@gmail.com>
Keep bucket test-bucket, key huge.bin, content length one byte over the
single-put ceiling, and a poll-counting body. Checksums, SSE, metadata,
and trailers stay absent. EntityTooLarge and the zero body-poll assertion stay.
Keep each target bucket, key object, and the absent metadata, tagging,
storage class, SSE, and object-lock fields. The query version stays absent.
NoSuchBucket, InternalError, upload-id, and audit assertions stay.
Keep bucket, key kms-encrypted, the created upload id, part number 1,
content length 3, and body abc. Request SSE, checksums, and trailers stay
absent. The ETag, version, listing, and HEAD SSE-KMS assertions stay.
The early gate imported storage directly, and the architecture migration rule rejected that path. Those symbols now come from the server access facade. Authorization decisions are unchanged.
Tracks rustfs/backlog#2761. The issue remains open.
* test(storage): move legacy s3s test re-exports out of app
The app and storage/s3_api acceptance directories no longer name s3s.
Existing tests still reach the same names through app::storage_api.
Backlog: rustfs/backlog#2749
* fix(storage): route legacy s3 test re-exports through storage_api
* test(auth): keep the legacy auth double out of the auth module
Move the test-only IAMAuth double into the server module that already
references s3s, and lower the files ceiling from 6 to 5. Production
request authentication is unchanged. The original ceiling was 65, so
the committed files baseline is now 60 below that start.
Backlog: rustfs/backlog#2788
* fix(auth): keep the auth module from importing the server
The legacy auth double stays in the server module. Its tests moved with
it, so auth no longer imports an interface type.
Backlog: rustfs/backlog#2788
Keep the real bucket, key, each upload id, part number, content length,
and body. Checksums, SSE, content MD5, and trailers stay absent. Error
codes, lookup counts, the success ETag, and stored parts stay unchanged.
Keep bucket `bucket` and each reserved key. Metadata, tagging, storage
class, SSE, and object-lock fields stay absent. Both InvalidArgument
assertions, including the complete path, are unchanged.
* 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>
Keep the bucket, key, upload id, part number 1, content length 3,
body abc, and the SSE-C customer algorithm, key, and key MD5.
Checksums and trailers stay absent. Both SSE response assertions
are unchanged.
Keep the real bucket, key, upload id, part number 1, content length
1024, and the pending body. Checksums, SSE, and trailers stay absent.
The SlowDown assertion and held permit are unchanged.
* fix(s3): report partial Veeam SOSAPI capacity
Keep live cluster capacity available while scanner usage is pending. Report quota headroom only when it can be determined for the current bucket.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* fix(s3): revalidate Veeam capacity freshness efficiently
Reuse the rendered capacity document when the figures match. Renew Last-Modified ahead of the Veeam freshness limit and use the final quota snapshot as the bucket incarnation fence.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* perf(ecstore): validate usage certification once per snapshot
Cache the certification decision with the immutable usage snapshot. Keep malformed inventories ineligible and use binary search and the current incarnation for each bucket projection.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* ci(e2e): record the native gateway smoke regression
Record the smoke membership added by 9b865db75. The failed Linux CI archive and a local archive select the same 258 tests. Removing only the new fake S3 target regression reproduces the previous digest.
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>
Keep bucket, key, upload id, part number, content length, and the
counting body. Checksums, SSE, and trailers stay absent. IncompleteBody,
EntityTooLarge, poll-count, and InvalidArgument assertions are unchanged.
Keep the DELETE / head, the force-delete header, and the slot and
ReqInfo extensions. Credentials, region, and service stay absent.
AccessDenied, InvalidRequest, and bucket assertions are unchanged.
The owner-state test keeps the req_info is_owner assertion. The envelope keeps method PUT, URI /, empty headers, and the ReqInfo extension. Credentials, region, and service stay absent. The unused S3Request fixtures are removed.
The denied-caller upload and both completions keep AccessDenied, authorizer-call, and retained-upload assertions. Each envelope keeps method PUT, URI /, empty headers, and the request extensions. The copy envelope is unchanged.
Stop routing the archive refusal fixture through S3Request. The envelope
is POST / with the snowball header and the post-object marker; credentials,
region, and service stay absent. Legacy provenance, NotImplemented, and
the unpolled-body assertions are unchanged. Drop the unused object
build_request helper.
Keep the decoded-content-length and optional aws-chunked headers, and the
UnexpectedContent, MissingContentLength, body-poll, and empty-parts assertions.
The authorized replica-only create keeps the upload id, staged part, completion, and persisted REPLICA assertions. The envelope carries method POST, URI /, the replication-status header, and the authorized ReqInfo.
execute_source_list now builds RequestEnvelope::from_parts with method
GET, URI /?list-type=2, empty headers, empty extensions, and no
credentials. The owned list path still returns the same S3 response.
Replace the archive refusal fixture's from_s3s call with
RequestEnvelope::from_parts, keeping method, URI, headers, and
extensions. Credentials, region, and service stay absent. The
legacy-provenance, NotImplemented, and unpolled-body assertions are
unchanged.
Replace the create-bucket reqinfo fixture's from_s3s call with
RequestEnvelope::from_parts, keeping method, URI, headers, and
extensions. Credentials, region, and service stay absent. The
owner-state assertion is unchanged.
Replace the listing session credential fixture's from_s3s call with
RequestEnvelope::from_parts, keeping method, URI, headers,
extensions, region, service, and credentials. The credential
projection assertions are unchanged.
Replace the copy request-head fixture's from_s3s call with
RequestEnvelope::from_parts, keeping method, URI, headers,
extensions, region, service, and credentials. The request-head
parity assertions are unchanged.
Replace the presigned checksum fixtures' from_s3s calls with
RequestEnvelope::from_parts, keeping method, URI, headers, and
extensions. Credentials stay absent. The checksum, ambiguous-value,
header, and verified-presign assertions are unchanged.
Replace the ListObjectsV2 seam's from_s3s call with
RequestEnvelope::from_parts, keeping method, URI, headers,
extensions, region, service, and credentials. The list output
mapping and migration header are unchanged.
Replace the ciphertext-replication and KMS create fixtures'
from_s3s calls with RequestEnvelope::from_parts, keeping method,
URI, headers, and extensions. Credentials stay absent. The refusal,
authorizer, and upload-id assertions are unchanged.
Replace the five test-only RequestEnvelope::from_s3s calls with
RequestEnvelope::from_parts, keeping method, URI, headers, and extensions.
Credentials, region, and service stay absent. Production S3Router::call
still uses from_s3s.
Replace the two RequestEnvelope::from_s3s calls in the stale-incarnation
fixture with RequestEnvelope::from_parts, keeping method GET, URI
/missing, empty headers, and empty extensions.
Replace build_request_with_req_info plus from_s3s in the CreateBucket
and DeleteBucket fixture with RequestEnvelope::from_parts, keeping
method PUT, URI /, empty headers, and the ReqInfo extension.
Replace build_request plus from_s3s in the create-multipart generation
fixture with RequestEnvelope::from_parts, keeping the method, URI, and
server-context extension.
Replace build_request plus from_s3s in the lifecycle, replication,
public-access-block, and shared config-delete fixtures with
RequestEnvelope::from_parts, keeping the method, URI, and extensions.
Replace build_request plus from_s3s in the logging, tagging, website,
object-lock, and notification fixtures with RequestEnvelope::from_parts,
keeping the method, URI, and extensions.
* fix(heal): create tmp source dir when healing transitioned objects
* Skip local shard cleanup when transitioned metadata has no data directory
---------
Co-authored-by: Chris An <anzhengchao@gmail.com>
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
* perf(ecstore): reduce allocations for bounded bitrot frames
* test(s3): cover dynamic block layouts over HTTP
* perf: measure quantized range read shape
* chore: checkpoint quantized read metrics draft
Save work in progress for collaboration. Counts omit retired readers and transient or cancelled hedges. Frame semantics, async recorder coverage and disabled-metrics overhead remain unresolved; these counters are not ready for performance conclusions.
Validation: rustfmt and ecstore check passed; io-metrics 120, quantized 4 and hashed-read 3 tests passed. No new live or performance validation.
* perf(ecstore): reduce dynamic layout read overhead
* fix(ecstore): avoid prefetching conservative short range tails
* perf(ecstore): compact deferred shard reader state
* perf(ecstore): include shard checksums in file buffer cap
* fix(ecstore): preserve bounded quantum frames during heal
* perf(ecstore): reuse owned quantized frame batches
* perf(ecstore): batch q reads and retain shared copy framing
* fix(ecstore): preserve typed quantized read errors
* perf(ecstore): avoid zero-fill and serial copies in local batch reads
The local batch reader zero-initialized every window at a nonzero offset
before reading it, and copied every shard serially inside one blocking
task. Two-segment q-window range reads (cross-shard, cross-block) pay
both costs twice per request.
Read each window with a positioned read into uninitialized Vec capacity,
and dispatch each shard separately when every window is at least 512 KiB,
where copies dominate blocking-pool round trips. Smaller windows keep one
coalesced dispatch.
* perf(ecstore): keep readahead pipelined for local batch windows
A single window-sized pread on cold pages waits on each kernel readahead
chunk in turn. Seek to the window start and fill the buffer with
read_to_end over a length-limited reader instead: it still reads into
uninitialized spare capacity, but its growing sequential reads keep
readahead pipelined. Warm windows cost the same.
* Revert "perf(ecstore): keep readahead pipelined for local batch windows"
This reverts commit c252fca525.
On the ESSD-backed cloud footprint, the growing read_to_end reads were
slower than one window-sized positioned read for cold windows at nonzero
offsets (cross-block -27% on 4 MiB layouts, cross-shard -21% on 64 KiB
layouts versus the previous batch reader). The local benchmark that
motivated the change ran on a WSL virtual disk and did not represent the
target storage. Keep the single positioned read into spare capacity and
the per-shard dispatch for large windows.
* perf(ecstore): choose the batch read method by window size
Measured on ESSD-backed cloud storage, a cold window of about 1 MiB is
fastest as one positioned read, which completes as a single device
request, while windows of 2 MiB and more are faster with growing
sequential reads that keep readahead pipelined (one large read waits on
each readahead chunk in turn). Use one positioned read up to 1.5 MiB and
a seek plus length-limited read_to_end above it. Both paths read into
uninitialized spare capacity; per-shard dispatch for large windows is
unchanged.
* perf(ecstore): read local batch windows with an exact readahead hint
Kernel readahead sizes its first request from the read size. A cold
16 KiB window at offset 0 pulled 64-128 KiB, and a single 2 MiB read was
split into serial readahead chunks that cached almost twice the window,
which is why neither the single positioned read nor growing sequential
reads won for every window size on block storage.
Announce each window with POSIX_FADV_WILLNEED, which submits exactly the
window at once, and then fill the exact spare capacity with positioned
reads. This replaces the size-based choice between the two read methods.
The hint is advisory and its failure does not fail the read. A residency
test checks that cold reads cache only their window; it failed with the
hint disabled (a 5-page window cached 32 pages).
* perf(ecstore): use half-shard read quantum at 1 MiB EC layout
* revert(release): defer certification rollout for 1.0.5 (#9254)
Revert e5563e6004 only on release/1.0.5. Its trusted verifier workflow and immutable-candidate integration are not available yet. Restore the previous publication path under the approved release policy; retain the completed product regression and preview acceptance requirements.
* fix(ecstore): preserve legacy full-shard framing for default 1 MiB layout
* perf(ecstore): enable direct-memory GET and coalesce cross-shard range reads for bounded-quantum blocks
* chore(ecstore): remove unused schedule_bitrot_reader_task wrapper
* fix(ecstore): run delete-recovery discovery off the metadata lane
Bucket-wide delete-recovery discovery starts with the server and walks the
whole bucket tree in pages of up to 4096 entries, one lstat per entry. Each
page ran on the per-disk namespace queue's foreground lane, which has a
single worker and also serves GET metadata reads. On a cold tree a page
holds that worker for hundreds of milliseconds, so every GET on the disk
waits behind it until the walk finishes.
Run the page on the queue's sync lane instead, as the delete-transaction
inspection already does for the same reason. The namespace lease and the
page bounds are unchanged.
The regression test occupies the foreground lane and requires a discovery
page to complete within ten seconds; it times out without this change.
* test(ecstore): align read_appending rollback assertions on error
* test(ecstore): satisfy needless_range_loop in deferred shard open test
Rust 1.100 clippy rejects indexing setup.attempted with the loop variable.
Iterate the same two entries instead; the assertions are unchanged.
* fix(ecstore): keep the EC block size projection out of user_defined
ObjectInfo::from_file_info_parts projected the persisted erasure block size
into user_defined as x-rustfs-internal-ec-block-size and
x-minio-internal-ec-block-size for every local version, including objects
written with the default layout. Writers that turn user_defined back into
stored metadata then persisted both keys: a metadata-replacing copy_object
(set_disk/ops/object.rs replacement_metadata) and put_object_metadata, used
by the replication status write-back. The same-version restore metadata
update also stopped matching its protected-metadata check, which made
restore_metadata_copy_preserves_tags_expiry_and_version_order fail.
The projection now lives in ObjectInfo::ec_block_size, read through
effective_ec_block_size(), so response headers are unchanged and stored
metadata keys stay what main writes. The put_object and new_multipart_upload
strips stay: internal PUT origins can still supply internal keys verbatim.
Changed assertions:
- from_file_info_projects_persisted_ec_block_size_for_responses and
from_owned_file_info_preserves_restored_ec_block_size_projection asserted
the key inside user_defined; they now assert the accessor and that neither
spelling is in user_defined.
Tests added:
- default_layout_metadata_copy_persists_no_ec_block_size_projection
- default_layout_replication_status_writeback_persists_no_ec_block_size_projection
* fix(ecstore): split bounded frames on the coalesced shard write path
The encoder writes shards through BitrotWriterWrapper::write_shard_bytes
since #9346. That path wrote a shard as one bitrot frame, so a bounded read
quantum (frame smaller than the shard) failed with "data size exceeds shard
size" on every non-inline write. The defect exists only on the tree that
merges this branch with main, and only with RUSTFS_EC_READ_QUANTUM_ENABLE on;
the default layout never selects a bounded frame.
Shards larger than the frame now go through the same frame splitting as
write(). Protected writes never select a bounded quantum; a shard-integrity
spec together with bounded frames is refused instead of dropping the digest.
Red before, green after: bounded_quantum_heal_restores_exact_frames_and_range_bytes,
bounded_quantum_shards_pass_disk_verification_and_deep_heal,
version_only_copy_preserves_quantized_shared_data.
* test(ecstore): pin the exact key set of a replication status write-back
The default-layout write-back test now asserts the precise keys main adds
(the status keys, X-Amz-Replication-Status and the data-moved markers)
instead of a subset check.
* Drop legacy EC block-size projections when reading metadata
---------
Co-authored-by: Xiaoyang Han <lux1an@qq.com>
Co-authored-by: marshawcoco <marshawcoco@gmail.com>
* fix(scanner): finish wide directory scans across cycle deadlines
* fix(scanner): resume durable per-disk progress across handoffs
* fix(scanner): bound checkpoint storage and resume verified page reads
* fix(scanner): keep recoverable pages across long cycle intervals
* test(scanner): share primary page fault injection
* fix(scanner): preserve progress across owner cancellation
Port the scanner fix from #9546.
* fix(scanner): recover abandoned checkpoint page bundles
Record staging before writing pages and persist cleanup with a replacement checkpoint. Restore checkpoints with background disk admission and update the affected tests to pass cancellation tokens.
* test(scanner): adapt cache and lifecycle cases to current scanner inputs
---------
Co-authored-by: overtrue <anzhengchao@gmail.com>
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
* fix(ecstore): preserve DualInFlight stripe order in ErasureDecodeReader
In ErasureDecodeReader, poll_fill_result() previously extended
self.prefetched_bufs with lookahead stripes (queued_buffers, stripe
2k+1) before returning the primary stripe (buf, stripe 2k) to
poll_prefetch(). When a DualInFlight fill completed while output_buf
still had unconsumed bytes, poll_prefetch() pushed stripe 2k onto the
back of self.prefetched_bufs after stripe 2k+1, swapping adjacent
(2k, 2k+1) stripes on multi-block GetObject reads.
Return (buf, queued_buffers) from poll_fill_result() without mutating
self.prefetched_bufs, and extend self.prefetched_bufs with
queued_buffers in poll_prefetch() only after buf has been installed in
output_buf or pushed to self.prefetched_bufs. Also account for
non-empty self.prefetched_bufs when checking output_has_remaining and
deferring prefetch errors, and add a unit regression test.
* refactor(ecstore): factor FillBatch type alias in ErasureDecodeReader
Extract `type FillBatch = (Vec<u8>, VecDeque<Vec<u8>>)` for the
`poll_fill_result` return type to satisfy `clippy::type-complexity`.
---------
Co-authored-by: Jinhao Hu <jinhaohu@google.com>
Co-authored-by: Chris An <anzhengchao@gmail.com>
Eliminate the 1 MiB -> 2 MiB encode_buffer reallocation in small_ingest_capacity, make HardLimitReader::poll_read zero-copy via ReadBuf::take, remove redundant BufReader wrappers around StreamReader, borrow InlineData during DELETE Stage 1, and hand off local published delete receipts directly from Stage 2 to Stage 3.
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: overtrue <anzhengchao@gmail.com>
* feat(scanner): expose scan work and reuse observations
* fix(scanner): preserve baselines during backup catchup
Require decoded-primary provenance before accepting an unchanged baseline after its backup catches up. Keep current-revision CAS and publication fences, and align the real checkpoint fixture with the bounded-cycle carry contract.
* fix(scanner): cap superseded retries at the nominal cycle
* fix(usage): validate cached statistics against bucket identity
* feat(scanner): observe bucket reuse and production proof gates
* fix(ci): give the multipart refusal fixture its storage stack
* test(admin): bind snapshot fixtures to current bucket identities
* fix(scanner): require a measured baseline for admin usage overlays
* fix(scanner): reject unmeasured admin usage snapshots
Validate the persisted scanner baseline before identity filtering can mark
it as displayable. Cover two buckets with only one current identity and
adapt the backup catchup cache save calls to the merged API.
---------
Co-authored-by: Chris An <anzhengchao@gmail.com>
Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* fix(scanner): recover interrupted local drive scans
* fix(scanner): bound initial local drive binding
---------
Co-authored-by: Chris An <anzhengchao@gmail.com>
* 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>
* fix(heal): admit replacement data directories on configured mounts
Verify the mount ID of the pinned data directory against the expected mount root and retain the existing physical-device checks. Reject the newly exposed directory when the intended mount is missing.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* refactor(heal): probe replacement mounts as one pinned batch
Resolve each target once and check mount identity on the same handles before and after taking execution leases. Verify mount boundaries with bounded kernel lookups and resolve each local device once per batch.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(heal): reuse the privileged replacement mount fixture
Exercise configured subdirectories and unmount rejection in the existing independent-mount case. Reuse the mount namespace and keep the existing ignored-test ceiling.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ci): remove stale form helper and unused hotpath dependencies
Remove the test helper left by the gateway merge. Keep profiling feature forwarding in protos and activate rio instrumentation only for profiling builds.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(ecstore): reuse the pinned replacement mount identity
Capture device, inode, and mount ID when opening the pinned root. Reuse that identity for live endpoint checks and avoid a duplicate lookup when the endpoint is the expected mount root.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(heal): bind replacement intent to the execution lease
Persist the identity of the admitted mounts and keep the live fence immediately before formatting. Compare ordered identity snapshots without allocating on the scan path.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): report missing native pool recovery evidence
Distinguish failed proof stages without changing repair admission. Exercise four-node subdirectory replacement below write quorum and after a third survivor returns.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(ecstore): inspect native pool recovery evidence in one pass
Preflight pool slots before disk I/O and use the authenticated Inspect RPC as the capability check. Stop on the first ordered read failure before planning or applying a repair.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: overtrue <anzhengchao@gmail.com>
* fix(s3): reject DELETE requests on ACL subresources
* fix(s3): keep ACL admission within the s3s footprint budget
---------
Co-authored-by: Chris An <anzhengchao@gmail.com>
* refactor(rdma): bind the NVIDIA cuObject server SDK in RustFS
* fix(rdma): preserve channel capacity and reuse contiguous registrations
* perf(rdma): transfer ownership of cuObject upload buffers
* fix(rdma): validate cuObject routing fields before transfer
* refactor(rdma): isolate the cuObject server SDK in a sys crate
* docs(rdma): document the workspace cuObject server bindings
* perf(cuobject): reuse channels and completion registrations
* fix(rdma): release eager PUT staging before requesting more chunks
* fix(rdma): consume CQ readiness and copy only retained PUT frames
* fix(rdma): release consumed streaming PUT frames before the next read
---------
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: overtrue <anzhengchao@gmail.com>
* fix(notify): quarantine unreachable targets instead of failing the runtime
A target that cannot activate is a per-target health outcome, not a
lifecycle transition failure. Turning it into a transition error left
the generation permanently unconverged, so every notification admin call
re-entered the failing reconcile and answered 500, and the broken target
could not be removed because only the /reset DELETE route existed.
Publish the generation with the failed target quarantined, gate admin
access on the shared runtime_lifecycle_is_published() predicate, and
register the bare DELETE /v3/target/{target_type}/{target_name} route.
The one-shot initialize() API keeps its strict retry contract.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* perf(notify): publish quarantined generations instead of rebuilding forever
is_converged() answered "did every target activate?" but was used as
"does the runtime need rebuilding?". One unreachable target therefore
left the generation permanently unpublished, and the 5s reconciler tore
the whole runtime down and rebuilt it on every tick: 9 full rebuilds
(measured: create + init probe + queue reopen + replay restart + close)
in 30s, which is where the delayed first events after a restart come from.
mark_published now always advances the applied generation and records
per-target completeness separately, so is_converged() means "published".
The reconciler's rebuild trigger and the admin availability gate are
correct with no call-site changes, and runtime_lifecycle_is_published()
is gone again. the one-shot initialize() API keeps its strict contract
through the new all_targets_activated() signal.
prepare_target no longer drops store-less targets whose init failed:
they stay quarantined like store-backed ones, so recovery never needs a
runtime rebuild and PrepareTargetResult::Failed disappears.
Measured on the issue #9545 scenario: 0 rebuilds in the 30s window that
previously saw 9, with the admin surface unchanged.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* style(notify): match the lifecycle module's log field shape
The quarantined-target warning carried its own message where every
sibling entry in this module labels itself "notify runtime lifecycle"
and lets the state field distinguish the outcome. Conforming keeps the
event stream uniform and drops the second copy of the sentence.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* perf(notify): share the dispatch entity and stop dropping rules on read errors
Three findings from a full pass over crates/notify.
The dispatch loop built one EntityTarget per matched target and deep-cloned
the whole Event into each one, plus two Strings. Every field is event-level
and every Target::save reads it without mutation, so build it once and share
it across the matched targets: one Event clone per event instead of one per
target.
get_bucket_rules turned any metadata read error into "no rules", and
rules_for_metadata then evicted the cache, so one transient store error
silently discarded every notification for that bucket. A failed read is not
authority to drop compiled rules; serve the last metadata-backed snapshot
and log it. Entries installed by set_bucket_rules carry no metadata snapshot
and stay unusable once a source is bound, which is the invariant the
store-loss test already pinned.
Cached rules are now shared by Arc instead of cloned per event.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(notify): stop cloning the event and target id on every dispatch
Two remaining per-target costs on the dispatch hot path, both paid on every
event for every matched target.
`Target::name()` is `self.id().to_string()`, which clones the two Strings in
`TargetID` and then formats a third. It was resolved unconditionally and used
only by `debug!` fields, and `target_for_task.id()` was called again at each
log site. Resolve the identifier once per target and hand that value to the
task.
`build_queued_payload` cloned the whole event into `vec![event.data.clone()]`
just so it could be serialized. `PluginEvent: Serialize`, so the record can
borrow: combined with the shared `EntityTarget`, a dispatch to N targets now
deep-clones the event once instead of N+1 times.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(admin): make the operation types as public as the router
`pub mod admin` exports `pub struct S3Router`, but the impl blocks are
bounded by `Operation`, which was `pub(crate)`. That trips
`-D private-bounds` on `--all-targets` and fails the workspace clippy
gate. `AdminRequest` and `AdminResponse` sit in the same position and are
widened alongside it, so the handler trait is nameable at the visibility
its only implementors already live at.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* chore(deps): make hotpath optional where no code uses it
Sixteen crates pulled `hotpath` in unconditionally while their sources
never reference it: it is only there to forward `hotpath`/`hotpath-*`
features. The unconditional edge is what the cargo unused-dependencies
lint reports. Marking the dependency optional keeps the feature
forwarding working and drops the profiling crate from builds that never
enable it.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(notify): share rule target ids and drop the over-broad read fallback
Matching an object key cloned every matched `TargetID` out of the rule
sets, and each of those owns two Strings. The sets now store
`Arc<TargetID>`, so a match collects reference-count bumps instead; the
insertion wraps once. `TargetID: Hash + Eq` and `Arc<T>: Borrow<T>` keep
the lookups unchanged.
This also reverts the earlier "keep the last rules when the metadata read
fails" fallback. `rules_from_metadata` already states the policy:
unreadable metadata is not authority to keep an old subscription, and
`notification_dispatch_follows_peer_reload_delete_and_recreation` pins it
- after `delete_bucket` the lookup fails and the compiled rules must go.
The only errors `get_bucket_metadata` produces are that absence and an
uninitialized metadata system, so the fallback bought nothing and cost
correctness. `rules_for_metadata` is back to the Option form, and
`cached_rules` no longer needs a provenance switch.
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: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: overtrue <anzhengchao@gmail.com>
* fix(iam): verify the parent password for Console STS rotations
* fix(iam): revalidate STS sessions during password rotation
* fix(admin): scope test router operation bound to the helper
---------
Co-authored-by: Chris An <anzhengchao@gmail.com>
* 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>
* 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>
Reserve the exact canonical request size before encoding batch rename fields. This removes geometric Vec growth on both client digest attachment and server verification without changing canonical bytes.
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
* fix(rio-v2): resume DARE package reads after a mid-ciphertext Pending
DecryptReader reset `ciphertext_read` to zero every time it entered the
ciphertext loop. When the inner reader returned `Pending` partway through
a package, the next poll skipped the already-buffered header and refilled
the ciphertext buffer from its start, overwriting the bytes read before
the `Pending` and shifting the rest of the stream. A single-package object
then ended in "unexpected EOF while reading DARE ciphertext" and a
multi-package object in "DARE authentication failed".
The legacy GET path feeds the decrypt reader from a bounded duplex pipe,
so every rio-v2 encrypted object with a package straddling a point where
the reader outruns the producer failed to read back: stored sizes of
64 KiB + 1 to 128 KiB (64 KiB pipe, smaller than one package), 512 KiB + 1
to 1 MiB (512 KiB pipe), and larger objects whenever the next erasure
block arrived late. Stored data was never affected, so objects written
before this change read back correctly.
Keep the counter across polls: it starts at zero and is cleared only once
a package has been opened. The regression tests cover the reader behind a
pipe that reports `Pending` at each refill, and the GET reader stack
behind the pipe size production picks for inline-range, multi-megabyte,
and multipart objects.
* fix(rio-v2): fail multipart DARE reads that end before a listed part
A multipart DARE stream is the concatenation of each part's package
sequence. When the stream ended exactly on a part boundary, right after a
final-flagged package, DecryptReader had read no package of the next part
and took the clean EOF for an empty object, so a stream missing whole
trailing parts read back as complete. A full-object read was still caught
by the outer length limit, but a ranged read returned a short body without
an error.
The reader could not tell a missing part from an empty one, because an
empty part stores no package. The caller now supplies that distinction:
the multipart constructors document that only parts with stored bytes are
listed, a clean EOF before a listed part's first package is an
`UnexpectedEof`, and the ecstore read path drops zero-size parts from the
list it hands to the rio-v2 reader. An object whose last part is empty
keeps reading back, which the new ecstore test pins down.
NumericGreaterThanIfExists was evaluated with i64::ge, so a request whose
condition value equals the policy threshold matched. Every other operator
keeps its comparison and only treats key absence as a match, and its
*IfExists variants are built from the generic wrapper; this one special case
silently widened a strict numeric bound into an inclusive one.
Evaluate it with i64::gt to preserve the operator's comparison while keeping
the absent-key behavior.
* fix(sse): drop the SSE-S3 header from SSE-C multipart responses
CreateMultipartUpload, UploadPart, UploadPartCopy and
CompleteMultipartUpload on an SSE-C upload answered with
`x-amz-server-side-encryption: AES256` next to the customer-key
headers. That header names a managed algorithm, so the response
described an SSE-S3 object.
SSE-C metadata and encryption material record `AES256` as their
server-side-encryption value. PutObject, GetObject and HeadObject
already leave it out of an SSE-C response; the four multipart
projections forwarded it unchanged. They now return only the
customer-algorithm and customer-key-MD5 headers for SSE-C. SSE-S3 and
SSE-KMS multipart responses are unchanged.
* fix(sse): drop the SSE-S3 header from SSE-C CopyObject responses
CopyObject to an SSE-C destination answered with
`x-amz-server-side-encryption: AES256` next to the customer-key
headers, for the same reason the multipart responses did: the SSE-C
material records `AES256` as its server-side-encryption value and the
response forwarded it. It now returns only the customer-algorithm and
customer-key-MD5 headers, as PutObject does. Copies to SSE-S3 and
SSE-KMS destinations are unchanged.
* fix(admin): report inventory coverage and cluster scanner activity
Join the current bucket namespace with measured usage for matching bucket identities. Report the elected scanner coordinator and previous attempt to clients connected to any node, with explicit coverage when measurements are unavailable.
* fix(admin): verify scanner attempts and preserve inventory lookup budgets
Start identity validation after snapshot refresh. Record terminal scanner outcomes at the bounded wait boundary and trust the durable fence for successful completion. Assert that the real leader and followers agree on an active cycle and its completion.
* test(e2e): register the cluster scanner regression in distributed selection
The controlled follower test adds one unconditional case to the 4-node profile. Pin the resulting 111 test IDs so the distributed workflow reaches the test runner on both supported platforms.
---------
Co-authored-by: Chris An <anzhengchao@gmail.com>
* fix(s3): build native RDMA upload bodies for PUT requests
* fix(nixl): reclaim idle peer registrations after native completion
* fix(nixl): start peer idle expiry after the last transfer finishes
* fix(nixl): retain transfer permits and preserve cached peers on failure
* fix(server): emit absolute encoded POST Object Location
Browser POST uploads with success_action_status=201 currently return a
relative, unencoded Location such as /bucket/a+b c%d.txt. Clients that
decode the field the way AWS formats it treat + as a space.
Rebuild PostResponse Location as an absolute URI from the request host,
scheme, and addressing style, percent-encoding the object key with RFC
3986 path rules (space as %20, slash preserved as a separator).
Fixes#9259
* test: use typo-safe UTF-8 fixtures for POST Object Location
crate-ci typo tokenizes the caf prefix in caf%C3%A9 as a misspelling of
calf. Keep a UTF-8 percent-encoding case, but avoid that false positive.
* fix(s3): preserve entity-like text in POST Object keys
* Initial plan
* fix(scanner): scan online single drives marked as healing
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* fix(scanner): route healing marker through storage boundary
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* perf(scanner): skip unused heal disk inventory
Avoid building and cloning the cross-drive inventory for single-drive scans and scans with healing suppressed. Exercise durable usage publication and cursor advancement through the runtime cycle.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(scanner): use scan domain for test marker import
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* refactor(scanner): scope heal inventory to coordinator workers
Build the inventory only for coordinator-owned cross-drive healing and expose the regression marker directly through the scan storage domain.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ci): restore admin gateway runtime checks
Stream diagnostic uploads through the existing admission gate and retain rebalance metadata error diagnostics. Align the authorization regressions with the current implementation and remove the unused POST form test helper.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): harden remote rename handling
Start a fresh bounded quarantine when a dispatched rename becomes ambiguous so detached disk work cannot be immediately replaced after the RPC deadline. Pre-size inline FileInfo MessagePack buffers from their resident payload to avoid proven growth without changing wire bytes or durability semantics.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): expose rename quarantine fault metrics
Keep admission timeouts and quarantine lifecycle visible when detailed PUT diagnostics are disabled. Tie released accounting to permit ownership so runtime cancellation cannot leave the active gauge stale.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
* chore(shear): stop ignoring hotpath and clear shear findings
Remove hotpath from cargo-shear ignored so feature-only usage is reported,
drop unused deps found by shear --fix, delete empty access_owned stubs, and
suppress false-positive unlinked paths for #[path] test modules.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* chore(deps): refresh workspace deps and bump faster-hex to 2.0
Run cargo update and cargo upgrade for compatible requirements, including
faster-hex 1.0.0 to 2.0.0. Existing hex_string/hex_decode call sites remain
compatible.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(zstd): import seekable directly for security tests
Use zstd_safe::seekable in the security test and document why the
seekable dev-dependency stays: it enables the feature and must remain
visible to cargo-shear as a real usage.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(admin): avoid private-bounds on S3Router test helper
Move call_legacy to a free function so the pub(crate) OwnedOperation
bound is not attached to a public inherent impl.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* chore(deps): drop unused hotpath and demote rio md-5 to dev-deps
Remove hotpath from crates that only feature-forward it with no source
usage, keep rustfs-* hotpath feature links, make rio's hotpath optional
for its cfg-gated measure_block!, and move rio md-5 to dev-dependencies.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* chore(deps): refresh lockfile and bump arrow/jiff requirements
Run cargo update, cargo upgrade, and cargo upgrade --incompatible.
Bump arrow/parquet to 60.2.0 and jiff to 1.0.2.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(scanner): run service_cohort tests on a larger stack
Linux libtest defaults to a 2 MiB test-thread stack; two-pool EC fixtures
overflow it and abort. Run each service_cohort case on a dedicated 32 MiB
thread, matching scoped_entry_fallback.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* chore(deps): upgrade russh-sftp to 4.0 and refresh lockfile
Run cargo update, cargo upgrade, and cargo upgrade --incompatible.
Bump russh-sftp 3 to 4 (opaque SftpHandle wire type), plus lapin,
hashbrown, and russh. Adapt the SFTP Handler and tests to SftpHandle.
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: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: RustFS <hello@rustfs.com>
The object-lock replication test builds its method-only envelope with from_parts.
The existing ignore attribute and the replication-count assertions stay.
* fix(scanner): retain unpublished bucket progress across leader changes
* test(scanner): verify remote completion reuse and publication floors
* fix(scanner): persist read-only checkpoint continuity
* test(scanner): avoid cloning the final activity fixture
* fix(scanner): resolve receipt owner before store startup
* fix(scanner): gate read-only handoff behind reader-first rollout
* test(scanner): accept consumed markers after heal startup
* test(scanner): run handoff rollback in the pinned release lane
* fix(scanner): preserve background admission during cache saves
* fix(scanner): admit remote cache publications as background I/O
* fix: handle disabled cgroup controllers in resource sampling
* fix(scanner): wait for namespace RPC preflight admission
* fix(scanner): align metric loops with current clippy
* fix: resolve Rust 1.100 workspace lint diagnostics
* fix(heal): simplify Linux test opt-in check
* chore(scanner): expose admission and allocator diagnostics
* fix(scanner): retry transient resource samples within one bracket
* fix(protos): retain cancelled RPC streams during response grace
* feat(diagnostics): track live Rust allocation bytes
* docs(diagnostics): explain unsafe allocator test scope
* fix(ecstore): reduce multipart recovery stack usage
* chore: refresh PR verification
* fix(protos): retain reset streams for the full cancelled burst
The branch's channel reset tests cancel 80 batches of 64 streams; main's 4096 cap spends the protocol-error budget on that burst, so keep the 8192 capacity under main's constant.
* fix(scanner): complete budget-stopped cycles with carried buckets pending
Align with main's partial-carry semantics: a work budget that stops a bucket whose certified value is carried completes the cycle with that bucket pending and the snapshot unconverged, instead of forcing the cycle incomplete.
The error-code tests build the envelope and the lifecycle restore
request directly. The legacy test wrapper stays for the transition
fixtures that still call it.
The engine projection tests build the gateway request directly.
The test-only s3s conversion is gone, and the member assertions stay
on the projection the use case calls.
The handler tests no longer construct an s3s request and convert it.
Region copying from a legacy request stays covered by
from_s3s_copies_every_named_extension. S3Request is gone from
rustfs/src/admin/handlers, and the s3s file count drops from 33 to 32.
* 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
* test(storage): pin legacy codec answers and trim test dependencies
* refactor(admin): confine the legacy route adapter to parity tests
* fix(deps): align bindgen and prettyplease on syn 3 for FIPS builds
* refactor(admin): keep Object Lambda authorization and responses on the owned request path
* fix(storage): expose the typed legacy cause on owned errors
* refactor(admin): read and return native GetObject fields for Object Lambda
* ci: ratchet the legacy S3 footprint after the control-plane migration
* refactor(admin): remove the unused envelope-to-extensions adapter
* test(admin): guard the Object Lambda response token checks at their definition
* refactor(admin): serialize AssumeRole credentials without the legacy DTO
* test(admin): assert native range and error types at the test boundary
* test(admin): compare errors in the legacy route parity tests
* refactor(notify): initialize event rules from persisted notification types
* refactor(admin): return the idle rebalance response on the owned HTTP path
* refactor(storage): keep the persisted-to-legacy XML oracle in tests
* test(admin): compare extension refusals using the native error code
* fix(obs): filter verbose native gateway protocol events at every sink
* 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>
* 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>
* 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>
* fix(deps): align bindgen and prettyplease on syn 3 for FIPS builds
---------
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
* perf(ecstore): trim redundant syscalls in multipart part preparation
Use io_get_object_open_path in the advisory clean-source cache probe, reuse validated part-path prefixes when constructing MultipartSourceAdmission in prepare_part_transaction, and create new.meta before snapshotting absent old-part markers so old.data.absent and old.meta.absent share new.meta's inode via linkat.
* test(ecstore): guard marker inode identity check on hardlink support
Probe hardlink support in the test fixture before asserting that old.data.absent and old.meta.absent share new.meta's inode, and assert empty fallback markers when hardlinking is unsupported.
* chore(storage): remove unused test helper PostObjectFormPolicy::with_metadata
Commit 5e5554987 removed the last caller in rustfs/src/storage/access.rs, leaving with_metadata unused under #[cfg(test)].
* fix(rustfs): align control-plane speedtest, rebalance logging, and admin/auth tests
Register streaming PostV3SpeedtestClientDevnull on the gateway control-plane host, log error diagnostics on corrupt rebalance metadata loads, avoid 43-char OIDC parent key collisions in s3_extension_tests, align AddUser gate test with 88b90c131, and split auth.rs at mod tests.
* chore(deps): bump rustfs-gateway to d32f1721 for Windows file-fallback cfg
Pulls in rustfs/gateway#1622 (d32f17219d75989167a05183dd3d04922615cbd5) which gates Unix-only file-region adaptation in rustfs-gateway so Windows Startup Smoke compiles cleanly.
---------
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
The tests module of storage/access.rs, its mounted reader and probe
tests, and the signed-query regression module are gone; their ported
copies run on the owned core. The five registered tests are deleted with
their register entries. access.rs keeps the hooks, the parity support
other modules still use, and four pins on legacy-only helpers that no
gateway-side test pins yet.
Each authorization test of storage/access.rs and its mounted files now
runs on the owned RequestEnvelope through the owned function its legacy
hook delegated to, with the same inputs and expected decisions. A shared
owned fixture replaces build_request and TestKms. The four access_owned
test files move under access_owned/tests and no longer build an s3s
request. Five tests that pin only legacy DTO helpers are registered for
retirement with their gateway-side replacements.
files 50 -> 49 and s3_error_lines 103 -> 95, as scripts/check_s3s_footprint.sh
measures them after the upload drain tests stopped implementing an s3s
S3 service.
* fix(http): send deferred HTTP/2 100 Continue
Backport upstream Expect handling onto Hyper 1.12.0 and cover the transport handshake and rejection boundaries.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(http): use uppercase Expect token in fixture
Preserve case-insensitive Expect coverage without triggering the spelling guard.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(http): compact deferred Continue body state
Preserve the existing body size bound and H2 frame path while removing redundant state from the temporary Expect allocation. Cover spawned readers, size hints, trailers, and EOF.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* refactor(http): align Continue backport with upstream
Remove the local body-layout micro-optimization so the runtime patch exactly matches upstream Hyper PR #4217 while retaining RustFS regression coverage.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(storage): keep authorization tag lookup in infra
Move the store-backed ExistingObjectTag lookup behind the authorization core and keep legacy error conversion at the FS interface boundary.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(tests): align CI fixtures with current contracts
Distinguish AddUser primary and secondary admin gates, parse SigV4 civil time in UTC, and provide the required Object Lock snapshot for restore metadata copies.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* fix(ecstore): do not republish pool.bin for an unreachable drive
The pool.bin heal treated every drive whose state was not "ok" as a drive
to repair, offline and faulty drives included. A write cannot reach those
drives: while one was unreachable, each read repair republished pool.bin
to the reachable drives only, failed with SystemMetadataRepairRequired and
was retried, writing a new version every time. The drive came back one
version behind, while every node reported it ready.
In a set of three drives at EC:1, losing another drive in that window
left one current and one stale replica: pool.bin had no read quorum, the
node with the replaced drive could not start, and neither could any other
node that restarted.
Repair pool.bin only for a reachable drive that lacks the current copy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(ecstore): require replica damage before pool metadata heal
A timed-out or otherwise inconclusive metadata probe can leave a valid
pool.bin replica behind. Require confirmed missing, stale, or corrupt
metadata before publishing a new generation through the existing fence.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* style(admin): remove trailing whitespace in identity test
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(rustfs): restore gateway builds and clear CI lints
Backport 142cff57a and 2e286d322 from main. Reuse the admitted
request headers for POST archive controls and return the existing
S3 error type directly at both call sites.
Remove the unused form metadata projection left by the same merge
and keep the gateway policy test on the production field path.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Signed-off-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Chris An <anzhengchao@gmail.com>
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Regular parents now fence STS sessions by durable generation, so a session
stored without one is rejected as an unknown key. Publish the test sessions
with set_temp_user_from_parent, as the STS handler does.
The three UploadPart timeout tests drove the early-response drain around
a hand-written s3s S3 service. They now drive it around the gateway
stack as production configures it (GatewayStack::assemble_serving, a
test-only constructor over the same configured builder), serving an
UploadPart handler that reads its whole body as RustFS's handler does.
Every assertion is kept: 400 RequestTimeout, the HTTP/1 transport
retained for the drain and drained of the late bytes, the HTTP/2 body
dropped alone, and other HTTP/2 and HTTP/3 streams still served.
The gateway times a stalled body out with its own request-body idle
bound, so that bound is what the fixture sets; it does not follow a
paused tokio clock, so the HTTP/1-and-HTTP/2 case runs in real time
(200 ms bound) instead of advancing a paused clock.
Kept as written, the HTTP/2 assertion failed: GatewayStack::call added
`Connection: close` to any answer whose connection intent is to close,
HTTP/2 included, where the header is forbidden and only the stream
ends. It is now added to HTTP/1 answers only.
The retired legacy metadata route carried the website-host and metadata=true listing case tables, and a test that its authorization attaches the table listing snapshot. Re-create both against the gateway stack, observing the listing a caller receives, and probe the native admin and control-plane hosts for the unsigned x-amz header refusal.
The gateway stack was called through rustfs-gateway's tower adapter. Under the RustFS profile
that adapter wraps the request body, takes it back when the handler drops it unread, and reads
it in a task of its own spawned on the ambient runtime (unread_body.rs, Retention::settle). That
task took the body away from EarlyResponseBodyService before its abandon slot could see it, so
RustFS's own drain never ran: its task was no longer spawned under the HTTP/1-2 task owner,
graceful shutdown could report its children retired while a detached drain still held the
transport body, and the early-response drain metric and log went silent. On origin/main the
legacy stack was the default assembly, so the listener test never crossed the adapter.
GatewayStack::call now calls the service's own entry and keeps the adapter's connection
verdict (connection_intent_of). The inert drain_unread_request_bodies setting is removed.
EarlyResponseBodyService is again the only HTTP/1 unread-body drain, with Connection: close
and the configured idle bound.
The gateway-stack test that asserted the adapter's drain timeout now asserts that the stack
releases an unread body when it answers. The configured-timeout half moves to
gateway_rejected_http1_body_uses_the_configured_drain_timeout, which composes
EarlyResponseBodyService over the real gateway stack for a 1 s and a zero timeout.
Mutation: restoring the adapter call turns all three red:
http12_actual_early_body_drain_is_owned_until_release (the drain never starts),
rejected_http1_body_is_released_to_the_host_drain and
gateway_rejected_http1_body_uses_the_configured_drain_timeout.
Neither side of dual_stack_differential is started with the retired
stack selector any more, which the binary under test now refuses: both
sides run the binary under test, or side A runs the released reference
binary named by RUSTFS_E2E_REFERENCE_BINARY. RUSTFS_E2E_STACK_B is
gone; the injected-region control is unchanged.
server/layer.rs and server/hybrid.rs no longer reference s3s and leave
the edge allowlist; the baseline ceilings drop to the measured values
(files 50, s3_error! lines 103).
SigV4HeaderGuard, S3ErrorMessageCompat, DoubleSlashListBucketsCompat,
VirtualHostStyleHint and ObjectAttributesEtagFix patched the s3s edge
and have no work left: the gateway_stack legacy_layers tests pin what
each made the legacy stack answer against the gateway stack alone. The
layer unit tests go with the layers, and the server-domain flag that
only gated VirtualHostStyleHint goes with it.
EmptyBodyContentLengthCompat keeps its admin, console and internode
halves and loses its S3 half, which the gateway stack replaces by
leaving the bodies of bodyless operations unread; its S3 tests now
assert that such requests pass through unchanged.
The S3 service under the middleware now answers in EdgeBody, a boxed
Bytes body, with a boxed error, instead of s3s::Body and
s3s::HttpError. The gateway stack, the native console and the refusals
written in server/http.rs meet in that one type; Swift and the
internode RPC lane convert into it from rustfs_s3_types::Body.
ControlBodyDigestService is generic over its inner response body, and
its control-plane XML body limit is a named constant equal to the limit
the s3s edge applied.
Remove the S3Stack selector, the legacy s3s service assembly and the
gateway-stack cargo feature: the gateway stack, its native admin and
console hosts and the control-plane host are always assembled, and the
gateway crates are ordinary dependencies. The debug-only compile_error
guard goes with the feature.
RUSTFS_S3_STACK is retired: a server or an embedded server started with
it set, to any value including gateway or an empty string, refuses to
start with an error naming the variable and this release. The message
and its tests share one constant.
Tests that ran only on the legacy stack, or selected between stacks,
are retired; tests that ran on both now run on the gateway stack alone.
The s3s metadata/website route is no longer mounted and stays only
until the metadata-route branch replaces it.
Each entry names a legacy-only test, or the unit test of an s3s patch
layer, that the flip deletes, with the gateway-stack test that keeps
its contract (rustfs/backlog#2783). The commits that delete them delete
their entries.
The gateway selection gains a website service, chosen by its host claim
before the Keystone refusal, the native console, the native admin and the
control plane, as the legacy metadata route claims those requests first.
A parity test sends both request classes to both stacks over one store.
Install the RustFS dialect rows of ListObjectsV2WithMetadata and
ListObjectVersionsWithMetadata on the S3 table, let the early gate allow
them, and register one handler that runs the shared access phase, the
listing authorization and the shared listing answer. The rows keep their
overlaps with the standard listings and each other; the admin extension
rows they also shadow live on the control-plane host.
The legacy MetadataRoute now hands website requests to an owned WebsiteHost,
which reads through the owned GetObject/HeadObject authorization and use
cases with an anonymous request envelope, and hands metadata=true listings
to an owned module that authorizes and answers them on the request envelope.
The WebsiteRead marker moves with the website rules.
The gateway PutObject path carried no hotpath measurement. Measure execute_put_object_owned under the label the use case had before the legacy edge split, and extend the contract test to require it.
The legacy-only tests for keys outside the floor and for CompleteMultipartUpload request shapes now run on both stacks. The gateway answers every NUL and over-long key with one uniform refusal before the bucket is consulted, and differs from the legacy table on six completion shapes; both are pinned explicitly.
Rename storage/ecfs_extend.rs to storage/s3_support.rs, point its request-marker
imports at storage::request_markers, and move parse_object_version_id and
ListObjectUnorderedQuery out of storage/ecfs.rs into it. The module no longer
depends on FS, S3Access or storage::access. Behaviour is unchanged.
Authenticate the actual request signing secret against the authoritative regular-owner record before reading the registration body. Carry its epoch and identity revision through publication without rebinding to a newer owner.
Reject stale peer signing secrets and concurrent owner changes, including same-secret recreation, rotation back to an old secret, revision-only rewrites, and legacy-initialization readback races. Preserve the independent STS generation and unchanged-secret upsert policy.
Add deterministic real-store and handler regressions and document the secret-reuse boundary. This is a separate correction layer for #3266 above the generation-aware integration.
Validation: cargo fmt --all --check, git diff --check 05d9825, scripts/check_doc_paths.sh, and scripts/check_no_planning_docs.sh passed. Compilation, runtime tests, and Clippy are deferred as requested.
A custom error code nobody gave a status (the tier handlers' TierNotFound) was refused as a bare InternalError, so peers matching on the code never saw it. The legacy writer answers such an error 500 with its own code and message; handler_error now does the same for every status-less custom code. Errors with an unwritable header are still refused.
The authorization core moved under storage/authorization still called the
legacy FS type for this lookup, a reverse dependency the layer guard refuses.
The lookup now lives beside its only policy caller and FS delegates to it.
* perf(ecstore): reduce allocations for bounded bitrot frames
* test(s3): cover dynamic block layouts over HTTP
* perf: measure quantized range read shape
* chore: checkpoint quantized read metrics draft
Save work in progress for collaboration. Counts omit retired readers and transient or cancelled hedges. Frame semantics, async recorder coverage and disabled-metrics overhead remain unresolved; these counters are not ready for performance conclusions.
Validation: rustfmt and ecstore check passed; io-metrics 120, quantized 4 and hashed-read 3 tests passed. No new live or performance validation.
* perf(ecstore): reduce dynamic layout read overhead
* fix(ecstore): avoid prefetching conservative short range tails
* perf(ecstore): compact deferred shard reader state
* perf(ecstore): include shard checksums in file buffer cap
* fix(ecstore): preserve bounded quantum frames during heal
* perf(ecstore): reuse owned quantized frame batches
* perf(ecstore): batch q reads and retain shared copy framing
* fix(ecstore): preserve typed quantized read errors
* perf(ecstore): avoid zero-fill and serial copies in local batch reads
The local batch reader zero-initialized every window at a nonzero offset
before reading it, and copied every shard serially inside one blocking
task. Two-segment q-window range reads (cross-shard, cross-block) pay
both costs twice per request.
Read each window with a positioned read into uninitialized Vec capacity,
and dispatch each shard separately when every window is at least 512 KiB,
where copies dominate blocking-pool round trips. Smaller windows keep one
coalesced dispatch.
* perf(ecstore): keep readahead pipelined for local batch windows
A single window-sized pread on cold pages waits on each kernel readahead
chunk in turn. Seek to the window start and fill the buffer with
read_to_end over a length-limited reader instead: it still reads into
uninitialized spare capacity, but its growing sequential reads keep
readahead pipelined. Warm windows cost the same.
* Revert "perf(ecstore): keep readahead pipelined for local batch windows"
This reverts commit c252fca525.
On the ESSD-backed cloud footprint, the growing read_to_end reads were
slower than one window-sized positioned read for cold windows at nonzero
offsets (cross-block -27% on 4 MiB layouts, cross-shard -21% on 64 KiB
layouts versus the previous batch reader). The local benchmark that
motivated the change ran on a WSL virtual disk and did not represent the
target storage. Keep the single positioned read into spare capacity and
the per-shard dispatch for large windows.
* perf(ecstore): choose the batch read method by window size
Measured on ESSD-backed cloud storage, a cold window of about 1 MiB is
fastest as one positioned read, which completes as a single device
request, while windows of 2 MiB and more are faster with growing
sequential reads that keep readahead pipelined (one large read waits on
each readahead chunk in turn). Use one positioned read up to 1.5 MiB and
a seek plus length-limited read_to_end above it. Both paths read into
uninitialized spare capacity; per-shard dispatch for large windows is
unchanged.
* perf(ecstore): read local batch windows with an exact readahead hint
Kernel readahead sizes its first request from the read size. A cold
16 KiB window at offset 0 pulled 64-128 KiB, and a single 2 MiB read was
split into serial readahead chunks that cached almost twice the window,
which is why neither the single positioned read nor growing sequential
reads won for every window size on block storage.
Announce each window with POSIX_FADV_WILLNEED, which submits exactly the
window at once, and then fill the exact spare capacity with positioned
reads. This replaces the size-based choice between the two read methods.
The hint is advisory and its failure does not fail the read. A residency
test checks that cold reads cache only their window; it failed with the
hint disabled (a 5-page window cached 32 pages).
* perf(ecstore): use half-shard read quantum at 1 MiB EC layout
* revert(release): defer certification rollout for 1.0.5 (#9254)
Revert e5563e6004 only on release/1.0.5. Its trusted verifier workflow and immutable-candidate integration are not available yet. Restore the previous publication path under the approved release policy; retain the completed product regression and preview acceptance requirements.
* fix(ecstore): preserve legacy full-shard framing for default 1 MiB layout
* perf(ecstore): enable direct-memory GET and coalesce cross-shard range reads for bounded-quantum blocks
* chore(ecstore): remove unused schedule_bitrot_reader_task wrapper
* fix(ecstore): run delete-recovery discovery off the metadata lane
Bucket-wide delete-recovery discovery starts with the server and walks the
whole bucket tree in pages of up to 4096 entries, one lstat per entry. Each
page ran on the per-disk namespace queue's foreground lane, which has a
single worker and also serves GET metadata reads. On a cold tree a page
holds that worker for hundreds of milliseconds, so every GET on the disk
waits behind it until the walk finishes.
Run the page on the queue's sync lane instead, as the delete-transaction
inspection already does for the same reason. The namespace lease and the
page bounds are unchanged.
The regression test occupies the foreground lane and requires a discovery
page to complete within ten seconds; it times out without this change.
* test(ecstore): align read_appending rollback assertions on error
* fix: align multipart and EC read paths with current workspace APIs
---------
Co-authored-by: Xiaoyang Han <lux1an@qq.com>
Co-authored-by: Chris An <anzhengchao@gmail.com>
The gateway handlers, the owned envelope entry points, the protocol client and
the admin account-permissions probe now receive the owned S3 error directly.
authorize_request_core, its entry points, the denial log and the ListBuckets and
action-potential discovery decisions return the owned S3 error type; the legacy
hooks and tests convert at the call. The two source-reading guards that looked
for the table data-plane functions in access.rs (moved by the previous slice)
now read storage/authorization/table_data_plane.rs.
A JSON comparison of two bodies that are not JSON no longer agrees, which
turns two vacuous cases into byte comparisons. The table gains unknown,
deleted and service-account keys and a repeated Authorization line, the
caller probe gains header and query session tokens, and the console
listener's isolation is pinned in front of the control-plane host.
The control-plane host ran S3Router::admit inside its handler, after the
gateway had buffered the whole body, so an anonymous chunked admin PUT
made the host hold up to 20 MiB before answering 403. The host now
attaches each request's head before the gateway reads it and decides it
by S3Router::admit at the route-authorization stage, holds at most the
legacy 1 MiB of a claimed body, and answers a repeated Authorization line
as legacy RustFS answers an anonymous caller, never serving it as one.
The gateway selection no longer holds the legacy service: claimed routes go to the control-plane host, and a selection without one answers 501. Tests drive every request class through both selections and assert neither reaches the other stack, and compare the host with the legacy stack over real IAM and signatures.
The host dispatches every admin, table-catalog, profiling, STS form, replication, listen and Object Lambda request through S3Router::admit and the existing route table, with the legacy stack's identity, body ceiling and answers. Probe tests pin which requests reach a handler and as whom.
Design (T2.11): serve every route the admin router claims on the gateway
stack without the s3s service.
- Extension point: a RustFS-owned dialect on a second gateway service, the
control-plane host. One claimed operation, rustfs:ControlPlane, takes the
six RustFS claims (admin, MinIO alias, both table-catalog prefixes, both
profiling triggers) exactly, with a trailing slash and every descendant,
for every method; a RustFS form operation takes the STS form at /; the
eight query-discriminated extension and Object Lambda rows are the
gateway dialect's own S3-table operations. No gateway change is needed.
- Identity: the gateway verifies whatever is presented (floor admits
header, presigned and anonymous; the caller secret is handed to every
operation, as s3s hands it to every custom route) and the envelope is
built with RequestEnvelope::from_gateway, the mechanism the native admin
bridge already uses.
- Extracted here: S3Router::admit, check_access's rule over owned method,
URI, headers and "signed", and router::dispatch, the route-table answer.
The legacy S3Route impl now calls both; the console and Object Lambda
branches stay with the legacy call, and an envelope-based Object Lambda
entry is added for the gateway host.
The squash of #9489 carried two hunks of an unlanded POST change that call
post_effective_headers, which main does not define, so every build with the
gateway-stack feature failed. Read the request headers as before; the POST
change reapplies cleanly on top. Also drops trailing whitespace that fails
cargo fmt --check.
* fix(ecstore): admit degraded local startup at read quorum
Keep absent local volumes in configured offline slots and admit existing native formats with nonvoting blank replacements. Preserve legacy validation and elected migration authority before degraded reads. Add startup, migration, readiness and real S3 cold-start regressions.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): separate startup reads from metadata writers
Install committed startup metadata under a shared namespace fence when no writer work is required. Revalidate under the existing exclusive pipeline before bootstrap, recovery, repair, or topology side effects, and check fence validity at publication.
Cache existing-format read admission and avoid legacy scans below native read quorum for ineligible nonwriters. Cover shared-lock contention, authority bytes, released fences, and completed-process and cold-store retries.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): separate legacy read compatibility from migration
Validate observed legacy layouts against an established native read quorum without requiring legacy migration quorum. Reuse known unavailable native slots to avoid repeated peer RPCs. Keep migration behind its original elected-writer, availability and strict-majority requirements, and grant no bootstrap authority to read-compatible outcomes.
Add full-loader regressions for blank plus unreachable or missing slots, both creator roles, conflicting evidence and unchanged authority files.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): route startup test through storage facade
Use the existing internal NamespaceLocking re-export in the startup regression, preserving the architecture boundary checked by CI. Production code and the trait identity are unchanged.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(iam): preserve virtual parent collision invariant
Keep the federated binding regression focused on colliding regular and STS policy mappings. Virtual OIDC parent keys are now intentionally reserved and cannot identify regular users; that invariant already has direct IAM coverage.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(gateway): project POST form metadata safely
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(gateway): preserve form authority across feature boundaries
Keep archive extraction decisions on projected POST form headers in gateway builds while preserving ordinary header handling without that feature. Update the checksum regression to model the signed form source instead of a forbidden wire object property.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Signed-off-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
The request facts trait, its accessors and the access-phase admission no longer
live in the legacy access hook file; they return the owned S3 error type.
Moves the rustfs/gateway pin to ab5242b0: under the legacy RustFS policy
readings a starts-with condition over a field the form does not carry is
read against the empty string, as the shipped server reads it.
The console listener now answers 404 with an empty body for every route
that is not a console or control-plane route (9cefecb04), so an
unauthenticated S3 root there is no longer a 403 from the S3 service.
The old expectation described the behaviour before that hardening.
Moves the rustfs/gateway pin to 6096b921 (dotted custom error codes, the
x-rustfs-error-cause header, completion checksum types) and maps the
cause a 503 carries onto the gateway's closed header member, so the
gateway stack answers 503 with its cause instead of a generic 500.
Moves the rustfs/gateway pin to 98cb70d1: on the RustFS profile an
unsigned browser-form policy is enforced as the shipped server enforces
it and the request stays anonymous.
Moves the rustfs/gateway pin to fb4d21fc: an empty DeleteObjects entry
ETag is carried per entry, and the RustFS profile reads aws-chunked
bodies as the shipped server does (one empty line before signed
trailers, legacy trailer bounds, XAmzContentSHA256Mismatch, legacy
framing refusal codes).
A use-case error raised with a code and no message reached the gateway
stack as an empty <Message>, where the legacy edge has always sent the
per-code default. The owned code type now carries that table, checked
row by row against the pinned s3s, and the one error edge applies it.
* fix(ecstore): reserve emergency space for delete journals
Keep bounded physical metadata headroom for recoverable deletion on Unix without bypassing quorum or rollback.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* refactor(ecstore): recover delete metadata space on demand
Share a pinned reserve owner per physical disk and keep healthy deletion free of reserve filesystem probes. Retry only disposable staging and idempotent metadata primitives after actual ENOSPC, preserving transaction publication and quorum boundaries.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(ecstore): retry concurrent full-disk deletes
Serialize ENOSPC waiters per physical disk and give each safe metadata primitive one bounded retry against shared released capacity.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ci): account for delete reserves in receipt fixture
Reject undersized tmpfs mounts after including the eight per-disk delete reserves and keep a self-test for the capacity boundary.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(heal): refresh resume admission fixture lease
Refresh the existing node admission sample immediately before starting resume GC so the cancellation test reaches the native-open ownership boundary.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): inject receipt ENOSPC on hardlink path
Keep the receipt fault at the atomic allocation boundary after the stage-two hardlink fast path landed, so reserve recovery remains covered.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Resolve multipart ownership from storage metadata and share authorization across both request edges. Preserve the existing legacy adapter while binding gateway claims to the recorded namespace.
* perf(ecstore): defer flat inline preflight and lazy-pin commit dirs
Eliminate redundant directory opens, ancestor prefix probes, and metadata stats on the Linux local-disk object commit path:
- Short-circuit validate_existing_local_disk_prefix_at on ENOENT for normalized relative paths under RESOLVE_BENEATH | RESOLVE_NO_SYMLINKS.
- Defer source directory pinning and new-destination fstat in RenameCommitGuard on flat inline commits.
- Defer destination volume preflight to the commit guard preparation step on flat inline commits while preserving VolumeNotFound/VolumeAccessDenied preflight rejection proofs.
- Stage rollback backups by linking the held predecessor file descriptor via /proc/self/fd/<fd> and extend hardlinked rollback staging to non-inline overwrites.
* fix(ecstore): sync linked predecessor metadata when sync_backup is enabled
---------
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Wire both admin aliases through AdminBridge and the existing owned ServerInfo authorization. Keep the business handler and gateway pin unchanged; add no API or instance endpoint.
Add three test entry points covering eight allowed and 80 refusal/fallback rows, both hosts and aliases, complete JSON/XML, response headers, and unread unsigned bodies with signed controls. Production diff: +12/-3 lines.
Baseline and mutation base: 94a138b994. The unmodified native-selection test failed as expected. One compiled cohort passed eight controls, then eight faults failed their intended assertions: authorization bypass, native selection fallback, JSON, content type, Content-Length, refusal XML, premature body polling, and premature handler entry.
Restored sources were hash-checked and actually recompiled on 0278e1cd0e: 31 scoped tests, fmt, both RustFS Clippy modes, script-tests and test wiring passed. Existing snapshot checks now accumulate wire failures before asserting.
Not verified: CI, socket end-to-end or the full workspace suite.
Validation: cargo fmt --all --check; both rustfs all-target Clippy modes with -D warnings; 31 scoped restored tests; make script-tests; test wiring. No CI, socket-level end-to-end run, or full-workspace suite was run.
One compiled fault cohort first passed eight controls. Authorization bypass, native-route fallback, corrupted JSON, content type, content length and refusal XML each failed native_admin_extensions_catalog_real_signature_iam_and_wire; route fallback also failed native_admin_selection_is_exact_and_host_independent. Premature body polling and handler entry each failed native_admin_extensions_catalog_unsigned_before_body. Temporary instrumentation was removed, exact hashes restored and touched, and the product actually recompiled.
Restored test and lint base: 0278e1cd0e. Existing snapshot wire assertions remain enforced through the shared failure collector.
Integration verification base: 913edbc536 with the Iceberg config increment retained. The final dialect registers ten operations and four claims. Twenty-six selected tests passed: fourteen native admin HTTP tests, four mounted admin fixture tests, seven original extension handler tests and the exact edge selector. Both all-target RustFS Clippy modes, formatting, script-tests, current test wiring and prepush guards passed. Source hashes matched after verification. No new assertions or business behavior were introduced during integration.
Route both config GET aliases through GetCatalogConfigHandler. Keep its owned IAM, session-claim and warehouse handling, with the shared Iceberg JSON error outlet. Only these exact GET paths use the native bridge.
The matrix covers 12 allowed and 52 refused rows across both aliases and hosts, including full JSON, temporary credentials, query ordering and observed handler entry. Pin early duplicate-query rejection and the native anonymous message explicitly. The legacy baseline ran on b84985286.
Seven faults made the IAM, table-token, warehouse-prefix, alias-selection, handler-counter, JSON-outlet and complete anonymous-message assertions fail. Each had a passing control with the same compiled source. Restore hashes and a real restored build were checked.
Validation on 0278e1cd0: 16 scoped tests, cargo fmt and RustFS Clippy with and without gateway-stack passed. make script-tests passed with unchanged scripts. Production diff: +18/-9, excluding test-only probes.
No catalog storage, credential vending, catalog commits or other Iceberg operations were migrated. Full workspace, TCP/external SDK e2e and CI were not run.
Route the protocol client and legacy adapter through one owned multipart
copy use case, preserving storage ownership, fallback context, completion
accounting, conditional order, XML ETags, and error messages and causes.
Share copy-source validation and retain the original 1024-byte key limit.
Validation: original-main fixtures, 23 focused runtime tests, 38 effective
behavior mutations, restored-source runtime, default and gateway-stack
all-target Clippy, script tests, and final integration check and prepush.
Reduce syscall and sync overhead on local-disk DELETE and PUT paths:
- Hardlink the Stage 1 delete-prepared regular file to delete-quorum-committed on the cached Stage 2 local publish path when Stage 1 synced the journal, avoiding a duplicate temp-file create, write, fdatasync, and rename per drive while retaining the staged wrapper fallback on conflict or durability escalation.
- Accept bare DeleteRecoveryJournal payloads as unfinished (finished = false) commit receipts in parse_commit_receipt while keeping delete-prepared validation strictly DeleteRecoveryJournal.
- Reuse validated io_get_bucket_and_object_path components when constructing the root-relative metadata lease key in delete_version_inner on Linux.
- Track live /proc/self/fd/<fd> PublicationRoot handles via Weak<File> in NATIVE_PUBLICATION_HISTORY so record_native_publication skips redundant statx calls on pinned uncollided procfs roots.
* feat(ecstore): align inline budgets and binary batch decoding
Use a fixed 128 KiB per-shard inline budget with versioned admission and
preserve historical configuration markers and persisted object layouts.
Decode binary delete batches independently of the legacy JSON list while
retaining JSON-only requests and dual-write senders. Reject malformed
binary entries before disk mutation and preallocate the selected batch.
Cover budget boundaries, layout coexistence, MinIO metadata fixtures,
binary-only batches and JSON compatibility. Document geometry and
rollback boundaries.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(ecstore): add isolated Docker inline geometry validation
Build clean-source Linux validation images from a frozen Git bundle.
Pin running image identities and binary hashes, and inspect persisted
object geometry through the existing filemeta decoder.
Provide an owned four-node Docker adapter for the existing ABBA runner.
Guard resource ownership, isolate loopback access, serialize state
mutations, and verify HEAD, full GET and Range contents.
Keep PUT content probes available through an isolated Linux mc adapter
when a host client cannot initialize. Cover ownership and failure paths
with script tests wired into the existing runner.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): reuse bounded verified inline bodies
Share the materialization contract between metadata pre-verification
and buffered inline GETs. Bound responses to 2 MiB and a limited frame
count, and reuse an already verified body within the selected snapshot.
Route proof-protected parts through the readers that bind PartProofReader.
Cover larger single-block bodies, allocation bounds and proof validation
after a shard's bitrot checksum has been recomputed.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(ecstore): support bounded multi-block inline objects
Keep the default EC block and accumulated shard budget while bounding inline frame storage and verified-body reuse. Preserve transformed and protected write admission and existing metadata formats.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(ecstore): isolate inline transport comparison modes
Pin and verify both MessagePack-only gates for each Docker cell, preserve an explicit JSON compatibility cell and probe exact accumulated shard boundaries.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(ecstore): cover inline rollback and mixed-reader fleets
Add reusable compatibility fixtures for null and versioned objects, cross-block ranges, unfinished multipart uploads and batch version deletion. Record coordinator identity and per-version geometry, preserve retained-data manifests and archive manifests on dataset resets.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* refactor(ecstore): unify bounded inline read and write paths
Share checked frame decoding across metadata preverification and GET, resolve write admission once, and use one checked physical shard length for inline and disk writers. Preserve proof-bound readers and erasure recovery for damaged or missing shards.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(testing): persist inline compatibility mutation receipts
Save successful multipart and delete receipts before fallible content and geometry checks. Resume completed mutations through verification without repeating writes, and cover read failures, geometry failures, and command retries.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(gateway): isolate capability probes from multipart listings
Give successful capability probes their own buckets so CreateMultipartUpload does not change the exact two-upload pagination fixtures. Preserve all listing-boundary assertions on both HTTP stacks.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(rpc): honor fleet-confirmed codecs for batch deletion
Build DeleteVersions requests with one codec policy for the complete batch. Emit JSON compatibility fields by default and binary-only batches after both existing fleet gates pass. Cover request fields, canonical binding and actual remote sender, handler and disk deletion in both modes.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(ecstore): verify inline shards through borrowed frames
Share borrowed frame verification across buffered GET, bitrot readers and deep inline healing. Validate exact physical framing before scanning memory slices. Cover short prefixes, legacy padded frames, damage and trailing data, and provide a reproducible manual ABBA kernel comparison.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ci): account for manual inline verification benchmark
Raise the ECStore ignored-test ceiling from 2 to 3 for the opt-in
ABBA comparison of borrowed and streaming bitrot verification.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): reject inexact inline shard framing
Validate the complete encoded length of every selected inline data shard
before decoding or caching a verified object body. Return to the erasure
reader on missing, truncated, or trailing payload bytes.
Extend decoder fixtures across single and multi-block geometry, legacy
padding, unhashed payloads, and explicit bitrot verification bypass. Cover
metadata early-stop rejection and GET recovery for trailing shard bytes.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* refactor(ecstore): share inline shard reader construction
Build owned-metadata and borrowed-metadata readers through one Send iterator-based factory. Preserve shard ordering, empty slots, bitrot settings and caller-bound integrity verification.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(rpc): move endpoint buffers into batch delete requests
Transfer the prepared endpoint String into the protobuf request and assert allocation identity across every batch codec mode. This removes the intermediate endpoint copy during request construction.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(gateway): remove superseded pagination isolation
Use the upstream capability probes that clean up their own multipart sessions. Run probes against the seeded pagination bucket while keeping all exact page and cursor assertions.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(table-catalog): recognize borrowed multipart guard calls
Count owned and borrowed bucket/key guard forms while requiring all four production calls. Cover mixed split-file calls and reject wrong resources, missing error propagation and test-only mentions.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(ecstore): size heal cleanup fixtures above inline budgets
Use an environment-independent per-pool fixture policy and payload sizes above the aggregate inline budget. Assert external placement before pausing old-data cleanup, rebuilding the committed generation and checking physical shards and the final payload.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(table-catalog): count borrowed object metadata guards
Recognize the borrowed bucket/key guards in migrated legal-hold and retention entrypoints. Validate two object and two key guards and cover incorrect resources, missing propagation and test-only mentions.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Register GET /{rustfs,minio}/admin/v4/cluster/snapshot with the existing owned handler and ServerInfo authorization. The read-only use case is unchanged.
Reuse the admin fixture for full JSON and refusal XML comparisons, response headers, exact route selection, and unsigned rejection before reading a body. The native matrix covers 8 allowed and 80 refusal or fallback rows; the body observer adds four signed controls and four unsigned refusals. Update the existing registration census.
Validation on b84985286: 35 scoped tests, RustFS Clippy with and without gateway-stack, cargo fmt, and make script-tests passed. Full workspace, distributed e2e, and CI were not run.
Mutations: IAM bypass, route removal, JSON replacement, and event-time corruption turned the signature/IAM/wire contract red. Reading the unsigned body turned the body observer red. Content-Type, Content-Length, and an extra XML Resource node each turned the corresponding wire assertion red. A temporary entry counter observed signed calls and no unsigned handler entry.
Production diff: +12/-2. No new public API or business logic.
* fix(targets): decode Kafka notification record keys
Build Kafka records from the decoded object identity so record keys match
the notification envelope for immediate delivery and persisted replay.
Cover form encoding boundaries, historical queue round trips, and early
rejection of invalid UTF-8 metadata.
Fixes#9437
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(targets): share allocation-efficient event key construction
Use a borrowed form decoder and exact-capacity key buffer for notification
envelopes and Kafka records. Reuse the established percent decoder and
preserve the owned public decoder API and persisted replay metadata.
Add exhaustive malformed-escape and UTF-8 compatibility checks, plus a
regression for borrowing plain object names.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Route the protocol client through its installed multipart context and owned
values. Preserve request headers, response and error projection, counting,
and audit completion. UploadId keeps one scalar compatibility projection.
UploadPartCopy, PostObject, gateway handlers and ownership rules are unchanged.
On f68ef7d5f: fmt, both all-targets Clippy modes, 37 scoped tests, and script-tests
passed. The 14-fault cohort had a green 37-test control; restored sources were
hash-checked, touched and recompiled before the final 37-test pass. On 489316e7a:
gateway-stack all-targets check and prepush-quick passed after rebase.
New runtime cases: 13 negative, 2 positive. Projection matrices cover 60 input,
64 output and 6 error rows. Non-test lines: +122/-20. No existing test was
deleted, weakened or ignored.
Effective mutations and failing tests (under protocols::client::multipart::
tests::upload_part_tests):
- part-number, length, md5, sse, eager-body, metric, audit:
upload_part_refusals_match_original_without_persisting_parts
- checksum: upload_part_input_projection_matches_original_fields
- output-field, etag-order:
upload_part_output_projection_matches_original_fields_and_refusals
- error-default, error-explicit:
upload_part_error_projection_matches_original_defaults
- ambient, observer: upload_part_client_preserves_stored_bytes_and_bound_context
Not run: full workspace, protocol wire lanes, released-binary differential,
live KMS/SSE integration, or CI.
Replace the protocol client compatibility dispatch with owned request and
response projections while preserving source validation, conditions, dates,
ETags, error answers, bound storage, fallback behavior, and operation counts.
Validated against the existing client and library behavior on f68ef7d5.
Final gateway-feature tests passed 11/11, including existing PutObject
regressions; default-mode tests passed 6/6. Both all-target Clippy modes,
script tests, wiring checks, and static preflight passed.
Twenty-two effective mutations covered observation controls, operation
counts, context selection, storage effects, source and condition parsing,
optional fields, dates, output fields, error facts, and request credentials.
Restored sources were rebuilt before the final passing controls.
This does not register UploadPartCopy or change the default S3 stack.
External migration lanes and release-reference testing remain outstanding.
Route CreateMultipartUpload, CompleteMultipartUpload and AbortMultipartUpload through the installed server's multipart use case. Keep the measured protocol projections and operation counts.
The upload-id scalar compatibility helper remains in Complete and Abort. UploadPart, UploadPartCopy, PostObject and persisted-owner work are outside this change.
Validation: 11 new tests; the runtime contract has 8 refusal cases and 2 successful flows. The restored selection passed 59/59 on d3abf8023. Both Clippy modes, fmt, script-tests, test wiring and prepush-quick passed. Non-test diff: +231/-42. The original client baseline ran on a98bd9028.
Effective mutations (38), grouped by the test that failed:
- multipart_create_projection_matches_original_fields_and_times: create-input-name, create-input-metadata, create-input-tagging, create-input-storage, create-input-sse, create-input-kms, create-input-md5, create-input-mode, create-input-hold, create-input-date, timestamp.
- multipart_refusals_match_original_client_errors: complete-error-message.
- complete_input_preserves_part_fields: legacy-part-checksum.
- multipart_create_projection_preserves_refusals: create-input-refusal.
- multipart_create_output_matches_original_for_stored_names_and_empty_values: create-output-name, create-output-strings.
- multipart_complete_projection_matches_original_parts_and_conditions: complete-condition, complete-parts, complete-part-number, complete-part-etag, complete-part-checksum, complete-condition-refusal.
- multipart_completion_projection_preserves_original_escaped_tags: complete-output-escape, complete-output-weak.
- multipart_completion_projection_preserves_header_only_field_behavior: complete-output-headerdrop, complete-output-header-validation.
- protocol_multipart_lifecycle_stores_parts_and_aborts: count-create, count-complete, count-abort, complete-location, complete-storage.
- multipart_uses_bound_store_with_a_foreign_ambient_context: create-storage, abort-storage, bound-store.
- multipart_envelopes_preserve_original_request_facts: request-facts.
- protocol_policy_denials_and_request_conditions: permission-create, permission-complete, permission-abort.
The final restored run had no leaky summary; an earlier control marked one pure projection test leaky. The linker reported the non-failing __eh_frame warning. The ambient fault's test exited 100 with target=false/ambient=true; its wrapper exited 1 because it expected generic assertion wording.
Not verified: CI, network protocol suites and the released-reference comparison.
Call the existing bucket use case directly from the protocol client. Preserve
bucket-name materialization, response facts, edge counts and bound or fallback
store selection. Keep legacy DTO imports confined to tests.
Tests: one new runtime matrix, with seven rejection and four success rows,
measured first against main at 70022e51c. Restored gateway bucket tests passed 4/4.
The old dispatch failed the source wiring guard; owned dispatch passed it.
Mutation checks: normal controls passed; the runtime matrix rejected storage
bypass, missing fallback, metric loss, ambient context selection, strict names,
and changed error code, message, status or headers. Isolated storage, fallback
and ambient-context faults retained normal operation counts. Restored sources
were touched and actually recompiled before the runtime pass.
Validation: fmt, package Clippy in both feature modes, script-tests and test
wiring. Production diff: +19/-14 lines. No new API or storage use case.
Not verified: CI, full workspace tests or live protocol end-to-end tests.
Use the bucket use case for ListObjectsV2 and both bucket listing entry points. Keep entry encoding, timestamps, ETags and refreshed session facts while removing three legacy FS calls. Other protocol operations are outside this increment. Non-test diff: +102/-82.
Added six tests: projection rows have 34 refusals and six accepted values; runtime cases have five refusals and eight successes, plus bucket exclusions and four credential rows. Existing assertions were retained.
Validation: baseline 2fea17d57 (2/2); restored build on a98bd9028 (15/15); all-target Clippy default and gateway-stack; fmt, script-tests, test wiring and prepush-quick. Rebased onto 88515bb7d with no task-file or pin overlap; all task blobs match the tested source.
Eight independent controls and 31 intended mutation failures:
- protocol_listing_output_matches_legacy_projection: strict Name, oversized key, invalid/missing ETag, XML escaping, weak tag, prefix, marker, encoding, timestamp.
- protocol_listing_bucket_projection_preserves_strict_names_and_milliseconds: bucket filtering, timestamp.
- protocol_listing_pages_and_encoding: cursor, count, encoding.
- protocol_listing_refusals_and_limits: empty/unknown credentials, counts.
- protocol_listing_bucket_context_and_defaults: count, bound context.
- protocol_listing_session_credential_projection_matches_legacy: token, secret.
- protocol_session_bucket_listing_revalidates_the_session_key: request context, IP, secure transport, headers, refresh, accepted count, refusal count, store context.
- request_extensions_preserve_authenticated_identity_and_source_ip: owner.
Experiments were removed, hashes checked and the restored product actually recompiled. Full protocol listing E2E and CI were not run.
Register data usage, plugin catalog and module-switch GET reads through
the existing AdminBridge and handlers under both admin aliases. Keep
neighboring methods and object-lambda routing on their existing paths.
Validation on 65057691: unchanged-production legacy baseline passed;
restored-source scoped tests passed 78/78. The new native HTTP matrix
covers 28 success and 236 refusal or routing-boundary rows. Exact replies
are pinned for both aliases and ordinary and bucket Hosts.
Three independent no-fault controls and 21 effective mutations passed
in one compiled cohort: selector removal/widening/lambda, each handler
binding, each IAM gate and action, both narrowed data-usage any-of gates,
signature verification, lambda dispatch, response bytes/status/request
id/content type and Keystone precedence. Exact refusal observations also
caught the disabled-key signature mutation. No existing assertion was
removed or weakened.
Gateway and default all-targets Clippy, script tests, test wiring and the
local prepush guards passed. No gateway pin or API changed.
Not verified: production listeners and full middleware, session
credentials, non-default persisted usage/module-switch data, full
workspace tests or CI.
Call the existing bucket use cases directly from the protocol client. Preserve root lookups, bucket validation, request context, response facts and operation counts. Other protocol operations stay as they are.
Non-test lines: +33/-40. Added cases: 17 refusals, 16 successes; reused three HeadBucket policy refusals. Protocol tests passed 39/39 in default and gateway-stack builds. Both rustfs all-target Clippy modes and make script-tests passed.
Four no-fault controls passed; 22 faulted test runs failed as intended. Mutations covered input routing, name refusals, output and error facts, counters, deletion, context resolution and authorization allow/deny. The force-delete fault also changed the observed bucket/object state. The raw HeadBucket NUL-name projection went red before its response text was restored.
Tests and Clippy ran on 2fea17d57. Script-tests ran on 2ca689f48; their sources are unchanged. Rebased onto 65057691 with unchanged client and gateway-pin blobs. Network transport e2e, workspace tests and CI were not run.
Serve the storage info, runtime capabilities and object cache statistics
GET aliases through the native admin service. Call the existing full IAM
gates and owned handlers, preserve raw request facts and keep the Keystone
guard first.
Add two contract matrices (42 allowed and 168 refused rows), with expanded
selector, registry, envelope and readiness coverage. On 2fea17d57d, the
restored source passed 72 scoped tests, fmt and both rustfs all-targets
Clippy modes. Script tests and test wiring also passed.
29 effective fault runs cover selection, lambda precedence, all three
dispatch/action/authorization bindings, signature verification, source IP,
raw URI/query, request context, readiness, response bytes/status/headers/
length and the registry. Nine controls ran in separate processes against
the same binary before those faults.
Not verified: live listeners and full production middleware, session
credentials, active cache statistics, CI or the full workspace tests.
Pair a single-use Keystone proof with sanitized owned authorization facts.
Preserve the original session-presence fact for policy principal projection,
and scope legacy credentials during both service call construction and polling.
Bind the gateway host-token principal to that owned identity without an IAM
credential or task-local fallback.
Initialize Keystone before gateway HTTP assembly and reuse the provider for
listeners and later auth integration setup. Refuse token-bearing claimed
non-S3 requests before console, admin or legacy dispatch.
Add 14 test functions. The primary ListBuckets/HeadBucket matrix has 13 rejected
and 7 allowed requests. Change enabled-Keystone startup to succeed after provider
initialization; retain both configuration tests, including disabled and invalid
settings. Production changes: +304/-77 lines, excluding test bodies.
Mutation checks (20 effective boundaries; each has a green control):
- owner, groups, username: keystone_http_tokens_authorize_real_s3_by_roles_groups_and_username
- pair-name: keystone_envelope_refuses_missing_and_mismatched_owned_identity
- provider, expiry: keystone_bridge_refuses_provider_mismatch_and_post_validation_expiry
- stale-established, stale-owned: keystone_stack_clears_both_payloads_before_a_signed_request
- legacy-before-deny, native-before-deny, admin-before-deny: gateway_keystone_tokens_are_refused_before_non_s3_legacy_dispatch
- scope: disabled_middleware_clears_identity_before_inner_call_and_poll
- principal-session: resource_free_conditions_preserve_legacy_projection_and_erased_keystone_session_facts
- secret, session, session-fact, replay, poison: request_identity_erases_secrets_and_consumes_its_proof_once
- repeat-init, missing-child: keystone_initialization_reuses_the_provider_for_concurrent_calls
Verification on 2ca689f: 214 focused tests passed after restoring and rebuilding
the production sources; all 33 Keystone package tests passed. Both package-scoped
all-target Clippy configurations, formatting, source guards, script tests and
prepush checks passed. Temporary fault code was removed.
No gateway API, dependency pin or PostObject changes. A deployed Keystone server,
the complete listener token lane and CI were not exercised locally.
Project protocol PutObject directly into the owned write input and project the answer back without the legacy DTO path. Keep the measured normalization, refusals, error facts, server context and operation counts at the client edge.
Non-test lines: +196/-18. Eight added tests include 25 runtime cases (18 negative, 7 positive).
Verified on f4266a4576 with gateway pin 44f9a2422d745ffba952347ec91b0332ef2667a4: protocol tests 36/36 in default and gateway-stack builds; both all-target Clippy builds; script-tests; prepush-quick.
Sixteen runtime mutations failed their intended tests from one fixed binary after all eight controls passed:
- empty: protocol_put_optional_values_match_legacy
- condition, specific-none: protocol_put_condition_grammar_matches_legacy
- input-checksum: protocol_put_checksum_input_matches_legacy
- retain-nanos, retain-range: protocol_put_retain_until_matches_legacy
- output-etag, output-fields, output-checksum: protocol_put_output_matches_legacy
- error-default, error-facts: protocol_put_error_projection_matches_legacy
- event-hold, event-days, event-years, body, metrics: protocol_put_runtime_matches_legacy
The experimental code was removed and the restored implementation was recompiled and tested in both builds. The earlier incorrect metric lookup is not counted as evidence.
Scope is protocol PutObject. Network protocol E2E, the full workspace and CI were not run.
Serve GET /rustfs/admin/v3/info and /minio/admin/v3/info through a
scoped native service using the existing signature verifier and the real
ServerInfoHandler IAM gate. Keep object-lambda routing ahead of these
aliases and retain the raw URI, optional ReqInfo, headers and body.
The pinned RustFS profile already handles claims on bucket-style hosts.
Outside tests and the generated lockfile: +180/-14 lines. Add seven tests,
including 32 authorization refusals and 16 authorized info responses, both
SourceIp directions and signed legacy-service comparisons. No existing
assertion was weakened. Duplicate-query signing is tested as a fixture
refusal, with routing coverage retained separately.
Validation on f4266a4576: fmt, both rustfs
Clippy modes, 42 scoped tests, script-tests and prepush-quick.
Twenty-four mutation runs failed as intended across 22 faults:
- native_admin_selection_is_exact_and_host_independent: remove/widen
selection and lose object-lambda priority.
- native_admin_real_iam_and_legacy_contract: bypass signature verification
or IAM, change the action or source IP, omit pools, rewrite the URI,
or lose object-lambda priority.
- native_admin_envelope_preserves_raw_alias_host_facts_and_optional_req_info:
rewrite the URI, drop/default ReqInfo, or drop client, peer or request ID.
- native_admin_complete_response_keeps_bytes_status_and_content_type:
corrupt bytes, status, content type, extra headers or content length.
- native_admin_authenticated_request_refuses_an_uninstalled_server_context:
remove the readiness check.
- native_admin_registers_one_operation_and_both_claims: register an extra op.
- native_admin_signing_fixture_refuses_duplicate_query: accept duplicate keys.
The same mutation binary passed all seven controls before fault runs;
the restored production tree was then rebuilt and tested.
Not exercised: network listeners, session credentials, the combined
Keystone change, CI or other admin endpoints.
* fix(rpc): scope canary errors to grpc failures
Exclude expected read-version remote responses without hiding transport, gRPC status, response-decode, or other gRPC operation failures.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(rpc): verify canary revisions from image history
Use immutable image history only when recognized config labels are absent, keep mismatches fail-closed, and record the provenance source in verifier output.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(audit): restore bucket config audits and metadata guards
Audit accelerate, request-payment, and website configuration mutations through the shared owned request scope, including failures and the website deletion status.
Validate the replication mutation delegation before checking peer reload notifications. Count borrowed reserved-prefix guard calls and cover missing production calls, test-only mentions, audit completion, and stale bucket incarnations.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: heihutu <heihutu@gmail.com>
Route both GetObject calls, HeadObject and DeleteObject to the owned use cases. Keep the request facts and millisecond timestamp behavior. PutObject stays unchanged; 12 operations and 13 trait calls remain.
The client edge is an interface in the layer guard. Its public re-export is covered too, and app-to-client imports are rejected by fixtures.
Runtime wiring: +177/-101 non-test lines. The new matrix has 18 negative and 13 positive operation cases, plus the extended identity-copy control.
Validation: 28 protocol tests passed in both default and gateway-stack modes; both all-target Clippy modes passed. Script tests, layer controls and focused architecture/footprint/test guards passed. Five source faults failed at the intended claims, range, Head ETag, deletion-witness and version assertions. The precision oracles failed before the millisecond projection was added.
Runtime and Clippy ran on e9da1d309; initial controls and faults ran on 2308dee4b2. Rebase to 00ecde125 changed none of the seven task files or gateway pins. CI and HTTP transport were not checked.
Use the existing console router when the gateway console is enabled. Keep lambda and extension precedence, the legacy selection, and outer middleware assembly unchanged. The common body conversion stays at the edge.
Add test-only assets and one contract with 10 native and 52 excluded routing probes. Non-test source: +89/-16. The restored run passed 22 console/stack tests on e9da1d309; both Clippy modes, script-tests and prepush-quick passed.
native_console_route_contract went red for three independent mutations: remove the native branch (service-call counts), widen the shared prefix (neighboring S3 path), and route every claim to console (anonymous admin refusal). Restoring the sources triggered a real product recompile.
Full outer HTTP wire checks and a production UI bundle were not tested. Admin, STS and website migration remain separate work.
Share the batch deletion engine between legacy and native edges with owned inputs and results. Keep exact per-entry authorization, version and retention handling, ordered errors, quiet responses, metrics, and audit aggregation. Preserve frozen resource resolution and rejected-key echoes.
On 2308dee4 with gateway 44f9a242, the focused suite passed 208 tests before and after deliberate mutations. Both rustfs Clippy configurations, script tests, test wiring, formatting, and prepush guards passed. Four added runtime tests cover mixed successes and per-entry refusals, frozen fields, and rejected-key state.
Five targeted tests failed when batch target clearing, denial error mapping, and raw-key echo were changed. Sources were restored byte for byte and product artifacts recompiled.
The legacy edge matched 62 observed baseline responses including all headers, XML and object states. Native decoder and expected-owner differences are tracked separately. Actual webhook records matched for mixed and quiet requests across the baseline and both candidate stacks.
Full workspace tests and CI were not run. Verification is scoped to this migration increment.
Use the validated request offset and full timestamp precision when projecting PutObject and PutObjectRetention dates into authorization and storage.
Signed requests verify exact stored dates and version isolation for positive and negative offsets and UTC. Policy tests cover denied dates and the typed date supplied by PutObject authorization.
On b2b4f0c4, 175 focused tests and six raw xl.meta checks passed. The UTC-only control and five targeted mutations failed at their intended assertions. Both Clippy feature configurations passed.
Share GetObject authorization and the existing Select query producer across both stacks. Carry live events through the typed response with the projected SSE headers. The producer retains its single deadline, snapshot checks, bounded channel and receiver cancellation.
On c5b4a8577, the restored build passed 207 focused tests, both RustFS Clippy feature modes, formatting, script tests and test wiring. Signed socket probes matched all 17 legacy cases and 12 gateway cases. Five gateway refusals omit the legacy default message, tracked in rustfs/backlog#2684.
The fault build passed all 98 controls. Bypassing authorization failed on both stacks. Removing receiver-close handling, dropping the terminal Records permit, skipping the Stats fence, replacing an error with End, and dropping progress or scan range each failed the corresponding test.
Verification used local stores and SSE-C. The full workspace suite and external KMS were outside the local run.
Share the authorization snapshot and restore admission between both stacks.
Preserve HTTP 200 for both success paths and emit ObjectRestorePost on new
admission only.
Verified on c0763a43 with 114 focused tests, four serialized ILM tests, and
16 signed wire responses per stack. Faults covered shared authorization,
generation capture and admission, SELECT rejection, worker parameters and
liveness, and both audit and event paths. Cluster lock loss and mixed-version
rollout remain unverified.
Share each operation's authorization and metadata write with the legacy edge.
Keep their request ordering, version and bucket-incarnation fences, replication
completion, and notification suppression. Retention checks the locked metadata
again before committing a change.
The two stacks were exercised through signed HTTP requests and independent
disk metadata reads. Faults in authorization, body projection, version
selection, counting, auditing, notification suppression, scanner invalidation,
the bucket fence, and the commit-time retention check reached their assertions.
Share the bucket Object Lock write between the legacy and gateway edges. Keep lock configuration and versioning as sequential writes against the authorized bucket incarnation, followed by peer reload, site replication and scanner invalidation.
Cover eight refusal or failure cases and three successful cases with durable metadata and signed requests. The two stacks run the same request cases and refusal matrix.
The mutation run detected both missing write fences, swallowed peer failure, propagated site failure, early or absent scanner invalidation, missing audit, wrong authorization action or resource, dropped request body and incorrect operation counting.
Validation used debug builds on d461908bf. The final lint pass elides an equivalent lifetime in a test helper. Peer and site failures were injected locally, with real multi-site delivery left unverified.
Route PutBucketReplication and DeleteBucketReplication through the owned bucket use case. Share site checks, metadata fencing, target cleanup recovery, and audit completion with the legacy edge.
Signed requests exercise 28 refusals and six accepted edits across both stacks. The direct storage tests cover six failure paths and two successful edits. Twenty-four faults turned their expected disk, authorization, locking, callback, audit, or metric assertions red.
The restored gateway-stack build passed 132 selected tests on 75b293f09, including both HTTP stacks. Both Clippy variants and the mutation cohort passed on fb3e2818c. The fixed legacy CLI matched all six response records. The standalone default runtime suite, multi-site delivery, and CI were unverified.
Share the owned write paths across both S3 stacks. Preserve the policy
document bytes, default KMS key resolution, bucket tag validation, and
incarnation fences before reload and replication callbacks.
Add three successful writes and three rejected stale writes on disk.
Extend the two-stack refusal matrix with six successful and 24 denied
requests. Cover the encryption and tag validation order before lookup.
The fault cohort exercised the action and resource checks, value
validation and order, raw policy bytes, default KMS readback, legacy
policy count, durable writes, incarnation fences, reload, replication,
audit, and scanner invalidation. Each selected assertion failed.
Local checks used base 75b293f09. Fixed CLI comparisons covered legacy
responses, audit entries, and operation counts. Live peer replication,
external KMS providers, and CI were outside the local checks.
Share the three generation-fenced deletes across both S3 stacks. Keep
their existing IAM actions and use the shared IAM scope for tag deletion.
Add six focused tests covering 21 refusals and nine successes, and add the
three operations to the refusal matrix. Substituting IAM actions and
buckets, removing the tagging scope, and suppressing the gateway counter
fail the authorization and metrics checks. The storage tests detect a
lost fence, a skipped write, missing reload or replication calls, omitted
scanner invalidation, and a changed audit status.
Verified on 4294c41cc with scoped nextest, both Clippy modes, script tests,
quick checks, and local CLI comparisons. Peer network delivery was
outside the local checks.
Route PutBucketAcl and PutBucketLogging through shared bucket use cases.
Preserve the ACL response for header-only requests and the bucket lookup
before the XML policy refusal. Write logging configuration using the
authorized bucket incarnation and the existing persistence format.
Verify 111 focused tests on 4294c41cc, including the storage access suite,
and run both Clippy modes, script tests, and local wire comparisons. The
wire matrix exercises 15 refusal cases and seven successful writes on
each stack.
Change both IAM actions and resources, audit statuses, and counters in
the fault cohort. Reverse ACL lookup and XML policy checks, drop policy
presence, corrupt logging bytes, reverse logging conversion order, and
remove the incarnation guard. The regressions detect each fault, and
the stale-authorization test reads the replacement bucket from disk.
Route Get, Put, and DeletePublicAccessBlock through shared bucket use
cases. Preserve the persisted switch values, mutation incarnation fence,
reload behavior, audit status, and missing-configuration response.
Add six focused tests covering 25 refusal cases and 17 success cases
across both stacks and storage. Extend the refusal and counter matrix
for all three operations.
Substitute each IAM action and bucket, corrupt each operation's value,
change the missing-config status, and suppress each edge counter. The
round-trip and matrix tests reject those faults. Put and Delete tests
reject a missing incarnation fence, the wrong reload mode, and wrong
audit status. Read the durable replacement-bucket bytes after disabling
both fences.
Verify on 92050cdca with scoped nextest, both Clippy modes, script tests,
and local wire tests. Peer reload delivery was outside these local tests.
Serve accelerate, request-payment and website writes, including website
deletion, through shared use cases. Both S3 edges enforce the bucket
policy and the metadata incarnation fence before changing stored data.
Verified on 92050cdca with formatting, Clippy on both RustFS feature
sets, script tests, 21 RustFS tests and 27 operation and metrics tests.
The fixed legacy CLI supplied 42 HTTP comparison cases per stack.
The wire assertions caught altered IAM actions and resources, missing
denial audits and operation counters, and skipped website validation.
The stale-incarnation test caught changes to the replacement bucket's
disk bytes. The lookup-order test caught early configuration conversion.
Refs rustfs/backlog#2734
* fix(metrics): label grouped fdatasync batches accurately
Record the serialized user-space fdatasync coordinator as grouped and reserve parallel for independent per-file fanout. This keeps performance dashboards from conflating two different dispatch models.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(ecstore): separate grouping from timeout race
Keep the same-disk batching test focused on queue aggregation. Claimed-follower timeout ownership remains covered by its dedicated deterministic regression, avoiding a valid pre-claim timeout race in the batching fixture.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(table-catalog): accept borrowed multipart guard calls
Count both owned String and borrowed &str spellings of the same reserved-prefix guard. UploadPart now obtains borrowed bucket and key values from its typed target, while the production guard remains in place.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
* perf(grpc): attribute rebuilds and bound bulk responses
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(grpc): attribute rebuild success after publication
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(obs): add exact HTTP/2 ping timeout diagnostics
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(multipart): run refusal matrix on large stack
Run the real-store completion refusal matrix through the shared 32 MiB test harness so its deep async storage future does not overflow libtest's default stack.
Keep the original test name and all refusal-order assertions intact.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* chore(deps): pin nixl-sys workspace source
Manage the nixl-sys Git revision from the workspace dependency table and point the optional Linux transport dependency at houseme/nixl commit cc636c83f13d692e85b67e55aed092413d16fb41.
Allow the reviewed source in cargo-deny and refresh the lockfile, replacing the unmaintained bincode dependency with the fork's wincode graph.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(rpc): authenticate msgpack peer capability
Add an optional boot-epoch-bound HMAC capability proof and cache the verified per-peer observation without enabling any msgpack send policy.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(grpc): bind peer capability to connection generations (#9433)
* feat(grpc): track physical connection generations
Observe every tonic physical reconnect through a stable custom connector while preserving existing TCP, TLS, HTTP/2, cache, and public channel behavior.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(rpc): bind msgpack capability to connections
Scope authenticated msgpack observations to channel identity and physical connection generation so transparent reconnects require a fresh proof without enabling the send policy.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
* feat(rpc): guard stale generations before dispatch
Reject generation-bound requests before inner transport call or first payload frame when tonic readiness observes a different physical connection, while leaving ordinary mutations unguarded until the send-policy follow-up.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(rpc): add per-peer msgpack rollout gate
Add the default-off peer-capability environment gate, cached evaluation, fixed-cardinality send-decision metrics, and rollout constraints for stable peer-affine connections.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(rpc): apply per-peer msgpack send policy
Capture one capability decision per eligible RPC, bind peer-mode requests to boot and connection generations, and rebuild at most one dual-write request only after a locally proven pre-dispatch rejection.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(rpc): verify msgpack peer canary evidence
Add a strict three-phase four-node evidence verifier with raw Prometheus and workload receipts, adversarial tests, script-test wiring, and the operational manifest contract.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(rpc): align batch read manifest encoder
Match the BatchReadVersion compatibility manifest to the request-owned encoder expression used by the production send path.
Restore the owning ECStore source guard while preserving wire and runtime behavior.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(rpc): orchestrate msgpack peer canary
Run the fixed mixed/all-new/rollback four-node matrix with prebuilt images, real workload and readback, raw Prometheus capture, strict manifest generation, and adversarial fake integration tests.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(rpc): verify canary image and telemetry identities
* test(rpc): bind canary evidence provenance
Scope canary metrics to one injected cluster identity and bind candidate, baseline, and per-phase running containers to immutable image IDs and exact build revisions.
Reject foreign-cluster metrics, stale revision labels, same-image tags, and phase image mismatches.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(table-catalog): accept borrowed multipart guard calls
Count the exact borrowed bucket/key guard call introduced by UploadPart target ownership while preserving the four-production-call contract.
Cover the borrowed spelling in both the positive fixture and the test-only false-positive regression.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: overtrue <anzhengchao@gmail.com>
Share XML tag authorization and storage execution across both stacks.
Preserve the requested version, replication-target proxy, and metadata
completion order.
The dual-stack tests exercise 37 refusal and 13 success scenarios.
The restored integration run passed 148 tests on 26db9b19a, and the
proxy cleanup verification passed 134 run, 134 passed.
Both feature configurations passed Clippy, and script tests passed.
Fault injection caught native and shared authorization bypasses,
missing XML facts, and incorrect action, resource and tag key facts.
It also caught duplicate counting, incorrect persisted tags, missing
or duplicate success events, and event or dirty publication on a miss.
Live replication targets and ECStore write faults remain unverified.
Serve bucket acceleration, request payment, website, and logging
configuration through shared persisted read paths. Keep each operation's
existing authorization and legacy response projection. Append distinct
metric labels without shifting existing indexes.
The scoped RustFS, S3 operation, and metrics suite passed 283 tests on
993464fbb. The integrated configuration and refusal suites passed 21
tests on 292974baf. Both feature modes passed all-targets Clippy.
Standalone checks compared 23 successful and 17 refused legacy requests
against cfdd4b268 and exercised the gateway answers on the same data.
Action, resource, anonymous, projection, default, missing-bucket, counter,
and audit faults failed their original assertions. Metric registry tests
also detected duplicate labels, changed index order, and an added event.
Verification is scoped to these local suites and wire probes.
Share bucket-scoped authorization and persisted configuration reads across
both stacks. Carry the stored configurations in gateway responses and
preserve the operation-specific errors for missing configs.
On RustFS 993464fbb, 120 scoped tests passed, including both refusal
matrices and six new tests with 24 refusal and 12 success cases.
Live HTTP checks covered response documents, operation counts and
authorization-denial audit records. Both feature configurations passed
Clippy, and formatting, script tests and source guards passed.
Changing each IAM action or resource admitted a forbidden read.
Duplicating each edge count and changing each stored output failed its
test. Returning 404 for missing encryption failed the 400 assertion.
Suppressing gateway denial audit removed all nine expected records.
Runtime verification used single-node debug servers.
Share the read use case and both IAM decisions across the legacy and
gateway handlers. Keep attribute selection, stored metadata and
pagination in the use case, and encode the result at each edge.
The 6f93ac5f control matched 55 legacy wire cases and the restored
sources passed 139 scoped tests. Both stacks exercised 59 signed
requests, including 31 legacy refusals and 32 gateway refusals.
Seventeen injected faults each turned a targeted assertion red. They
cover the four IAM actions, resource and version binding, empty-version
selection, handler authorization, SSE-C, selection, both checksum paths,
paging, ETag, Last-Modified, counting and notification suppression.
Share one owned write path across the gateway and legacy edges. Project
runtime destinations at each edge and defer consumption of the persisted
conversion result until after filter validation. Keep IAM scope, the
incarnation fence, and the existing validate, write, reload, clear, and
add order. Count the request at its edge and audit it in the use case.
Add three refusal tests and four tests that exercise success and failure. The legacy HTTP baseline passed on 97a7639f. On 6f93ac5f the
38-test control passed. Six fault injections exposed wrong IAM action,
wrong IAM resource, a missing incarnation fence, duplicate counting,
the wrong audit status, and missing reload callbacks. The first three
changed the stored bytes guarded by their refusal tests.
The restored tree rebuilt and passed all 38 scoped tests. Both package
Clippy configurations, script tests, test wiring, and prepush passed.
Cross-node reload delivery and remote audit sink delivery were outside
the local test scope.
Use the same authorization and audited use case on both S3 stacks. Bind
the gateway claim to the owner selected under the upload write lock
before staged parts can be removed. Preserve the existing generation,
lifecycle and quorum checks.
Verified the fixed legacy baseline, the integrated native wire flow, 212
focused tests and both Clippy modes. Fault checks exercised owner
selection, deletion and orphan handling, scoped IAM, generation
transport, audit, operation counts and dirty usage.
Audit delivery and separate fault injection of the existing final
lock-loss and metadata-incarnation fences were outside this verification.
Resolve the source from the gateway read proof. Share source and
destination authorization, tag checks, and the existing storage copy
between both S3 stacks.
Checked the legacy wire baseline, both CopyObject wire contracts, and the
access and refusal suites. Nine temporary faults triggered the intended
assertions. The restored build passed seven focused tests with gateway
75757292, and Clippy passed with and without gateway-stack.
Seed a lifecycle configuration so the admitted request removes real state.
Verified the matrix census and both refusal matrices in the CopyObject development checkout on 93947f22c.
Share authorization and pagination across both S3 edges. Resolve the
native upload claim using the owner from the same quorum-selected
metadata as the parts page. Preserve typed storage errors and write
the page through each edge's response projection.
The scoped suite includes all 98 storage access tests, real upload
sessions, stored-owner combinations, both wire paths, and the storage
API. Twenty-three fault modes exercised the owner, authorization,
lookup, error, counter, and projection assertions.
Validated 168 focused tests after restoring and recompiling the candidate
on c2b5fbb plus the isolated fixture cleanup. The owner matrix covers
three positive and six negative cases; each wire IAM matrix covers one
positive and seven negative cases. Both feature configurations passed
Clippy. Full migration acceptance lanes remain pending.
Abort the session returned by the successful matrix call through the
fixture store so later pagination assertions see their own sessions.
Both listing boundary tests failed on c2b5fbb and passed with the
fixture cleanup. Both refusal matrices passed with the same cleanup.
Share the incarnation-fenced lifecycle deletion across both edges, preserving reload and site-hook ordering and one audit record.
Validated 37 focused tests on 77da63397, both all-target Clippy configurations, script tests and wiring guards. Thirteen effective faults covered deletion, authorization wiring, incarnation fences, counting, reload and hook ordering, and audit behavior. Live peer delivery and final migration acceptance lanes remain unverified.
* perf(grpc): attribute rebuilds and bound bulk responses
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(grpc): attribute rebuild success after publication
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(obs): add exact HTTP/2 ping timeout diagnostics
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(multipart): run refusal matrix on large stack
Run the real-store completion refusal matrix through the shared 32 MiB test harness so its deep async storage future does not overflow libtest's default stack.
Keep the original test name and all refusal-order assertions intact.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* chore(deps): pin nixl-sys workspace source
Manage the nixl-sys Git revision from the workspace dependency table and point the optional Linux transport dependency at houseme/nixl commit cc636c83f13d692e85b67e55aed092413d16fb41.
Allow the reviewed source in cargo-deny and refresh the lockfile, replacing the unmaintained bincode dependency with the fork's wincode graph.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(rpc): authenticate msgpack peer capability
Add an optional boot-epoch-bound HMAC capability proof and cache the verified per-peer observation without enabling any msgpack send policy.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(grpc): bind peer capability to connection generations (#9433)
* feat(grpc): track physical connection generations
Observe every tonic physical reconnect through a stable custom connector while preserving existing TCP, TLS, HTTP/2, cache, and public channel behavior.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(rpc): bind msgpack capability to connections
Scope authenticated msgpack observations to channel identity and physical connection generation so transparent reconnects require a fresh proof without enabling the send policy.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Stage inline overwrite rollback backups (xl.meta.bkp) directly relative
to the pinned destination directory descriptor in RenameCommitGuard
instead of staging in .rustfs.sys/tmp and walking both paths a second
time. Also fuse post-commit xl.meta.bkp removal and empty-ancestor
directory pruning into a single blocking dispatch while stopping at live
object roots.
gVisor presents a host bind mount as 9p, so statfs reports V9FS.
When the mountinfo options include both trans=fd and directfs, the
startup filesystem guard treats that endpoint as local POSIX storage
and logs that the host type is not visible. Real 9p and virtio shares
still warn.
Co-authored-by: hector <majinghe@users.noreply.github.com>
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
* fix(iam): authorize delegated service account creation
* docs(iam): clarify explicit grants for custom administrator policies
* fix(iam): include service account delegation in admin wildcards
* style(policy): format delegated authorization test cases
* fix(iam): keep delegated authorization and replication consistent
* fix(ci): include delegated account test in E2E selections
* feat(diagnostics): restore allocator and runtime metrics
Port the missing live-byte accounting and serving-runtime observations from 13a30abca. Reuse the current MiMalloc GlobalAlloc wrapper, expose explicit metric availability, and cover allocation operations and feature selection.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(ecstore): detach queued fdatasync followers safely
Adapt the follower timeout experiment from 138bc69f6 with exclusive queue ownership transfer. Move queued paths and resource units into independent sync, retain claimed batch ownership through completion, and record observed queue time. Cover publication before the original batch resumes, sync failures, claimed batches, and queue accounting.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(ecstore): index sync followers and isolate missing sources
Use reusable slab slots and monotonic identities for constant-time queued follower extraction. Avoid retaining follower group references when the timeout is disabled. Preserve claimed-batch ownership and reject stale tickets after slot reuse.
Keep missing-source results local to their requests so healthy requests still synchronize their own files. Preserve fail-fast behavior for other disk I/O failures. Repair failure-probe synchronization and exercise source disappearance, reused slots, disabled tracking, cancellation and bounded admission on Linux.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(ci): apply storage stack to multipart refusal fixture
Route the real-store absent-binding refusal-order fixture through the existing bounded 4 MiB storage setup in both default and CI profiles. The Linux CI failure reproduced with the default 2 MiB stack. Quota, legal-hold, error, cause, audit and notification assertions execute through the established storage fixture budget.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): make sync worker idle handoff atomic
Move batch claim, in-flight accounting and completion onto the existing worker guard. Publish the idle state under the queue lock so an enqueue during cleanup establishes successor-worker ownership. Keep stale cleanup conditional on current ownership.
Add a controlled interleaving regression that detaches the final queued follower and enqueues a successor after the empty claim. The old worker leaves that request without an owner; the refactored worker hands it off and completes one physical sync.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(ecstore): await grouped sync resource release
Wait for native producer admission units to reach zero after the blocking sync finishes. This removes a scheduler-dependent assertion window exposed by the latest main integration while preserving the cancellation and ownership checks.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Share authorization between both CreateMultipartUpload edges. Keep the
decoded legacy fields intact, preserve the replication destination
version and apply the captured bucket incarnation before creating the
upload. Leave checksum, encryption and retention metadata on the same
storage path.
Verify the frozen legacy behavior on 2c2af51a before the migration and
exercise both stacks with 66 refusal cases and 22 success controls.
Read back sessions, version, retention and encryption metadata.
Fault probes made authorization tests fail on both edges when an action
or the resource binding was lost. Storage tests detected a different
destination version and unexpected sessions when generation, quota, KMS
or SSE checks were removed. The wire and
helper tests failed for early name rejection, lost timestamp precision,
metadata, checksum, SSE response, the operation count and unexpected
notification.
On 77da6339, 185 scoped tests passed with a 32 MiB test stack. The default
stack run passed 184 tests and reproduced the existing overflow in
completion_absent_binding_refusal_order_baseline. Both all-target
Clippy variants, test wiring, script tests and prepush passed. After
integration with 97a7639f, gateway all-target check and prepush passed.
Whole-workspace CI and rio-v2 were outside the local verification.
Share the streaming multipart write path and staged authorization across both edges. Resolve the native upload ID against the active storage record at the existing lookup. Carry checksums, trailers, SSE values and the stored ETag through each response projection.
Add seven tests for application lookup, route authorization, framing and durable part state. Exercise 62 refusals and 10 successful requests across those fixtures. The existing SSE-C completion test also covers the migrated UploadPart core.
Verification on 1467d32695: fixed legacy contract, 147 gateway-feature tests and 119 default tests, both all-target Clippy legs, script tests, test wiring and prepush checks. The test scopes include the entire access module. The gateway scope includes PutObject and both refusal matrices.
Twenty-two local fault controls exercised edge authorization, policy and generation, resource and upload ID projection, owner binding, lookup count and error ordering, logical length, trailer publication, checksum validation and typed producer errors. Each fault failed its intended test after the same artifact passed with the selector unset.
Linux RDMA and a native KMS denial through UploadPart remain unverified.
2026-11-15 13:41:36 +08:00
1248 changed files with 222487 additions and 60438 deletions
reason="Transitive rsa 0.9.10 pulled exclusively via openidconnect 4.1.0 <- rustfs-iam; direct workspace rsa consumers already upgraded to patched rsa 0.10.0 in PR #9492. Historical 2026-07 review window has expired and requires maintainer risk-acceptance sign-off or upstream openidconnect upgrade to rsa >=0.10.0 before promotion."
mitigation="crates/iam/src/oidc uses openidconnect only for public-key JWS ID-token verification and rejects signed or encrypted UserInfo responses (crates/iam/src/oidc/runtime.rs), exposing no remote RSA private-key decryption oracle on rsa 0.9.10. Track upstream openidconnect migration off rsa 0.9.x."
reason="chrono is marked unmaintained with no patched release; retained temporarily at compatibility boundaries and transitive datafusion/arrow/openidconnect dependencies during the jiff 1.0 migration reviewed in PR #9492."
mitigation="Informational unmaintained advisory with no CVE or memory-safety vulnerability; core server timestamp paths already migrated to jiff 1.0 in PR #9492 while remaining compatibility boundaries and upstream crates transition off chrono."
reason="chrono-tz is marked unmaintained with no patched release; pulled transitively by arrow-array 59.3.3 and datafusion-functions 55.3.0 during the jiff migration reviewed in PR #9492."
mitigation="Informational unmaintained advisory with no known security vulnerability; confined to transitive DataFusion/Arrow SQL timezone handling until upstream removes chrono-tz."
reason="humantime is marked unmaintained through chrono with no patched release; used by rustfs-madmin and transitively by object_store 0.13.2 / datafusion 55.3.0 as temporarily reviewed in PR #9492."
mitigation="Informational unmaintained advisory with no known security vulnerability; limited to duration formatting and tracked for removal alongside the remaining chrono/jiff migration."
# Rulings for the gateway conformance lane (.github/workflows/gateway-acceptance.yml).
#
# One row per case that fails on the GATEWAY stack for a reviewed reason: `case`; `ledger`, the
# rustfs/backlog#2684 entry that accepts the difference (R-0xx or K-n); a one-line `reason`; and
# `failure`, a prefix of the failure the ruling accepts, as the runner's report.json renders it
# (`[expect/status] at /expect/status: exchange #1, attempt 1: expected status 400, observed 403`).
# scripts/check_conformance_rulings.py fails the lane on a failed case without a row, on a ruled
# case whose failures do not start with its `failure`, and on a row whose case no longer fails or
# no longer exists. The legacy stack is a reference run and takes no rulings: the `rustfs` profile
# describes the gateway edge, not the legacy one.
# Rulings for the gateway conformance lane. Each row covers the exact failure diagnostic(s) for one case.
# Remove a row when the case passes. Review the referenced compatibility decision before expiry.
# Backlog #2684 registers both R/K entries and the legacy response heads in rustfs/gateway#1159.
# Official RustFS 1.0.5 and the gateway candidate both omit the region on a successful HeadBucket.
[[ruling]]
case="c-bkt-0008"
ledger="rustfs/gateway#1159"
reason="The RustFS profile preserves the absent bucket region on successful HeadBucket (rustfs/backlog#2684)."
failure="[expect/headers_present] at /expect/headers_present/x-amz-bucket-region: exchange #1, attempt 1: expected `x-amz-bucket-region: us-east-1`, observed no such header"
expires=2027-02-01
[[ruling]]
case="c-bkt-0009"
ledger="rustfs/gateway#1159"
reason="The RustFS profile preserves the absent bucket region on successful HeadBucket (rustfs/backlog#2684)."
failure="[expect/headers_present] at /expect/headers_present/x-amz-bucket-region: exchange #1, attempt 1: expected `x-amz-bucket-region: us-east-1`, observed no such header"
reason="The released and native hosts both close this HTTP/1 connection after serving the expected refusal."
failure="[expect/connection_after] at /expect/connection_after: exchange #1, attempt 1: expected the connection to be `open` afterwards, observed `closed`"
expires=2027-02-01
[[ruling]]
case="c-cred-0016"
ledger="rustfs/gateway#1120"
reason="The released and native hosts both close this HTTP/1 connection after serving the expected refusal."
failure="[expect/connection_after] at /expect/connection_after: exchange #1, attempt 1: expected the connection to be `open` afterwards, observed `closed`"
expires=2027-02-01
[[ruling]]
case="c-cred-0021"
ledger="rustfs/gateway#1120"
reason="The released and native hosts both close this HTTP/1 connection after serving the expected refusal."
failure="[expect/connection_after] at /expect/connection_after: exchange #1, attempt 1: expected the connection to be `open` afterwards, observed `closed`"
expires=2027-02-01
[[ruling]]
case="c-cred-0026"
ledger="rustfs/gateway#1120"
reason="The released and native hosts both close this HTTP/1 connection after serving the expected refusal."
failure="[expect/connection_after] at /expect/connection_after: exchange #1, attempt 1: expected the connection to be `open` afterwards, observed `closed`"
"[expect/error.code] at /expect/error/code: exchange #1, attempt 1: expected <Code>InvalidAccessKeyId</Code>, the body carried <Code>AccessDenied</Code>",
"[expect/body.contains_utf8] at /expect/body: exchange #1, attempt 1: the body does not contain \"<Code>InvalidAccessKeyId</Code>\"",
]
expires=2027-02-01
# Tracked IAM gap (R-065): https://github.com/rustfs/backlog/issues/2684#issuecomment-7163283798
[[ruling]]
case="c-cred-0020"
ledger="R-065"
reason="Tracked IAM gap (rustfs/rustfs#9559, rustfs/backlog#2684): expired STS session token returns 403 InvalidAccessKeyId instead of 400 ExpiredToken."
failures=[
"[expect/status] at /expect/status: exchange #1, attempt 1: expected status 400, observed 403",
"[expect/error.code] at /expect/error/code: exchange #1, attempt 1: expected <Code>ExpiredToken</Code>, the body carried <Code>InvalidAccessKeyId</Code>",
"[expect/body.not_contains_utf8] at /expect/body: exchange #1, attempt 1: the body must not contain \"InvalidAccessKeyId\", found at byte 52",
]
expires=2027-02-01
# Outer CORS middleware and HTTP/2 OPTIONS parity: https://github.com/rustfs/backlog/issues/2684#issuecomment-7163283798
[[ruling]]
case="c-cors-0034"
ledger="rustfs/gateway#1120"
reason="Official 1.0.5 parity (rustfs/backlog#2684): outer CORS middleware answers OPTIONS preflight 200 before bucket routing."
failures=[
"[expect/status] at /expect/status: exchange #1, attempt 1: expected status 403, observed 200",
"[expect/error.code] at /expect/error/code: exchange #1, attempt 1: expected <Code>AccessForbidden</Code>, the body carried no <Code> element at all",
"[expect/error.request_id_present] at /expect/error/request_id_present: exchange #1, attempt 1: expected <RequestId> to be present and non-empty, it was absent",
"[expect/headers_present] at /expect/headers_present/content-type: exchange #1, attempt 1: expected `content-type: application/xml`, observed no such header",
reason="Official 1.0.5 parity (rustfs/backlog#2684): outer CORS middleware answers OPTIONS preflight 200 before bucket routing."
failures=[
"[expect/status] at /expect/status: exchange #1, attempt 1: expected status 403, observed 200",
"[expect/error.code] at /expect/error/code: exchange #1, attempt 1: expected <Code>AccessForbidden</Code>, the body carried no <Code> element at all",
"[expect/error.request_id_present] at /expect/error/request_id_present: exchange #1, attempt 1: expected <RequestId> to be present and non-empty, it was absent",
"[expect/headers_present] at /expect/headers_present/content-type: exchange #1, attempt 1: expected `content-type: application/xml`, observed no such header",
reason="Official 1.0.5 parity (rustfs/backlog#2684): outer CORS middleware answers OPTIONS preflight 200 before bucket routing."
failures=[
"[expect/status] at /expect/status: exchange #1, attempt 1: expected status 403, observed 200",
"[expect/error.code] at /expect/error/code: exchange #1, attempt 1: expected <Code>AccessForbidden</Code>, the body carried no <Code> element at all",
"[expect/error.request_id_present] at /expect/error/request_id_present: exchange #1, attempt 1: expected <RequestId> to be present and non-empty, it was absent",
"[expect/headers_present] at /expect/headers_present/content-type: exchange #1, attempt 1: expected `content-type: application/xml`, observed no such header",
reason="Official 1.0.5 parity (rustfs/backlog#2684): outer CORS middleware handles OPTIONS without CORS headers without returning an S3 XML BadRequest body."
failure="[expect/error.code] at /expect/error/code: exchange #1, attempt 1: expected <Code>BadRequest</Code>, the body carried no <Code> element at all"
expires=2027-02-01
[[ruling]]
case="c-cors-0058"
ledger="rustfs/gateway#1120"
reason="Official 1.0.5 parity (rustfs/backlog#2684): outer CORS middleware answers half-preflight OPTIONS with empty 400 instead of S3 403 AccessForbidden XML."
failures=[
"[expect/status] at /exchanges/0/expect/status: exchange #1, attempt 1: expected status 403, observed 400",
"[expect/error.code] at /exchanges/0/expect/error/code: exchange #1, attempt 1: expected <Code>AccessForbidden</Code>, the body carried no <Code> element at all",
"[expect/error.request_id_present] at /exchanges/0/expect/error/request_id_present: exchange #1, attempt 1: expected <RequestId> to be present and non-empty, it was absent",
"[expect/status] at /exchanges/1/expect/status: exchange #2, attempt 1: expected status 403, observed 400",
"[expect/error.code] at /exchanges/1/expect/error/code: exchange #2, attempt 1: expected <Code>AccessForbidden</Code>, the body carried no <Code> element at all",
"[expect/error.request_id_present] at /exchanges/1/expect/error/request_id_present: exchange #2, attempt 1: expected <RequestId> to be present and non-empty, it was absent",
]
expires=2027-02-01
[[ruling]]
case="c-h2-0001"
ledger="rustfs/gateway#1120"
reason="Official 1.0.5 parity (rustfs/backlog#2684): outer CORS middleware serves OPTIONS over HTTP/2 with an empty body instead of S3 XML BadRequest."
failure="[expect/body.contains_utf8] at /expect/body: exchange #1, attempt 1: the body does not contain \"<Code>BadRequest</Code>\""
expires=2027-02-01
[[ruling]]
case="c-h2-0002"
ledger="rustfs/gateway#1120"
reason="Official 1.0.5 parity (rustfs/backlog#2684): outer CORS middleware serves OPTIONS over HTTP/2 with an empty body instead of S3 XML BadRequest."
failure="[expect/body.contains_utf8] at /expect/body: exchange #1, attempt 1: the body does not contain \"<Code>BadRequest</Code>\""
expires=2027-02-01
[[ruling]]
case="c-h2-0003"
ledger="rustfs/gateway#1120"
reason="Official 1.0.5 parity (rustfs/backlog#2684): outer CORS middleware answers OPTIONS with an empty body, so a 1-byte HTTP/2 flow-control window finishes immediately."
failures=[
"[expect/kind] at /expect/kind: exchange #1, attempt 1: expected the exchange to end as `hang`, it ended as `response`",
reason="Official 1.0.5 parity (rustfs/backlog#2684): outer CORS middleware serves OPTIONS over HTTP/2 with an empty body instead of S3 XML BadRequest."
failure="[expect/body.contains_utf8] at /expect/body: exchange #1, attempt 1: the body does not contain \"<Code>BadRequest</Code>\""
expires=2027-02-01
[[ruling]]
case="c-h2-0010"
ledger="rustfs/gateway#1120"
reason="Official 1.0.5 parity (rustfs/backlog#2684): outer CORS middleware serves OPTIONS over HTTP/2 with an empty body instead of S3 XML BadRequest."
failure="[expect/body.contains_utf8] at /expect/body: exchange #1, attempt 1: the body does not contain \"<Code>BadRequest</Code>\""
expires=2027-02-01
[[ruling]]
case="c-h2-0017"
ledger="rustfs/gateway#1120"
reason="Official 1.0.5 parity (rustfs/backlog#2684): outer CORS middleware serves OPTIONS over HTTP/2 with an empty body instead of S3 XML BadRequest."
failure="[expect/body.contains_utf8] at /expect/body: exchange #1, attempt 1: the body does not contain \"<Code>BadRequest</Code>\""
expires=2027-02-01
[[ruling]]
case="c-h2-0018"
ledger="rustfs/gateway#1120"
reason="Official 1.0.5 parity (rustfs/backlog#2684): outer CORS middleware serves OPTIONS over HTTP/2 with an empty body instead of S3 XML BadRequest."
failure="[expect/body.contains_utf8] at /expect/body: exchange #1, attempt 1: the body does not contain \"<Code>BadRequest</Code>\""
expires=2027-02-01
[[ruling]]
case="c-h2-0019"
ledger="rustfs/gateway#1120"
reason="Official 1.0.5 parity (rustfs/backlog#2684): outer CORS middleware answers OPTIONS with an empty body before the client RST_STREAM interrupts a response body."
failures=[
"[expect/kind] at /expect/kind: exchange #1, attempt 1: expected the exchange to end as `client_reset`, it ended as `response`",
"[expect/h2_control_frames] at /expect/h2_control_frames: exchange #1, attempt 1: received HTTP/2 control frames differ in count, order, or fields",
reason="Official 1.0.5 parity (rustfs/backlog#2684): outer CORS middleware answers OPTIONS with an empty body before the malformed RST_STREAM triggers a mid-body stream error."
failures=[
"[expect/kind] at /expect/kind: exchange #1, attempt 1: expected the exchange to end as `stream_error`, it ended as `response`",
"[expect/body_bytes_before_error] at /expect/body_bytes_before_error: exchange #1, attempt 1: expected 1 response bytes before the error, the transport did not record any",
reason="Official 1.0.5 parity (rustfs/backlog#2684): cleartext GET with SSE-C headers on an absent object returns 404 NoSuchKey instead of 400 InvalidRequest."
failures=[
"[expect/status] at /expect/status: exchange #1, attempt 1: expected status 400, observed 404",
"[expect/error.code] at /expect/error/code: exchange #1, attempt 1: expected <Code>InvalidRequest</Code>, the body carried <Code>NoSuchKey</Code>",
reason="Official 1.0.5 parity: single-region server rejects creating the foreign-region fixture bucket with status 400."
failure="[runner/fixture-refused] at /setup: external fixture PUT for bucket `conf-bkt-far` returned status 400; the failed create is not owned"
expires=2027-02-01
[[ruling]]
case="c-bucketconfig-0030"
ledger="rustfs/backlog#2684"
reason="Official 1.0.5 parity: GetBucketPolicyStatus on a bucket without a policy returns 200 instead of 404 NoSuchBucketPolicy."
failures=[
"[expect/status] at /expect/status: exchange #1, attempt 1: expected status 404, observed 200",
"[expect/error.code] at /expect/error/code: exchange #1, attempt 1: expected <Code>NoSuchBucketPolicy</Code>, the body carried no <Code> element at all",
"[expect/error.request_id_present] at /expect/error/request_id_present: exchange #1, attempt 1: expected <RequestId> to be present and non-empty, it was absent",
]
expires=2027-02-01
[[ruling]]
case="c-bucketconfig-0031"
ledger="rustfs/backlog#2684"
reason="Official 1.0.5 parity: GetPublicAccessBlock on an unconfigured bucket returns 500 instead of 404 NoSuchPublicAccessBlockConfiguration."
failure="[expect/status] at /expect/status: exchange #1, attempt 1: expected status 404, observed 500"
expires=2027-02-01
[[ruling]]
case="c-cred-0003"
ledger="rustfs/backlog#2684"
reason="Official 1.0.5 parity: static external-endpoint server has no fixture STS session token and returns 403."
failures=[
"[expect/status] at /expect/status: exchange #1, attempt 1: expected status 200, observed 403",
reason="Official 1.0.5 parity: unknown access key returns the standard S3 InvalidAccessKeyId error message instead of the redacted conformance text."
failures=[
"[expect/body.exact_utf8] at /expect/body: exchange #1, attempt 1: bodies differ at byte 86 (expected 201 bytes, observed 200 bytes)\n expected: …eyId</Code><Message>the request was not authenticated</Messa…\n observed: …eyId</Code><Message>The Access Key Id you provided does not …",
"[expect/body.not_contains_utf8] at /expect/body: exchange #1, attempt 1: the body must not contain \"does not exist\", found at byte 117",
]
expires=2027-02-01
[[ruling]]
case="c-cred-0009"
ledger="rustfs/backlog#2684"
reason="Official 1.0.5 parity: wrong secret key returns the standard S3 SignatureDoesNotMatch error message instead of the redacted conformance text."
failures=[
"[expect/body.exact_utf8] at /expect/body: exchange #1, attempt 1: bodies differ at byte 89 (expected 204 bytes, observed 356 bytes)\n expected: …atch</Code><Message>the request was not authenticated</Messa…\n observed: …atch</Code><Message>The request signature we calculated does…",
]
expires=2027-02-01
[[ruling]]
case="c-cred-0010"
ledger="rustfs/backlog#2684"
reason="Official 1.0.5 parity: unknown or disabled credential returns the standard S3 InvalidAccessKeyId error message instead of the redacted conformance text."
failures=[
"[expect/body.exact_utf8] at /expect/body: exchange #1, attempt 1: bodies differ at byte 86 (expected 201 bytes, observed 200 bytes)\n expected: …eyId</Code><Message>the request was not authenticated</Messa…\n observed: …eyId</Code><Message>The Access Key Id you provided does not …",
]
expires=2027-02-01
[[ruling]]
case="c-encryption-0012"
ledger="rustfs/backlog#2684"
reason="Official 1.0.5 parity: GetBucketEncryption on an unconfigured bucket returns 400 with hyphenated server-side wording instead of 404."
failures=[
"[expect/status] at /expect/status: exchange #1, attempt 1: expected status 404, observed 400",
"[expect/body.exact_utf8] at /expect/body: exchange #1, attempt 1: bodies differ at byte 124 (expected 250 bytes, observed 222 bytes)\n expected: …><Message>The server side encryption configuration was not f…\n observed: …><Message>The server-side encryption configuration was not f…",
]
expires=2027-02-01
[[ruling]]
case="c-host-0006"
ledger="rustfs/backlog#2684"
reason="Official 1.0.5 parity: virtual-host routing does not resolve this mid-domain Host header to path style and returns 404 XML."
failures=[
"[expect/status] at /expect/status: exchange #1, attempt 1: expected status 200, observed 404",
reason="Official 1.0.5 parity: NoSuchLifecycleConfiguration message includes a trailing period and omits HostId."
failures=[
"[expect/body.exact_utf8] at /expect/body: exchange #1, attempt 1: bodies differ at byte 138 (expected 220 bytes, observed 192 bytes)\n expected: …ation does not exist</Message><RequestId>__REDACTED__</Reque…\n observed: …ation does not exist.</Message><RequestId>__REDACTED__</Requ…",
]
expires=2027-02-01
[[ruling]]
case="c-location-0001"
ledger="rustfs/backlog#2684"
reason="Official 1.0.5 parity: single-region server rejects creating the foreign-region fixture bucket with status 400."
failure="[runner/fixture-refused] at /setup: external fixture PUT for bucket `conf-location-far` returned status 400; the failed create is not owned"
expires=2027-02-01
[[ruling]]
case="c-location-0005"
ledger="rustfs/backlog#2684"
reason="Official 1.0.5 parity: GetBucketLocation accepts the request and returns 200 LocationConstraint instead of 400 AuthorizationHeaderMalformed."
failures=[
"[expect/status] at /expect/status: exchange #1, attempt 1: expected status 400, observed 200",
"[expect/error.code] at /expect/error/code: exchange #1, attempt 1: expected <Code>AuthorizationHeaderMalformed</Code>, the body carried no <Code> element at all",
"[expect/error.request_id_present] at /expect/error/request_id_present: exchange #1, attempt 1: expected <RequestId> to be present and non-empty, it was absent",
"[expect/body.contains_utf8] at /expect/body: exchange #1, attempt 1: the body does not contain \"<Code>AuthorizationHeaderMalformed</Code>\"",
"[expect/body.contains_utf8] at /expect/body: exchange #1, attempt 1: the body does not contain \"<Region>us-east-1</Region>\"",
"[expect/body.not_contains_utf8] at /expect/body: exchange #1, attempt 1: the body must not contain \"<LocationConstraint\", found at byte 38",
]
expires=2027-02-01
[[ruling]]
case="c-lock-0011"
ledger="rustfs/backlog#2684"
reason="Official 1.0.5 parity: ObjectLockConfigurationNotFoundError XML omits the HostId element."
reason="Official 1.0.5 parity: escaped slash in the first path segment fails signature verification (403 SignatureDoesNotMatch) before bucket-name validation."
failures=[
"[expect/status] at /expect/status: exchange #1, attempt 1: expected status 400, observed 403",
"[expect/error.code] at /expect/error/code: exchange #1, attempt 1: expected <Code>InvalidBucketName</Code>, the body carried <Code>SignatureDoesNotMatch</Code>",
"[expect/body.contains_utf8] at /expect/body: exchange #1, attempt 1: the body does not contain \"<Code>InvalidBucketName</Code>\"",
]
expires=2027-02-01
[[ruling]]
case="c-replication-0013"
ledger="rustfs/backlog#2684"
reason="Official 1.0.5 parity: ReplicationConfigurationNotFoundError carries the legacy 'replication not found' message."
failures=[
"[expect/body.exact_utf8] at /expect/body: exchange #1, attempt 1: bodies differ at byte 105 (expected 230 bytes, observed 179 bytes)\n expected: …rror</Code><Message>The replication configuration was not fo…\n observed: …rror</Code><Message>replication not found</Message><RequestI…",
]
expires=2027-02-01
[[ruling]]
case="c-sig-0506"
ledger="rustfs/backlog#2684"
reason="Official 1.0.5 parity: SigV2 request using x-amz-date with an empty Date slot is rejected with 400."
failures=[
"[expect/status] at /expect/status: exchange #1, attempt 1: expected status 200, observed 400",
"[expect/body.contains_utf8] at /expect/body: exchange #1, attempt 1: the body does not contain \"<ListAllMyBucketsResult\"",
]
expires=2027-02-01
[[ruling]]
case="c-sig-0597"
ledger="rustfs/backlog#2684"
reason="Official 1.0.5 parity: empty credential scope region returns SignatureDoesNotMatch for both header and presigned exchanges."
failures=[
"[expect/error.code] at /exchanges/0/expect/error/code: exchange #1 header, attempt 1: expected <Code>InvalidAccessKeyId</Code>, the body carried <Code>SignatureDoesNotMatch</Code>",
"[expect/body.contains_utf8] at /exchanges/0/expect/body: exchange #1 header, attempt 1: the body does not contain \"<Code>InvalidAccessKeyId</Code>\"",
"[expect/error.code] at /exchanges/1/expect/error/code: exchange #2 presigned, attempt 1: expected <Code>AccessDenied</Code>, the body carried <Code>SignatureDoesNotMatch</Code>",
"[expect/body.contains_utf8] at /exchanges/1/expect/body: exchange #2 presigned, attempt 1: the body does not contain \"<Code>AccessDenied</Code>\"",
]
expires=2027-02-01
[[ruling]]
case="c-sig-0599"
ledger="rustfs/backlog#2684"
reason="Official 1.0.5 parity: out-of-grammar credential scope region returns 403 SignatureDoesNotMatch instead of 400 AuthorizationHeaderMalformed."
failures=[
"[expect/status] at /expect/status: exchange #1, attempt 1: expected status 400, observed 403",
"[expect/error.code] at /expect/error/code: exchange #1, attempt 1: expected <Code>AuthorizationHeaderMalformed</Code>, the body carried <Code>SignatureDoesNotMatch</Code>",
"[expect/body.contains_utf8] at /expect/body: exchange #1, attempt 1: the body does not contain \"<Code>AuthorizationHeaderMalformed</Code>\"",
"[expect/body.contains_utf8] at /expect/body: exchange #1, attempt 1: the body does not contain \"<Region>us-east-1</Region>\"",
]
expires=2027-02-01
[[ruling]]
case="c-sig-0600"
ledger="rustfs/backlog#2684"
reason="Official 1.0.5 parity: overlong credential scope region returns SignatureDoesNotMatch instead of InvalidAccessKeyId."
failures=[
"[expect/error.code] at /expect/error/code: exchange #1, attempt 1: expected <Code>InvalidAccessKeyId</Code>, the body carried <Code>SignatureDoesNotMatch</Code>",
"[expect/body.contains_utf8] at /expect/body: exchange #1, attempt 1: the body does not contain \"<Code>InvalidAccessKeyId</Code>\"",
]
expires=2027-02-01
[[ruling]]
case="c-sig-0604"
ledger="rustfs/backlog#2684"
reason="Official 1.0.5 parity: unsigned x-amz-* metadata header returns AccessDenied after credential lookup instead of SignatureDoesNotMatch."
failure="[expect/error.code] at /expect/error/code: exchange #1, attempt 1: expected <Code>SignatureDoesNotMatch</Code>, the body carried <Code>AccessDenied</Code>"
expires=2027-02-01
[[ruling]]
case="c-sig-0605"
ledger="rustfs/backlog#2684"
reason="Official 1.0.5 parity: presigned URL with unlisted payload declaration header returns AccessDenied instead of SignatureDoesNotMatch."
failure="[expect/error.code] at /expect/error/code: exchange #1, attempt 1: expected <Code>SignatureDoesNotMatch</Code>, the body carried <Code>AccessDenied</Code>"
"basis":"Exactly the two previous-release sources pinned in .github/workflows/e2e-upgrade.yml are exercised today (source.version / source.asset / source.sha256). No other N-1/N-2 compatibility is claimed, and these digests are not inferred from tags.",
"basis":"The three previous-release sources pinned in .github/workflows/e2e-upgrade.yml are exercised today (source.version / source.asset / source.sha256). No other N-1/N-2 compatibility is claimed, and these digests are not inferred from tags.",
"rollback_basis":"Only the bucket-config-rollback case (rollback_to_previous_release_reads_current_bucket_metadata) is exercised. Full data-plane rollback is not certified and is never a default claim."
"rollback_basis":"The release upgrade lane checks bucket-configrollback. The hosted compatibility workflow also checks in-flight multipart rollback to 1.0.5. Full data-plane rollback is not certified and is never a default claim."
**Use this when** validating inline placement, block geometry, Range reads and reader rollback in a task-owned local Docker cluster.
The adapter reuses the repository's four-node compose topology with 16 logical Docker volumes and EC12+4. It binds one S3 port to loopback, keeps strict durability and checks running binary hashes and persisted object geometry. Docker volumes share the host storage substrate. Performance observations describe this local virtualized lab.
## Build a frozen server image
Use the current stable toolchain pinned in the lab Dockerfile. Supply a Git bundle and the metadata inspector source as the build context. The server is compiled from a clean checkout before the diagnostic example is added.
```bash
set -euo pipefail
LAB_BUILD_DIR="$(mktemp -d)"
LAB_REVISION="$(git rev-parse HEAD)"
git bundle create "$LAB_BUILD_DIR/repository.bundle" HEAD
Select a new compose project and a private state directory. The adapter generates test credentials there. Existing resources require matching ownership labels. Configure checks the image's source revision and pins immutable image IDs. Each operation takes an exclusive state lock. Deployment waits for `/health/ready` on every node, covering storage, IAM, lock quorum and peer dependencies.
The probe verifies complete bytes, HEAD sizes, Range contents, EC12+4 and the actual persisted block. It records inline markers for 4 KiB, 1 MiB, 1 MiB + 1 byte, 1.25 MiB, 1,572,856 bytes, 1,572,857 bytes and 1.5 MiB objects in `probe.json`. The server-only image includes the existing filemeta decoder through a small geometry inspector. Console assets and the administration CLI are outside this lab image.
## ABBA deployment hook
Use `inline_docker_lab.py ... deploy` in the existing `run_hotpath_warp_abba.sh` external deploy hook. Export `RUSTFS_ERASURE_SHARD_BYTES` according to `HOTPATH_ABBA_PHASE`. The adapter uses the supplied leg, phase, bucket, binary and evidence-file context, resets only owned lab volumes, checks running configuration and binary hashes, creates the fresh bucket and writes the runner's deployment evidence.
Use the same frozen binary for both sides of a geometry experiment. Fix the inline budget and encoding mode, then compare zero with one candidate shard value. Include the CPU, memory and image identities from every node in each result. The state `config.json` supplies the generated test credentials for the load driver. Set `DOCKER_CONTEXT` to the selected context when the driver captures Docker resource snapshots.
For content compatibility across an image or geometry change, configure the next selected image and artifact using the same state, then deploy with `--keep-data` and an existing bucket. This retains owned volumes. Compare existing objects and version IDs with the manifest prepared before the change.
## Cleanup
```bash
scripts/python_bin.sh scripts/inline_docker_lab.py --state-dir "$LAB_STATE" down --purge
```
Cleanup checks ownership for containers, volumes and networks. A configuration cannot adopt another project's resources. Raw measurements, state, Git bundles and build outputs stay in task artifact directories.
Unit checks run with `scripts/python_bin.sh scripts/test_inline_docker_lab.py` and are included in `make script-tests`.
## Linux content-probe client
The PUT after-probe requires a working `mc`. For a macOS client affected by cgo initialization failures, compile the same frozen public mc module for Linux with CGO disabled, build it with `Dockerfile.mc`, and use `scripts/inline_docker_mc.sh` as the process-local `mc` command. Record the module version, checksum and resulting image ID with the run.
The adapter rewrites only the lab loopback alias endpoint to the private `node1` endpoint. Alias configuration stays in the probe's own `MC_CONFIG_DIR`, and `cat` streams raw bytes. The existing HEAD, GET and hash checks continue to execute.
`deploy --rpc-mode json-compat` explicitly clears both MessagePack-only flags on every node. `deploy --rpc-mode msgpack-only` enables both flags for the selected homogeneous lab fleet. Deployment evidence records the mode and checks both running flags. The default is `json-compat`. The ABBA hook may select the same mode through `RUSTFS_INLINE_LAB_RPC_MODE`.
First compare the base and bounded-multi-block binaries at `--shard-bytes 0` in JSON compatibility mode. Then repeat with MessagePack-only on both sides. A same-binary transport ABBA isolates the encoding effect. Keep the 128 KiB budget, CPU sets, strict durability, load and object set fixed. Check actual markers and block sizes at the boundary sizes before timing. Retain baseline-drift and candidate gates, error logs and raw request distributions.
For a rolling downgrade, redeploy the current binary with `--keep-data --rpc-mode json-compat` before introducing an older node. Check old and new reads, version IDs and batch deletes against the persisted manifest. A running MessagePack-only flag pair establishes the lab configuration. Compatibility with a particular old reader requires the explicit reader test.
## Preserve a compatibility manifest
Run the seed once in a fresh lab bucket. It records full byte oracles and the observed version inventory, including any additional version matching a known body, and leaves a 5 MiB multipart part ready for the next reader. Each bucket has its own private `compat-<bucket>.json` manifest. Keep the same state and volumes across image changes. A fresh deployment or cleanup that resets volumes moves existing compatibility manifests into `compat-history`. Retained-data deployments preserve the active manifests.
The check compares every persisted version ID, HEAD length, complete SHA256, cross-block Range and per-version geometry from `xl.meta`. The seed includes zero-length objects, null versions, the 192 KiB versioned admission boundary and the accumulated 128 KiB shard boundary. Seed a second bucket on the new writer before the downgrade, then check both manifests using the selected old reader. Complete an old upload on the new binary and a new upload on the old binary. After returning to the current fleet, `compat-delete --bucket <bucket>` deletes the recorded versions in one S3 batch and checks the exact remaining inventory and bytes.
Successful multipart-completion and batch-delete receipts are saved before subsequent content and geometry checks. If either check fails, rerun the same command with the same state directory to resume verification from the saved completion state. After a seed check fails with a saved manifest, use `compat-check` to resume verification.
For mixed-version testing, retain JSON compatibility mode throughout the rolling replacement. Verify each node's immutable image and binary, then perform manifest checks and new writes through both coordinator versions using `--coordinator node1` and `--coordinator node4`. The manifest records the actual writer coordinator revision from the running image. Stop one owned node to check read availability at EC12+4, restore it and check the manifests again. Record the exact oldest tested source revision, toolchain and build profile with the evidence. The version boundary is established by these executed cells.
An owned lab can replace just its fourth node through a compose image override. Select the frozen old image first and verify its revision label. Keep `compose.json` in JSON compatibility mode for this cell.
Inspect all four running image IDs and binary hashes before recording the mixed-fleet result. Redeploy the configured current image with `--keep-data --rpc-mode json-compat` to restore a homogeneous fleet. The same manifest checks apply after stopping and restarting one owned node through the base compose file.
@@ -34,6 +34,10 @@ If you want the Kafka-backed HA Tempo path, use `docker-compose-example-for-rust
- **High Performance**: Optimized configurations for batching, compression, and memory management.
- **Standardized Protocols**: Built entirely on OpenTelemetry standards.
## HTTP Request Latency Percentiles
The main RustFS dashboard shows request latency percentiles in milliseconds. The HTTP server request, response-body chunk, and response-body stream histograms export bucket boundaries in seconds. During a rolling upgrade or rollback that changes the bucket layout, compute percentiles from nodes that share one layout and from a query window entirely on that layout. The bundled dashboard and recording rules use a five-minute window. The mean from `_sum` divided by `_count` remains usable across the change.
## GET Performance Optimization Dashboards
Three pre-built Grafana dashboards are included for monitoring RustFS GET performance optimization rollout:
@@ -22,6 +22,8 @@ Identify the tested commit and any local changes. When testing a prebuilt binary
List relevant checks not run and the remaining risk. Use the validation tier in AGENTS.md; do not run broader checks solely to fill this section. For documentation-only changes, list the applicable documentation checks. Use N/A only when verification is not applicable.
-->
**auto-testing regression coverage** <!-- For each issue-backed bug fix, give the added or extended case ID or PR link, the existing case ID/path and assertion that catches the bug, or "Skipped" with a brief reason. Omit this line for other changes, including documentation-only fixes. -->
## Impact
<!--
Describe user-facing, compatibility, API, deployment, configuration, or documentation impact. Use N/A when there is no expected impact.
@@ -43,7 +43,7 @@ A hosted runner is also the only choice for a few things the pods cannot do: `mo
`Swatinem/rust-cache` builds its key from the OS, architecture, toolchain and lockfile. It does not include the runner label or image, so a cache written on an `sm-standard-4` pod and one written on `ubuntu-latest` would overwrite each other under the same `shared-key`.
- Every `shared-key` has exactly one writer. `cache-warm.yml` owns `ci-dev`,`ci-feat-rio`,`ci-feat-proto` and `ci-uring`; every other `./.github/actions/setup` call states `cache-save-if` explicitly, and `scripts/security/check_cache_save_if.sh` fails the build when one does not.
- Every `shared-key` has exactly one writer. `cache-warm.yml` owns `ci-dev`, `ci-feat-proto` and `ci-uring`; every other `./.github/actions/setup` call states `cache-save-if` explicitly, and `scripts/security/check_cache_save_if.sh` fails the build when one does not.
- The `ci-dev` key ends in a digest of `warm-ci-dev`'s build commands. Changing what that job warms therefore needs a new key, or readers keep restoring the old artifacts: `scripts/ci_gate.py --check-workflow` prints the key the commands require and fails until the writer and every reader in `ci.yml` and `reference-parity.yml` name it.
- All readers of a key run on the same image as its writer. Keys that live on hosted runners say so in their name (`ci-uring` is warmed on `ubuntu-latest`; `ci-e2e-distributed-hosted`, `e2e-upgrade-server-hosted`, `e2e-upgrade-tests-hosted`).
- Moving a job between pools therefore means renaming its key. The new key is empty until a run from `main` (a scheduled run, or a manual dispatch of that workflow from `main`) saves it; until then that lane does a cold build. The `build.yml` aarch64 release legs append `-ubicloud-arm` for this reason. `cache-warm.yml` does not write those keys.
@@ -80,6 +80,18 @@ Do not commit one-shot plans, trackers, migration ledgers, benchmark snapshots,
Select checks from the final task-owned diff. Scoped `AGENTS.md` files may add a concrete path-specific check, but must not replace this tiering with a generic full-workspace gate.
### Issue Fixes and External Regression Coverage
After fixing a bug tracked by an issue and running the applicable local checks, ask the developer once per fixed issue whether to cover it in [rustfs/auto-testing](https://github.com/rustfs/auto-testing). Ask before opening or updating the fix PR, or before reporting completion if there is no PR. Reuse a choice already made for that fix. Investigation alone and documentation-only changes do not trigger this prompt.
When presenting the three choices, describe the failing scenario and the assertion that would catch it.
- **Add or extend a case.** Prefer extending an existing scenario when it can exercise the regression. Record the resulting case ID or auto-testing PR link.
- **Already covered.** Cite the existing auto-testing case ID or path and the assertion that would catch this bug.
- **Skip.** Record the developer's one-line reason and continue with the fix.
Record the choice in the PR's Verification section or in the completion report for work without a PR. All three choices retain the applicable RustFS verification requirements below.
### Documentation and Instructions
For prose, comments, agent instructions, and skill metadata that cannot affect runtime/build output:
@@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Deployment
- **The S3 protocol stack is now rustfs/gateway**, and it is the only S3 stack. The legacy s3s-based stack is removed, and so are the `RUSTFS_S3_STACK` environment variable and the `gateway-stack` cargo feature. There is no on-disk format change. `RUSTFS_S3_STACK` no longer selects anything: a server started with it set, to any value, refuses to start and prints `RUSTFS_S3_STACK is no longer supported; the gateway stack is the only S3 stack since <version>`, where `<version>` is the release's version. Remove the variable from service units, container environments, Helm values and orchestration files before upgrading. To roll back, follow the [S3 stack rollback procedure](docs/operations/s3-stack-rollback.md).
- Before upgrading, verify that the configured root access key is at least 3 bytes and the root secret key is at least 8 bytes. RustFS now rejects shorter values at startup and identifies the setting to update. Version 1.0.5 accepted these settings at startup and returned HTTP 500 when root requested STS credentials. Coordinate root credential changes across all nodes and clients. See [root credential rotation considerations](docs/operations/two-factor-auth.md#root-credentials-cannot-be-changed-at-runtime).
- Existing volumes created by older root-running container images must be writable by the non-root runtime identity before upgrading. The default container UID/GID is `10001:10001`; stop the affected instances, verify host mount paths, and for ordinary bind mounts run `sudo chown -R 10001:10001 /actual/data /actual/logs` on each RustFS data/log mount. Account for ACLs, NFS, Kubernetes, and rootless UID mappings. Image-build ownership changes do not migrate mounted data. See the Docker Quick Start in [README.md](README.md).
@@ -44,6 +46,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- **SSE-C multipart and copy responses no longer carry `x-amz-server-side-encryption`**: `CreateMultipartUpload`, `UploadPart`, `UploadPartCopy` and `CompleteMultipartUpload` on an SSE-C upload, and `CopyObject` to an SSE-C destination, answered with `x-amz-server-side-encryption: AES256` next to the customer-key headers, so a client reading the response saw an SSE-S3 object. They now return only `x-amz-server-side-encryption-customer-algorithm` and `x-amz-server-side-encryption-customer-key-MD5`, as `PutObject`, `GetObject` and `HeadObject` already did. SSE-S3 and SSE-KMS responses are unchanged.
- **Vault KMS backends no longer fail when the server answers reads from a replica**: a Vault or OpenBao node that serves reads locally (an OpenBao standby, a Vault Enterprise performance standby) can return the state from before a write for a short while after acknowledging it. Against such a node the KV2 backend failed every key creation with `404 Key not found` while leaving the key stored without its description and tags, failed operations issued right after a create or update with `Key not found` or `Concurrent modification`, and the Transit backend failed a disable followed quickly by an enable. Key creation on the KV2 backend is now a single create-only write that carries the description and tags. Both backends now re-read a key record when the answer is older than a write the same RustFS node made in the previous five seconds, pause before re-reading after a lost check-and-set write and allow five attempts instead of three, and retry a Transit key delete that is refused because the deletion switch is not visible yet. A different RustFS node reading the same replica can still observe the earlier state until the replica catches up; see [OpenBao as the Vault KMS backend](docs/operations/kms-openbao-compatibility.md).
- **KMS keys could not be described by ARN through the path route**: `GET /rustfs/admin/v3/kms/keys/{key_id}` read the path segment verbatim, so a key id that has to be percent-encoded to fit in one segment — an AWS key ARN, with its `:` and `/` — was looked up, authorized and audited under its encoded spelling and answered `404`. The segment is now percent-decoded first; a segment that is not valid UTF-8 after decoding is refused with `400 InvalidArgument`. The `describe-key?keyId=` form was unaffected.
@@ -114,6 +118,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Four-layer regression-prevention tests guard against silent feature deletion: compile-time module assertion, module-presence unit test, cross-module `Protocol` enum assertion, end-to-end SSH banner test against the running binary
### Changed
- **Startup reports the state of `RUSTFS_SSE_S3_MASTER_KEY`**: the server now checks the local SSE-S3 master key when it starts and logs one `sse_local_master_key` event with `state``loaded`, `not_set`, or `invalid`. An unusable value used to surface only as a `400 InvalidRequest` on the first SSE-S3 request served without a KMS; it is now logged as an error at startup with the reason. Startup still succeeds and request behavior is unchanged. The line "Using RUSTFS_SSE_S3_MASTER_KEY for SSE-S3 (KMS not configured)", logged when the key was first used, is replaced by this event.
- **Scanner bucket walkers are no longer tied to the disk count**: a new scanner key `walkers_per_disk` (`RUSTFS_SCANNER_WALKERS_PER_DISK`, `1` through `16`, default `1`) spawns that many bucket walkers per local disk of an erasure set, so a single-disk deployment can walk several buckets at once instead of one bucket, one object at a time. The walkers of one disk share its scanner admission, so a peer still sees one scan session per physical disk, and remote disks keep one walker. The walker count is what `max_concurrent_disk_scans` caps and the disk count stays the floor; the `disk_concurrency_budget` log line now reports `walkers_per_disk`, `walkers`, and the `reason` for the effective limit. The default keeps today's I/O profile because a local disk cannot yet report whether it is rotational; the design intends a higher default on flash once it can (`docs/architecture/scanner-per-bucket-convergence.md`). As groundwork for pacing, the raw-enumeration page writer inserts into its building page in place and commits pages without copying them, and a regression test pins the cost of recording 20,000 entries in one prefix so the quadratic bookkeeping removed by [#8114](https://github.com/rustfs/rustfs/pull/8114) (rustfs#8113) cannot return. No persisted format, protocol or admin API changes beyond the additional config key, which older releases preserve and ignore.
- **Encryption and KMS work merged since `1.0.0-rc.5`** (entries were missing from this section):
- **Persisted KMS configuration secrets** are sealed field-by-field with `RUSTFS_KMS_CONFIG_SECRET`. **When the variable is unset the secrets are persisted in cleartext and the server only warns** (`persisted KMS configuration carries cleartext secrets`); it never refuses the write. Set it, identically, on every node, and re-save the configuration to seal an existing one.
@@ -106,6 +106,8 @@ when restoring `/rustfs/console` for a custom OEM build.
## Distributed endpoint locality
- `RUSTFS_LOCAL_ENDPOINT_HOST` identifies this server's host in a distributed `RUSTFS_VOLUMES` topology without resolving every peer during startup. Set it to exactly one host, without a scheme, port, or path. It is accepted only for orchestrated URL topologies and must match at least one endpoint on the RustFS server port; invalid or unmatched values fail startup. Leave it unset to retain DNS-based locality discovery.
- DNS-based discovery resolves each configured hostname once successfully per startup and reuses the result across drives and pools. If discovery finds no local endpoint, startup exits before opening the service listener. Check that this member's advertised hostname resolves to an address on a local interface and that its endpoint port matches `RUSTFS_ADDRESS`. The next start resolves the hosts again.
- A finite, positive `RUSTFS_STARTUP_TOPOLOGY_WAIT_TIMEOUT` bounds how long endpoint discovery waits for DNS, including lookups and retry delays. If it expires during startup, the CLI reports the error and exits without waiting for an already-running system resolver call.
## Scanner environment aliases
@@ -129,6 +131,12 @@ when restoring `/rustfs/console` for a custom OEM build.
- `RUSTFS_SCANNER_READ_ONLY_HANDOFF=true` enables reuse of unpublished scanner progress across verified read-only process restarts. Unset, false or invalid values disable both identity restoration and receipt creation. Existing receipts are still durably consumed before recovery starts, even when the feature is disabled.
- Deploy receipt-aware readers to every possible writer before enabling this flag. Before rolling back to an older binary, disable it on every node, start each node with all its drives present, wait for readiness, and shut down cleanly. Do not start the older binary until every node completes this preparation. Direct rollback after enabling receipt writes is unsupported: older startup/recovery paths can write without durably invalidating the receipt. See [the receipt and rollback contract](../../docs/architecture/scanner-usage-publication.md#read-only-restart-continuity).
Scanner cycle budget controls:
@@ -302,6 +310,8 @@ Drive timeout profile preset:
RustFS production guidance remains direct-attached local POSIX filesystems. Network-mounted filesystems (for example `nfs`, `cifs`, `smb2`, and `fuse.*`) are treated as unsupported by this startup guard. On Windows, endpoints on network drives (UNC shares such as `\\server\share` and mapped drive letters) are treated the same way, even though Windows reports the server's filesystem (usually `NTFS`) for them.
A local POSIX filesystem bind-mounted into a gVisor sandbox with directfs is a supported storage path. gVisor presents that bind mount as `9p`/`V9FS`, so the host filesystem type is not visible; the startup guard recognizes mountinfo options `trans=fd` and `directfs` and does not treat the mount as unsupported. Genuine 9p, virtio, and NFS shares remain unsupported.
## 📄 License
This project is licensed under the Apache License 2.0 - see the [LICENSE](../../LICENSE) file for details.
/// - Note: Enabling auto-heal can improve system resilience by automatically addressing issues, but may increase resource usage; evaluate based on your operational requirements.
| **upgrade compatibility** | `upgrade_compatibility_test` | Pinned previous-release writes followed by current-build reads on the same data directory |
| **dual-stack differential** | `dual_stack_differential` | Two single-node servers answer one SDK script for all 73 S3 operations and every differing `(op, field, a, b)` is reported. Side A is the binary under test on `RUSTFS_S3_STACK=legacy`; side B runs `RUSTFS_E2E_STACK_B`. Set`RUSTFS_E2E_REFERENCE_BINARY`to a released `rustfs` binary to make side A that binary instead (started without `RUSTFS_S3_STACK`, which older releases do not know). A missing, non-file or non-executable path fails the run; it never skips or falls back to the same-binary mode. The report in `<target>/dual-stack/<run>.json` records `reference_side` and each side's `--version` output |
| **dual-stack differential** | `dual_stack_differential` | Two single-node servers answer one SDK script for all 73 S3 operations and every differing `(op, field, a, b)` is reported. Both sides run the binary under test on its only (gateway) stack unless`RUSTFS_E2E_REFERENCE_BINARY`names a released `rustfs` binary, which then runs side A. A missing, non-file or non-executable path fails the run; it never skips or falls back to the same-binary mode.`RUSTFS_E2E_STACK_B_REGION` starts side B in another region to inject a difference. The report in `<target>/dual-stack/<run>.json` records `reference_side` and each side's `--version` output |
The external-tool `storage_metric_ownership_test` validates the OTLP/Collector/Prometheus path, including a rolling upgrade and node failures. See the [storage metrics guide](../../docs/operations/storage-metrics.md) for its required binaries and focused command.
@@ -192,7 +192,7 @@ the same profile for membership and execution with one nightly worker.
| KMS suite | `e2e-full` job, merge queue + main | **Active** |
| Direct and mixed-version rolling upgrades from pinned previous release | `e2e-upgrade.yml`, release tags + weekly schedule + manual dispatch | **Active** |
@@ -211,6 +211,8 @@ the wiring source of truth. Committed test-ID digests under
**Endpoint blackhole scenario skipped** — `heal_erasure_disk_rebuild_test::tests::test_cluster_root_heal_recovers_after_target_endpoint_blackhole` installs a loopback `iptables` DROP rule and therefore needs `CAP_NET_ADMIN` (root or passwordless `sudo -n iptables`). A host where `iptables` is missing or cannot read the OUTPUT chain (typical inside an unprivileged container, where the nf_tables backend reports "Permission denied" even under `sudo`) logs a `heal_interruption_skipped` warning and returns without exercising heal. Set `RUSTFS_E2E_REQUIRE_NET_FAULT_INJECTION=1` on lanes that do provision the capability so a broken runner fails instead of skipping.
The full suite compares persisted bucket configurations and object records against the release pinned in `.config/reference-binary.toml`. Set `RUSTFS_PERSISTENCE_REFERENCE_BINARY` to the verified executable and `RUSTFS_PERSISTENCE_CLOCK_LIBRARY` to the absolute path of libfaketime (`libfaketime.so.1` on Linux or `libfaketime.1.dylib` on macOS). To retain the two sets of 13 XML documents for the gateway golden corpus, set `RUSTFS_PERSISTENCE_XML_DIR` to an output directory. CI includes them in the full suite's JUnit artifact.
**Reproduce a CI failure locally** — run the exact profile/lane:
"MPU mixed degraded: one offline disk, three missing part directories; previous returned empty, current returned 503 SlowDownRead; original part restored on both"
"MPU mixed degraded: one offline disk, three missing part directories; checked each coordinator against its release contract; original part restored on both"
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.