-
Notifications
You must be signed in to change notification settings - Fork 89
feat(wrapped-keys): add versioned key update support and client APIs #1007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: naga
Are you sure you want to change the base?
feat(wrapped-keys): add versioned key update support and client APIs #1007
Conversation
There was a problem hiding this comment.
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 adds versioned key update support to the wrapped-keys package, enabling rotation of encrypted key ciphertext while preserving historical versions. This is part of the V8 Naga release and mirrors functionality from PR #1006.
Key Changes:
- Adds
updateEncryptedKeyAPI function for rotating wrapped key ciphertext with version tracking - Extends metadata types to support optional
updatedAttimestamps andversionshistory - Introduces
includeVersionsquery parameter to optionally fetch version history
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
packages/wrapped-keys/src/lib/types.ts |
Adds WrappedKeyVersion, UpdateEncryptedKeyParams, and UpdateEncryptedKeyResult types; extends existing metadata types with updatedAt and versions fields |
packages/wrapped-keys/src/lib/service-client/types.ts |
Adds UpdateKeyParams interface and extends HTTP method union to include PUT |
packages/wrapped-keys/src/lib/service-client/client.ts |
Implements updatePrivateKey function and adds includeVersions query parameter support to fetchPrivateKey |
packages/wrapped-keys/src/lib/api/update-encrypted-key.ts |
New API wrapper function that orchestrates key updates using PKP session signatures |
packages/wrapped-keys/src/lib/api/index.ts |
Exports the new updateEncryptedKey function |
packages/wrapped-keys/src/lib/api/get-encrypted-key.ts |
Passes through includeVersions parameter to service client |
packages/wrapped-keys/src/lib/service-client/index.ts |
Exports the new updatePrivateKey function |
packages/wrapped-keys/src/index.ts |
Exports new API function and types for public consumption |
packages/e2e/src/test-helpers/executeJs/wrappedKeys.ts |
Adds comprehensive E2E test validating update functionality and version history retrieval |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| updatedAt?: string; | ||
| versions?: WrappedKeyVersion[]; |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new updatedAt and versions properties should be documented in the JSDoc comment above. Add property descriptions following the established pattern:
* @property { string } [updatedAt] ISO 8601 timestamp of when the key was last updated
* @property { WrappedKeyVersion[] } [versions] Array of historical versions of this key after update operationsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Anson <ansonox@gmail.com>
Co-authored-by: Ansonhkg <4049673+Ansonhkg@users.noreply.github.com>
…adata Co-authored-by: Ansonhkg <4049673+Ansonhkg@users.noreply.github.com>
Co-authored-by: Ansonhkg <4049673+Ansonhkg@users.noreply.github.com>
…rams Co-authored-by: Ansonhkg <4049673+Ansonhkg@users.noreply.github.com>
[WIP] Address feedback on versioned key update support
|
|
…r-one [WIP] Address feedback on versioned key update support
[WIP] Address feedback on versioned key update support
Add detailed JSDoc documentation to UpdateEncryptedKeyResult interface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Anson <ansonox@gmail.com>
Co-authored-by: Ansonhkg <4049673+Ansonhkg@users.noreply.github.com>
Co-authored-by: Ansonhkg <4049673+Ansonhkg@users.noreply.github.com>
Co-authored-by: Ansonhkg <4049673+Ansonhkg@users.noreply.github.com>
Co-authored-by: Ansonhkg <4049673+Ansonhkg@users.noreply.github.com>
…re-time Add test coverage for evmContractConditions in updateEncryptedKey
…-work Add JSDoc documentation for UpdateEncryptedKeyParams type
|
@copilot open a new pull request to apply changes based on the comments in this thread |
WHAT
Same as #1006, but for V8 Naga
TEST
...