Repository navigation
Conversation
Key destruction is two steps: `force_immediate` only destroys a key that is already pending deletion, and is refused with 400 for a key that was never scheduled. KMS-208 sent a single confirmed immediate request and expected the key to be destroyed. Assert that the unscheduled request is refused and leaves the key usable, then schedule the deletion, destroy the pending key, and check that the key answers 404.
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
KMS key destruction is becoming an explicit two-step operation in rustfs/rustfs#9337:
force_immediateonly destroys a key that is alreadyPendingDeletion, and a confirmed immediate request against a key that was never scheduled is refused with400and changes nothing.KMS-208's positive path sent one confirmed immediate request against a fresh key and expected
200. It now:400, with the key still usable and not pending;pending_window_in_days: 7) and expects200;200;404.The two refusal checks at the start of the case (query-string form, missing
confirm_key_id) are unchanged. KMS-207 is unchanged: the configuration-reference check runs before the key state is looked at, so it still gets the reference refusal.Merge order
Draft until rustfs/rustfs#9337 is merged. Step 1 fails against any server without that change: the Local backend destroys the key and returns
200, and the Vault backends return200after only scheduling it. Steps 2–4 pass on servers with and without the change.Verification
bash -n rustfs-kms-test.sh,python3 -m unittest test_rustfs_kms_presign.py,bash test_validation_kms.sh: pass.400,200,200,404.