Skip to content
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

[Keybase] HashiCorp Vault support as a keybase backend #527

Closed
6 tasks
Olshansk opened this issue Feb 20, 2023 · 5 comments · Fixed by #537
Closed
6 tasks

[Keybase] HashiCorp Vault support as a keybase backend #527

Olshansk opened this issue Feb 20, 2023 · 5 comments · Fixed by #537
Assignees
Labels
client work needed to interface with the node (rpc, cli, etc..) community Open to or owned by a non-core team member infra Core infrastructure - not protocol related tooling tooling to support development, testing et al

Comments

@Olshansk
Copy link
Member

Objective

Add a more node-operator-oriented, production-ready backend for the keybase.

Origin Document

The implementation for the CLI & keybase are available at app/client but only supports a filesystem-based key based backed by BadgerDb. Example from /Users/olshansky/workspace/pocket/pocket/app/client/cli/account.go:

	// Open the debug keybase at the specified path
	pocketDir := strings.TrimSuffix(dataDir, "/")
	keybasePath, err := filepath.Abs(pocketDir + keybaseSuffix)
	// ...
	kb, err := keybase.NewKeybase(keybasePath)
	// ...

PNI and other major node runners make use of HashiCorp Vault which makes it a great 1st candidate for an alternate keybase backend.

Screenshot 2023-02-20 at 9 06 16 AM

Goals

  • Leverage the existing keybase utilities & interfaces for production uses cases
  • Make TestNet keybase management easier for PNI and other node operators
  • Add support for HashiCorp Vault as a keybase backend

Deliverable

  • A PR that enables using Valut as a backend for keybase management
  • A flag or configuration allowing the user to specify which backend they want to use via the CLI
  • A document explaining how to setup HashiCorp Vault as a backend

Non-goals / Non-deliverables

  • Adding new commands to the CLI
  • Modifying the core node business logic

General issue deliverables

  • Update the appropriate CHANGELOG(s)
  • Add a README w/ relevant documentation & mermaid diagrams on how to use this for keybase management

Testing Methodology

  • Instructions (e.g. a demo) with a video and list of commands showing the functionality in action

Creator: @Olshansk
Co-Owners: @h5law @okdas @jessicadaugherty

@Olshansk Olshansk added infra Core infrastructure - not protocol related community Open to or owned by a non-core team member tooling tooling to support development, testing et al client work needed to interface with the node (rpc, cli, etc..) labels Feb 20, 2023
@Olshansk Olshansk moved this to Backlog in V1 Dashboard Feb 20, 2023
@Olshansk Olshansk changed the title [CLI] HashiCorp Vault support as a a CLI backend [CLI] HashiCorp Vault support as a a keybase backend Feb 20, 2023
@Olshansk Olshansk changed the title [CLI] HashiCorp Vault support as a a keybase backend [Keybase] HashiCorp Vault support as a a keybase backend Feb 20, 2023
@Olshansk Olshansk changed the title [Keybase] HashiCorp Vault support as a a keybase backend [Keybase] HashiCorp Vault support as a keybase backend Feb 20, 2023
@jessicadaugherty
Copy link
Contributor

If this is in M4, does that mean it's a priority to include in testnet @Olshansk?

@Olshansk
Copy link
Member Author

If this is in M4, does that mean it's a priority to include in testnet @Olshansk?

Not a blocker for starting TestNet, but will make it more efficient, simpler and easier to incorporate external node runners (e.g. if we do an incentivized TestNet).

Might be a good alternate to #194 (comment) but will keep thinking of other starter tasks too.

@jessicadaugherty
Copy link
Contributor

jessicadaugherty commented Feb 21, 2023

Great, thank you @Olshansk! Was weighing the impact of this over the threshold sigs.

@jessicadaugherty jessicadaugherty moved this from Backlog to Up Next in V1 Dashboard Feb 21, 2023
@jessicadaugherty
Copy link
Contributor

Hey @Olshansk can you provide an effort for this? Seems S-M but want to confirm.

@Olshansk
Copy link
Member Author

Hey @Olshansk can you provide an effort for this? Seems S-M but want to confirm.

I think the effort to test & integrate it with HashiCorp is a fair amount of infra work: making it easy through documentation or tools for other to get set up. I set it as an L

@Olshansk Olshansk moved this from Up Next to In Progress in V1 Dashboard Feb 24, 2023
0xBigBoss added a commit that referenced this issue Mar 29, 2023
## Description

Introduces a keybase config into the runtime config and adds a more
node-operator-oriented, production-ready backend for the keybase.
https://app.dework.xyz/pokt-network/v1-protocol?taskId=04cb2ab8-8b7b-4c81-a407-857649a928b7

## Issue

Fixes #527

## Type of change

Please mark the relevant option(s):

- [x] New feature, functionality or library
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Major breaking change
- [x] Documentation
- [ ] Other <!-- add details here if it a different type of change -->

## List of changes

- Adds KeybaseConfig to runtime config
- Add Hashicorp Vault keybase implementation
- Fix a bug where build binary could not resolve private keys
- Update CLI commands to parse keybase flags
- Updates CLI docs
- Adds confirm passphrase new key creation, importing unarmored private
keys, and updating passphrases

## Testing

- [x] `make develop_test`
- [x]
[LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md)
w/ all of the steps outlined in the `README`


## Required Checklist

- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have tested my changes using the available tooling
- [x] I have updated the corresponding CHANGELOG

### If Applicable Checklist

- [x] I have updated the corresponding README(s); local and/or global
- [x] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added, or updated,
[mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding
README(s)
- [ ] I have added, or updated, documentation and
[mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*`
if I updated `shared/*`README(s)
@github-project-automation github-project-automation bot moved this from In Progress to Done in V1 Dashboard Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client work needed to interface with the node (rpc, cli, etc..) community Open to or owned by a non-core team member infra Core infrastructure - not protocol related tooling tooling to support development, testing et al
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants