DGS-24778 Pass context when clients make KEK calls to DEK Registry#508
Open
Robert Yokota (rayokota) wants to merge 2 commits into
Open
DGS-24778 Pass context when clients make KEK calls to DEK Registry#508Robert Yokota (rayokota) wants to merge 2 commits into
Robert Yokota (rayokota) wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR threads Schema Registry “context” (parsed from a context-qualified subject like :.myctx:subject) through KEK lookups/registrations to the DEK Registry, ensuring KEKs are resolved within the correct context rather than the default context.
Changes:
- Parse context from
RuleContext.subjectand pass it into KEKgetKek/registerKekcalls. - Extend the DEK Registry client (and mock) KEK APIs to accept an optional
contextand include it in cache keys + REST request URLs. - Add a Jest spec validating that context-qualified subjects resolve the expected KEK vs default-context subjects.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| schemaregistry/test/rules/encryption/encrypt-executor.spec.ts | Adds a test ensuring KEK operations use the context derived from a qualified subject. |
| schemaregistry/rules/encryption/encrypt-executor.ts | Introduces context parsing and passes context through KEK registry calls. |
| schemaregistry/rules/encryption/dekregistry/mock-dekregistry-client.ts | Updates mock KEK APIs and cache keys to support optional context. |
| schemaregistry/rules/encryption/dekregistry/dekregistry-client.ts | Updates client KEK APIs + REST URL construction/caching to include optional context. |
💡 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.
Please prefix all TypeScript pull-requests with
[Typescript]What
Checklist
References
JIRA:
Test & Review
Open questions / Follow-ups