Holo Key Manager is a browser extension for generating and managing Holochain application keys, and using them with applications hosted on the Holo Network. Users install the extension and perform a one-time setup. They can then use a "passwordless" sign up and log in with compatible applications. Non-sensitive data is cloud-synced so that a user can maintain the same set of keys across multiple devices.
To install the Holo Key Manager Extension, follow the instructions for your browser:
- Chrome: Install from Chrome Web Store
- Edge: Install from Microsoft Edge Add-ons
- Mozilla: Install from Firefox Browser Add-ons
A javascript client library is available at @holo-host/holo-key-manager-js-client
. See client documentation here
Holo Key Manager is expected to be used for Holo-hosted applications in conjunction with the Chaperone connection manager. The diagram below provides context of how Holo Key Manager interfaces with the rest of the Holo Hosting stack. Note that Deepkey is not currently implemented and is currently substituted by a centralised store.
The diagram below depicts the architecture of the Holo Key Manager itself. It demonstrates the client's interaction with the extension and outlines the communication schema between the webapp and the extension API.
The priority items are:
- Replace the centralised Cloud Sync component with Deepkey
- Implement features to interact with Deepkey for key revocation and rotation
To set up the development environment for the Holo Key Manager monorepo, follow these steps:
Ensure you have the following installed on your machine:
- Node.js (v16 or higher)
- pnpm (v7 or higher)
-
Clone the repository:
git clone https://github.com/holo-host/holo-key-manager.git cd holo-key-manager
-
Install dependencies:
pnpm install
The monorepo consists of two main projects: holo-key-manager-extension
and holo-key-manager-js-client
, and a shared directory. You can build these projects using the following commands:
-
Build the extension:
pnpm buildExtension
Build artifacts are in the
./holo-key-manager-extension/build
folder -
Build the client:
pnpm buildClient
Build artifacts are in the
./holo-key-manager-js-client/lib
folder -
Build both projects for development:
pnpm build
To ensure code quality and consistency, use the following commands:
-
Lint the code:
pnpm lint
-
Format the code:
pnpm format
-
Run linting and formatting together:
pnpm lintAndFormat
- holo-key-manager-js-client: Contains the JavaScript client library for interacting with the key manager and stored keys.
- holo-key-manager-extension: Contains the browser extension for managing Holo keys.
The monorepo uses pnpm workspaces to manage dependencies and scripts across multiple projects. The workspaces are defined in the root package.json
:
By following these steps, you should be able to set up and start developing on the Holo Key Manager monorepo. If you encounter any issues or have questions, feel free to reach out to the maintainers.
There are three types of tests in this repository:
-
Unit Tests for
holo-key-manager-js-client
:- Run the unit tests using the command:
cd holo-key-manager-js-client && pnpm test
- Run the unit tests using the command:
-
Unit Tests for
holo-key-manager-extension
:- Run the unit tests using the command:
cd holo-key-manager-extension && pnpm test
- Run the unit tests using the command:
-
End-to-End (e2e) Tests for the whole repository:
- To run e2e tests, you need to create a
.env
file withCHROME_ID=eggfhkdnfdhdpmkfpihjjbnncgmhihce
- The rest of the variables in
.env.example
are for deployment and not necessary for testing - Run the e2e tests using the commands:
pnpm install pnpm build pnpm e2e-tests
- To run e2e tests, you need to create a
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For any questions or support, please contact:
Feel free to reach out with any questions or suggestions.