-
Couldn't load subscription status.
- Fork 54
feat(cli): add to encrypt priv key #494
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
Conversation
78a315e to
f2ffbd6
Compare
efd9a29 to
bc1e7f3
Compare
| "github.com/piplabs/story/lib/tracer" | ||
|
|
||
| // Used for ABI embedding of the staking contract. | ||
| _ "embed" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is generated by detect-secrets to detect leakage of secrets.
This file lists the secrets detected in our codebase. There are no actual secrets in this PR, but detect-secrets detects some codes as secret, so added to those in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, updates are needed for false-positive secret keys to pass PR checks.
| // ValidatePasswordInput validates a strong password input for new accounts, | ||
| // including a min length. | ||
| func ValidatePasswordInput(input string) error { | ||
| if len(input) < minPasswordLength { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could do more weak criteria, e.g. at least one number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. This validation is the same one from Prysm. We could add more.
bc1e7f3 to
145ceff
Compare
145ceff to
5bbbd28
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks great
Binary uploaded successfully 🎉📦 Version Name: 1.1.2-unstable-e045276 |
Support validator priv key encryption. ## Updated ### `init` command Operators can encrypt the newly generated private key with `--encrypt-priv-key` flag. Without this flag, no encryption is done for private key as before. The encrypted file is stored under `story/config/enc_priv_key.json`. For all validator CLI, the private key is retrieved from the encrypted private key file by decrypting it if the `enc_priv_key.json` file exists. Otherwise, it is retrieved from `.env` file. ## Added ### `encrypt` command To support the existing operators (using not encrypted key), one command is also added to encrypt the existing private key in `.env` file: `./story key encrypt`. It will generate the encrypted private key file under `story/config/enc_priv_key.json`. ### `show` command Also, introduced a new command to decrypt and show the encrypted key: `./story key show-encrypted`. With `--show-private` flag, user can show the private key. issue: piplabs#151
Support validator priv key encryption.
Updated
initcommandOperators can encrypt the newly generated private key with
--encrypt-priv-keyflag. Without this flag, no encryption is done for private key as before. The encrypted file is stored understory/config/enc_priv_key.json.For all validator CLI, the private key is retrieved from the encrypted private key file by decrypting it if the
enc_priv_key.jsonfile exists. Otherwise, it is retrieved from.envfile.Added
encryptcommandTo support the existing operators (using not encrypted key), one command is also added to encrypt the existing private key in
.envfile:./story key encrypt. It will generate the encrypted private key file understory/config/enc_priv_key.json.showcommandAlso, introduced a new command to decrypt and show the encrypted key:
./story key show-encrypted. With--show-privateflag, user can show the private key.issue: #151