Skip to content

[KEYBASE] Refactor keybase config protos to be more modular #626

@0xBigBoss

Description

@0xBigBoss

Objective

Current, keybase config proto relies on an overloaded, generic struct to configure connecting to a keybase. A more modular approach could use the proto oneof operator.

E.g.

message KeybaseConfig {
	oneof keybase_config {
		KeybaseFileConfig file_config = 1;
		KeybaseVaultConfig vault_config = 2;
	}
}


message KeybaseFileConfig {
	string file_path = 1;
}

message KeybaseVaultConfig {
	  string vault_addr = 1;
	  string vault_token = 2;
	  string vault_mount_path = 3;
}

Origin Document

Originally posted by @Olshansk in #537 (comment)

Goals

  • Simplifies the keybase config
  • Allows for easier configuration of new keybase types in the future

Deliverable

  • Refactor the keybase_config.proto to be more modular
  • Update the CLI to parse and read config.json using the new keybase config protos
  • Update default configuration to use the new module KeybaseFileConfig.

Non-goals / Non-deliverables

  • Integrating keybase logic into node runtime (unless this functionality already exists on main)

General issue deliverables

  • Update the appropriate CHANGELOG(s)
  • Update any relevant local/global README(s)
  • Update relevant source code tree explanations
  • Add or update any relevant or supporting mermaid diagrams

Testing Methodology

  • Task specific tests or benchmarks: make ...
  • New tests or benchmarks: make ...
  • All tests: make test_all
  • LocalNet: verify a LocalNet is still functioning correctly by following the instructions at docs/development/README.md

Creator: @0xBigBoss

Metadata

Metadata

Assignees

Labels

code healthNice to have code improvementdocumentationImprovements or additions to documentationinfraCore infrastructure - not protocol related

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions