DGS-24778 Pass context when clients make KEK calls to DEK Registry#2308
Open
Robert Yokota (rayokota) wants to merge 4 commits into
Open
DGS-24778 Pass context when clients make KEK calls to DEK Registry#2308Robert Yokota (rayokota) wants to merge 4 commits into
Robert Yokota (rayokota) wants to merge 4 commits into
Conversation
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
There was a problem hiding this comment.
Pull request overview
This PR ensures Schema Registry context (parsed from context-qualified subjects like ":.myctx:subject") is propagated to DEK Registry KEK operations, so KEKs are retrieved/registered within the correct context rather than defaulting silently.
Changes:
- Parse context from
RuleContext.subjectin the encryption executor and include it in KEK lookup/creation. - Extend DEK Registry client and mock client KEK APIs/caching to be context-aware (new optional
contextparameter, context included inKekIdcache key). - Add a unit test validating context-qualified vs default-context KEK behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/schema_registry/test_encrypt_executor.py | Adds coverage to ensure KEK operations use the context parsed from the subject. |
| src/confluent_kafka/schema_registry/rules/encryption/encrypt_executor.py | Extracts context from subject and threads it through KEK get/register calls. |
| src/confluent_kafka/schema_registry/rules/encryption/dek_registry/mock_dek_registry_client.py | Updates mock DEK registry client to support context-aware KEK caching and retrieval. |
| src/confluent_kafka/schema_registry/rules/encryption/dek_registry/dek_registry_client.py | Adds context to KEK APIs and cache keys; passes context to DEK Registry endpoints. |
💡 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.


What
Checklist
References
JIRA:
Test & Review
Open questions / Follow-ups