Repository navigation
feat(consensus/keys): add consensus keys verify - #1199
Open
leninmehedy wants to merge 1 commit into
Open
leninmehedy wants to merge 1 commit into
leninmehedy wants to merge 1 commit into
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
leninmehedy
force-pushed
the
01168-consensus-keys-verify
branch
from
September 26, 2026 13:50
1b40107 to
60deba8
Compare
consensus node keys verifyconsensus keys verify
leninmehedy
force-pushed
the
01168-consensus-keys-verify
branch
from
September 26, 2026 14:16
60deba8 to
236cbf4
Compare
leninmehedy
force-pushed
the
01168-consensus-keys-verify
branch
from
September 26, 2026 14:28
236cbf4 to
c944b87
Compare
leninmehedy
force-pushed
the
01168-consensus-keys-verify
branch
from
September 26, 2026 14:41
c944b87 to
b9ce53a
Compare
leninmehedy
force-pushed
the
01168-consensus-keys-verify
branch
from
September 29, 2026 05:12
b9ce53a to
95c9a60
Compare
leninmehedy
force-pushed
the
01168-consensus-keys-verify
branch
from
October 13, 2026 06:27
95c9a60 to
18d3875
Compare
leninmehedy
force-pushed
the
01168-consensus-keys-verify
branch
from
October 13, 2026 10:33
18d3875 to
15a97e0
Compare
leninmehedy
force-pushed
the
01168-consensus-keys-verify
branch
from
October 13, 2026 11:05
15a97e0 to
13d22b9
Compare
leninmehedy
force-pushed
the
01168-consensus-keys-verify
branch
from
October 13, 2026 11:29
13d22b9 to
0acdc49
Compare
leninmehedy
force-pushed
the
01168-consensus-keys-verify
branch
from
October 13, 2026 12:37
0acdc49 to
f24a8b1
Compare
leninmehedy
force-pushed
the
01168-consensus-keys-verify
branch
from
October 13, 2026 12:52
f24a8b1 to
a50f972
Compare
leninmehedy
marked this pull request as draft
October 20, 2026 06:24
leninmehedy
force-pushed
the
01168-consensus-keys-verify
branch
from
October 21, 2026 03:38
a50f972 to
9c33db0
Compare
leninmehedy
force-pushed
the
01168-consensus-keys-verify
branch
from
October 21, 2026 04:44
9c33db0 to
13fb6db
Compare
leninmehedy
force-pushed
the
01168-consensus-keys-verify
branch
from
October 21, 2026 05:19
13fb6db to
32a245c
Compare
Add the verify verb over the #1165 parse helpers and #1167 secret reader. Validate key material from a folder (--from) or from the cluster (--from-cluster --node-id): - private keys and certificates parse as enhanced PEM; - each certificate's public key matches its private key (gossip + gRPC); - the gossip signing key is RSA-3072; - the admin public key (supplied by the operator from an external wallet) is a valid Ed25519 or secp256k1 key; in a folder with no selector it is checked only when admin.pub exists. Prints a per-key report and exits non-zero on any failure. Selectors --gossip/--tls/--admin choose which key types to check. Refs #1168 Signed-off-by: Lenin Mehedy <lenin.mehedy@hashgraph.com>
radkomih
force-pushed
the
01168-consensus-keys-verify
branch
from
November 4, 2026 12:45
32a245c to
39f3b56
Compare
radkomih
marked this pull request as ready for review
November 4, 2026 13:06
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fourth PR in the stacked series for epic #1164 — Consensus Node Key & Secret Management. Stacked on #1198 (base branch
01167-consensus-keys-import-export).Adds the
verifyverb: validate that a node's key material is well-formed, from a folder or from the cluster.What's in it
internal/consensus/keys—VerifyDirandVerifyClusterproduce a per-keyVerifyReport. Checks:admin.pubis checked only when it exists. The admin private key is never read (it stays in the wallet).--from-clusterfinds each secret by its labels (not a fixed name), reports several generations or a name/content mismatch as a failed finding, and takes--fingerprint/--secret-suffixto choose one.--from-clusterreads the admin secret as raw bytes (see feat(consensus/keys): addkeys importandkeys export#1198) and flags a secret that holds hex text instead.consensus keys verify—--keys-dir <dir>or--from-cluster --node-id N(mutually exclusive);--gossip/--tls/--adminselectors. Prints a per-key report and exits non-zero on any failure.Files
internal/consensus/keys/verify.goVerifyDir/VerifyCluster,Finding/VerifyReport, cert↔key checks and admin public key validationinternal/consensus/keys/verify_test.gocmd/cli/commands/consensus/keys/verify.goverifysubcommandcmd/cli/commands/consensus/keys/verify_test.gocmd/cli/commands/consensus/keys/keys.goverifydocs/commands/consensus.mdverifysectionTesting
Validated in the UTM VM:
All pass.
Update: admin key generation was removed from the stack, so the VM run above predates that change. Unit tests pass on macOS for the touched packages; a VM run is still needed.
Closes #1168.