chore(kms-connector): backport decryption check improvements#2165
Merged
eudelins-zama merged 2 commits intorelease/0.12.xfrom Mar 25, 2026
Merged
Conversation
* chore(kms-connector): avoid redundant acl check * fix(kms-connector): fix acl tests
* chore(kms-connector): remove check decryption already done * chore(kms-connector): remove useless mock
There was a problem hiding this comment.
Pull request overview
Backports upstream kms-worker changes to simplify decryption pre-checks by removing the “decryption already done” check for public decryptions and eliminating redundant ACL checks for delegated user decryptions, with corresponding test updates.
Changes:
- Remove the public-decryption “already done” gateway check from request preparation.
- Simplify delegated user decryption ACL validation to a single contract call.
- Update integration/unit tests to match the new call patterns and mock expectations.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| kms-connector/crates/kms-worker/tests/integration_tests.rs | Removes now-obsolete gateway mock step for public decryption path. |
| kms-connector/crates/kms-worker/tests/context.rs | Updates retry-loop gateway mocking to only apply to user decryption. |
| kms-connector/crates/kms-worker/tests/attempt_limit.rs | Aligns mock setup with reduced gateway calls across attempts. |
| kms-connector/crates/kms-worker/tests/acl.rs | Removes unused imports and drops redundant public-decryption gateway mocking. |
| kms-connector/crates/kms-worker/src/core/event_processor/processor.rs | Removes the pre-flight “already done” check for public decryption events. |
| kms-connector/crates/kms-worker/src/core/event_processor/decryption.rs | Removes check_decryption_not_already_done, drops redundant delegated ACL checks, and updates tests accordingly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Backport of: