Skip to content

Conversation

@MaximusHaximus
Copy link
Contributor

@MaximusHaximus MaximusHaximus commented Oct 11, 2024

Description

New client API method storeEncryptedKeyBatch(), and associated param and result types

  • Added new method to allow consumers of the API to persist a batch of keys to the backend storage service in a single, atomic, all-or-nothing request
  • Updated existing API method batchGeneratePrivateKeys to use the new atomic method service-client method (storePrivateKeyBatch()) to write keys instead of calling multiple, independent storePrivateKey API calls in parallel.

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Ran localtests against datil-test (thus the TestNetworks) instance of our wrapped-keys REST API endpoints
  • Added new test for writing a batch of keys to the service with an invalid entry in the array and verified that it throws the appropriate error from the backend

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

…cryptedKeyBatch()` client API method and associated types
…yBatch()` to write keys to store backend in `batchGeneratePrivateKeys()` client API
@MaximusHaximus MaximusHaximus changed the title feat(wrapped-keys): LIT-3956 - Allow batch of keys to be stored atomically (storeEncryptedKeyBatch) LIT-3956 - wrapped-keys - Allow batch of keys to be stored atomically (storeEncryptedKeyBatch) Oct 11, 2024
@MaximusHaximus MaximusHaximus marked this pull request as ready for review October 11, 2024 21:02
Copy link
Collaborator

@DashKash54 DashKash54 left a comment

Choose a reason for hiding this comment

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

Looks good left a few comments

…mSessionSig()`, 'getFirstSessionSig()' and `getPkpAccessControlCondition()` - all are `api` specific

- Also fixed `testImportWrappedKey` so it uses our `api` method to list keys after importing one instead of importing our internal `service-client` from a direct reference to a deep path in our local packages dir
Copy link
Collaborator

@DashKash54 DashKash54 left a comment

Choose a reason for hiding this comment

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

LGTM!

@MaximusHaximus MaximusHaximus merged commit e9d68a3 into master Oct 14, 2024
3 checks passed
@MaximusHaximus MaximusHaximus deleted the LIT-3956-write-keys-batch branch October 14, 2024 00:04
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.

3 participants