-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add KMS functionality #417
Merged
Merged
Conversation
This file contains 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
Codecov Report
@@ Coverage Diff @@
## main #417 +/- ##
==========================================
+ Coverage 65.28% 65.48% +0.19%
==========================================
Files 277 278 +1
Lines 37842 37926 +84
==========================================
+ Hits 24707 24835 +128
+ Misses 11321 11285 -36
+ Partials 1814 1806 -8
|
torao
force-pushed
the
feature/apply-kms
branch
3 times, most recently
from
May 20, 2022 06:47
3dc95c0
to
1da6733
Compare
Kynea0b
added
the
C: enhancement
Classification: New feature or its request, or improvement in maintainability of code
label
May 20, 2022
torao
force-pushed
the
feature/apply-kms
branch
5 times, most recently
from
May 20, 2022 12:55
080b18a
to
c3c36c5
Compare
torao
force-pushed
the
feature/apply-kms
branch
8 times, most recently
from
May 24, 2022 05:07
0d90d4c
to
ab25481
Compare
tnasu
requested changes
May 25, 2022
Kynea0b
reviewed
May 30, 2022
torao
force-pushed
the
feature/apply-kms
branch
4 times, most recently
from
June 9, 2022 09:20
62f29d2
to
f898e61
Compare
tnasu
reviewed
Jun 10, 2022
tnasu
approved these changes
Jun 13, 2022
Kynea0b
approved these changes
Jun 13, 2022
50 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C: enhancement
Classification: New feature or its request, or improvement in maintainability of code
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.
Description
This PR enables the use of a secure KMS (Key Management System) from Ostracon.
Currently, the key pairs used by Ostracon for agreements are stored locally. But Ostracon nodes are at risk of having their private keys stolen when a malicious attacker breaks into the system since they must accept inbound connections from the Internet.
For more mission-critical applications, such as finance, the node storing the private key must be independent of the Ostracon agreement node, placed behind a firewall, and able to connect to solutions using an HSM (Hardware Security Module) or our SGX solution.
Tendermint, a fork of Ostracon, has the ability to connect to KMS using
tmkms
communication protocol. Note, however, that theinit
andunsafe-reset-priv-validator
subcommands of the Tendermint CLI are not designed to configure KMS, and this PR still requires copying the public key stored in the KMS to a local key file. Thus, you should be set up as follows if you use your KMS:ostracon init
command.~/.ostracon/config/priv_validator_key.json
, replacepubkey/value
field with the Base64 representation of the public key stored in KMS.~/.ostracon/config/genesis.json
, replace thevalidators/address
andvalidators/pubkey/value
fields with the values from the KSM public key in the same way if the node is the initial validator.This PR contains the following changes:
main()
instead of a unit test.ostracon run
: Removed the behavior of referencing local key pair whenpriv_validator_laddr
is set.ostracon show-validator
: Changed to get and display KSM public key whenpriv_validator_laddr
is set.