Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Conversation

@timoxley
Copy link
Contributor

@timoxley timoxley commented Feb 23, 2021

Stores keys in system config directory on server or localstorage in browser (stubbed in, yet to be tested).

Needs

  • Hook up webpack module replacement and test browser implementation.
  • Explicit tests for loading keys, currently just ensures existing tests pass.
  • Tests around concurrent access to config, ensure clobbering isn't possible.

Maybe

  • Audit tests to ensure they clean up persisted data.
  • Optimise storage format (doesn't need to store both hex string & Buffer string).
  • Encryption/Decryption using client's keys.
  • Instructions on how to take backups, specifically for publishers.
  • Configurable storage location?
  • Benchmarking, system is currently fully sync so may be problematic.

@linear
Copy link

linear bot commented Feb 23, 2021

NET-156 Persist encryption keys in JS client

The JS client currently includes an in-memory store for encryption keys. We should add an option for persistent storage, so that keys aren't lost across process restarts / page reloads.

A simple persistent key-value store is basically be enough. Sure, it's not very secure to store the keys in plaintext, but it's good enough as a first step at least.

But how to persist keys in a way that works in both node.js as well as browser, ideally without platform-specific code in the client library? Is there a drop-in replacement for localStorage for node.js? Maybe this?

@timoxley timoxley force-pushed the NET-156-persist-groupkeys branch from 286eb4a to 1990831 Compare February 24, 2021 15:43
Base automatically changed from typescript-tweaks to 5.x February 24, 2021 20:00
@timoxley timoxley force-pushed the NET-156-persist-groupkeys branch from 1990831 to 692d091 Compare February 24, 2021 21:55
@timoxley timoxley force-pushed the NET-156-persist-groupkeys branch 5 times, most recently from 4a26fda to ed74cd6 Compare March 11, 2021 17:27
@timoxley timoxley force-pushed the NET-156-persist-groupkeys branch 7 times, most recently from 485ad88 to 596c415 Compare March 12, 2021 13:43
Base automatically changed from 5.x to master March 12, 2021 17:53
@timoxley timoxley force-pushed the NET-156-persist-groupkeys branch 5 times, most recently from b40f690 to 9987646 Compare March 19, 2021 17:55
@timoxley timoxley force-pushed the NET-156-persist-groupkeys branch 5 times, most recently from 14bd1ee to f3193a6 Compare May 10, 2021 20:39
timoxley added 27 commits May 11, 2021 13:35
@timoxley timoxley force-pushed the NET-156-persist-groupkeys branch from 5681655 to 3b58f50 Compare May 11, 2021 17:35
@timoxley timoxley merged commit 6c56fe2 into master May 17, 2021
@timoxley timoxley deleted the NET-156-persist-groupkeys branch May 17, 2021 14:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants