Repository navigation
Conversation
Add ENC-201..ENC-210 to rustfs-s3-compat-test.sh and KMS-601..KMS-609 to rustfs-kms-test.sh. They state what a client must observe from server-side encryption, exactly: a response carries the SSE headers of its scheme and no other SSE header, a refusal has the expected HTTP status and S3 error code, a HEAD after a refused write answers 404, and data read back matches by SHA-256 and Content-Length. The older S3C-90x, ENC-1xx and KMS-3xx cases accept a successful command with matching bytes and match refusals against loose patterns; they are unchanged. Both suites run the cases through scripts/sse_contract_cases.py, a standard-library helper that talks only to the suite's endpoint, the way the bulk-delete regressions are run. It exits 0 or 1 and never 2, which run_test reads as UNSUPPORTED; a wrong command line exits 64. The ENC cases rely on the S3 suite's server having a local master key and no KMS. The KMS cases take the suite's default key id and create two more keys through the admin API; they run after KMS-318, before the per-key authorization and fault cases. test_sse_contract_cases.py runs every case against an in-memory S3 that behaves as required, then with one behavior wrong at a time, and requires the matching case to fail and name what it saw. It also pins the registration in both suites and checks the SigV4 signature against botocore when that is installed. The cases are catalogued as s3.compatibility.enc-2xx and source-procedure.kms.kms-6xx, and the implementation review digests are refreshed for the two suites and the catalog. Verified against local single-process servers started with each suite's environment (master key only; Local and Vault KV2 KMS, also with per-key enforcement and frame v2), through the suites' own run_all_tests. Not yet run on the fleet.
Conflicts: README.md keeps main's Veeam SOSAPI and request-id sections followed by the strict SSE section; s3-script-tests.yml keeps main's standalone probe step and adds test_sse_contract_cases.py to the S3 step; validation-migration-review.json takes main's ledger plus this branch's evidence sentence. Also count the nineteen SSE contract procedures where the repository pins the totals: test_validation_scanner_usage.py (438 catalogued cases, 280 local), docs/validation-migration-map.md and docs/source-test-migration-inventory.md. The review digests are recomputed for every reviewed file that changed.
Conflict in validation-migration-review.json only: main's ledger plus this branch's evidence sentence, with the digests of the reviewed files recomputed from the merged tree.
Conflict in validation-migration-review.json only: main's ledger plus this branch's evidence sentence, with the digests of the reviewed files recomputed from the merged tree.
Conflict in validation-migration-review.json only: main's ledger plus this branch's evidence sentence, with the digests of the reviewed files recomputed from the merged tree.
Conflict in validation-migration-review.json only: main's ledger plus this branch's evidence sentence, with the digests of the reviewed files recomputed from the merged tree.
Conflicts: README.md keeps main's MRF long-root refresh section followed by the strict SSE section; validation-migration-review.json takes main's ledger plus this branch's evidence sentence, with the digests of the reviewed files recomputed from the merged tree.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds nineteen server-side-encryption cases that state what a client must observe, exactly:
Content-Length;The older
S3C-90x,ENC-1xxandKMS-3xxcases mostly accept a successful command with matching bytes and match a refusal against a loose pattern such asInvalidArgument|400. They are unchanged; the new cases run next to them.rustfs-s3-compat-test.shENC-201toENC-210RUSTFS_SSE_S3_MASTER_KEY, no KMSrustfs-kms-test.shKMS-601toKMS-609What each case holds on is listed in
docs/sse-contract-cases.md(Chinese:docs/sse-contract-cases.zh-CN.md).How it is wired
Both suites call
scripts/sse_contract_cases.py, one case per invocation, the way the bulk-delete regressions are run. The helper uses the standard library only (Python 3.8 or newer), talks only to the suite's endpoint with a direct connection, and deploys or restarts nothing. The KMS cases create the keyssse-contract-key-1andsse-contract-key-2through the admin API and run afterKMS-318, before the per-key authorization and fault cases.Exit status is 0 or 1. It is never 2, which
run_testreads as UNSUPPORTED: a wrong command line exits 64 instead of argparse's default 2, and an unreachable endpoint fails the case.The cases are catalogued as
s3.compatibility.enc-2xxandsource-procedure.kms.kms-6xx, so--validation-caseselects one of them like any older case.validation-migration-review.jsonhas refreshed digests for the two suites and the catalog, and one sentence inevidence_basissaying that these procedures were exercised locally and have no fleet live acceptance. Please check that this is the right way to record it.The totals the repository pins now count the nineteen entries: 438 catalogued cases and 280 local ones in
test_validation_scanner_usage.py, and the same local total indocs/validation-migration-map.mdanddocs/source-test-migration-inventory.md.Verification
Run locally, against single-process servers started with the environment each suite writes in
rustfs_config_body:ENC-201..ENC-210: 10 passKMS-601..KMS-609: 9 passsecret, prefixrustfs)RUSTFS_KMS_ENFORCE_SSE_KEY_POLICY=trueandRUSTFS_ENCRYPTION_FRAME_V2=trueThe same runs were repeated through the suites' own
run_all_tests(script sourced, endpoint overridden, cases selected), andscripts/functional_case_report.pyparses the resulting log. Two server builds were used: rustfsmainat391e23971and a branch on top of it.Negative controls on real servers: without a master key
ENC-201,ENC-203,ENC-204andENC-210fail and print the refusal they saw;ENC-204fails on a server with KMS; the KMS cases fail on a server without KMS.Offline:
test_sse_contract_cases.pyruns every case against an in-memory S3 that behaves as required, then with one behavior wrong at a time (19 mutation and case pairs), and requires the matching case to fail and name what it saw. It also pins the registration in both suites, the exit statuses, and the SigV4 signature against botocore when that is installed.contract-testsjob that needs no package installation was run locally and passes, after the first CI run caught the pinned totals. The script tests of the S3 and KMS jobs pass, as doscripts/validation_catalog.py check,scripts/validation_migration_review.py --require-complete,scripts/check_shell_syntax.py,test_validation_s3_basic.shandtest_validation_kms.sh.Not verified
The cases have not run on the fleet. The packaged binary, the multi-node topologies and the state left by the cases that run before
KMS-601are covered only by a fleet run. This is a draft until the S3 compatibility and KMS workflows have run once from this branch; a case that fails there for a reason of the environment should be fixed here before the nightly chain picks the cases up.Out of scope
The cases come from a suite that drives a bare server binary. The parts that a deployed cluster cannot provide are not included: starting the server with other key sources (none, an invalid master key, Vault Transit, the Static backend), comparing two binaries, checking the stored form of objects on the drives, and searching a whole run for key material. Per-key authorization with separate identities stays with
KMS-401andKMS-402.