Skip to content

DGS-24778 Pass context when clients make KEK calls to DEK Registry#508

Open
Robert Yokota (rayokota) wants to merge 2 commits into
masterfrom
kek-context
Open

DGS-24778 Pass context when clients make KEK calls to DEK Registry#508
Robert Yokota (rayokota) wants to merge 2 commits into
masterfrom
kek-context

Conversation

@rayokota

Copy link
Copy Markdown
Member

Please prefix all TypeScript pull-requests with [Typescript]

What

Checklist

  • Contains customer facing changes? Including API/behavior changes
  • Did you add sufficient unit test and/or integration test coverage for this PR?
    • If not, please explain why it is not required

References

JIRA:

Test & Review

Open questions / Follow-ups

Copilot AI review requested due to automatic review settings July 14, 2026 04:07
@rayokota Robert Yokota (rayokota) requested review from a team as code owners July 14, 2026 04:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.subject and pass it into KEK getKek / registerKek calls.
  • Extend the DEK Registry client (and mock) KEK APIs to accept an optional context and 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.

Comment thread schemaregistry/test/rules/encryption/encrypt-executor.spec.ts Outdated
Comment thread schemaregistry/test/rules/encryption/encrypt-executor.spec.ts
Comment thread schemaregistry/rules/encryption/dekregistry/dekregistry-client.ts
Comment thread schemaregistry/rules/encryption/dekregistry/dekregistry-client.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants