-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create @celo/encrypted-backup backup for ODIS hardened password encry…
…pted backups (#8896) * create encrypted-backup package * basic backup and open functions working without any key hardening * basic backup and open functions working without any key hardening * use io-ts to create serialization and deserialization functions * extract the encryption and decryption logic from the main functions * add io-ts schema definitions for Domain types * add domain field to backup type and schema * mix in the domain hash to the key as a simple proxy for ODIS * add a stub to hold the place of circuit breaker functions * update the dependency graph * swap order of circuit breaker and odis stubs * [broken] move domains source from @celo/identity to @celo/phone-number-privacy * [broken] remove @celo/identity dependency from @celo/phone-number-privacy-common * finish removing @celo/identity and a dependency of @celo/phone-number-privacy-common * remove duplication and inconsistencies betweem @celo/identity and @celo/phone-number-privacy-common * fix linter errors * clean up domain state and response types * [checkpoint] partially implemented key hardening through ODIS * refactor phone-number-privacy a little * initial implementaion of odis key hardening logic * wire in odis key hardening * fix issues occuring during package initialization * tests now working against a mock implementation of ODIS * add (untested) circuit breaker client implementation * add comments and pipe in circuit breaker config values * fix issues founds in manual testing * add a mock and tests for circuit breaker client * add a NO_GANACHE env variable to disable starting ganache for testing * round out tests for the circuit breaker client * refactor the mock circuit breaker to be ready to export * use the circuit breaker for key hardening * bump package versions * add more information to error handling and debug messages * add doc strings to create and open backup functions * add wrapper function createPinEncryptedBackup with documentation * refactor mock odis * handle 429 status from ODIS and add some error condition tests to backup lib * seperate handling of fetch errors and add more error case tests * add tests for error cases in openBackup * remove DO NOT MERGE note * update dependency graph * add more information to comments * add links to the new documentation * fix build error in signer * change request type definitions and checkSequentialDelay function * fix linter errors * fix linter errors * but like really, fix linter errors * ok I was only joking before about fixing the linter errors. this time for sure. * add support for computational key hardening [lacks schema or tests] * extract odis mock to new file * add computational hardening to test config * add failure case tests for mutated backups * add computational hardening to schema * Update packages/sdk/identity/src/odis/circuit-breaker.ts Co-authored-by: Alec Schaefer <alec@cLabs.co> * consolidate imports * address review comments * add odis verification error type * add safety gate to prevent use of OPRF function for key hardening in prod * bump dep versions in phone-number-privacy-common * remove new code for encrypted backup * Revert "remove new code for encrypted backup" This reverts commit e6b4c62. * populate index.ts file * fix import * fix import again * update dep graphy * fix lint errors * fix lint error * update dependency graph * remove outdated DO NOT MERGE * add phone-number-privacy-common to package list and sort the list * add @types/express as dev dependency * update circuit breaker keys to production values * fix typos and add DO NOT MERGE comments for changes to be made * bump development version of phone-number-privacy-common package * address most of the DO NOT MERGE comments * add createPasswordEncryptedBackup function * add safety measure to prevent accidental usage of the createBackup API with an empty hardening config * fix usages of renamed Endpoint enum * fix enum types * remove accidentally added walletconnect package * fix lint error * fix another lint error * fix dangling reference to CustomSigner * remove dangling refernce to signWithRawKey Co-authored-by: Alec Schaefer <alec@cLabs.co>
- Loading branch information
Showing
38 changed files
with
2,898 additions
and
119 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.