-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Switch secret store to the keyring secret store #4754
Conversation
for keybaseKeyring
…t to new secret store
…mos-sdk into kristi/keyringKeybase
} | ||
|
||
// Will block until user inputs the signature | ||
signed, err = buf.ReadString('\n') |
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.
undeclared name: signed
(from typecheck
)
} | ||
|
||
// Will block until user inputs the signature | ||
signed, err = buf.ReadString('\n') |
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.
undeclared name: signed
(from typecheck
)
var keyhash []byte | ||
keyhashStored := false | ||
|
||
if _, err := os.Stat(lkb.dir + "/keyhash"); err == nil { |
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.
ifElseChain: rewrite if-else to switch statement (from gocritic
)
|
||
algo := Secp256k1 | ||
n1, n2, n3 := "personal", "business", "other" | ||
p1, p2 := "1234", "really-secure!@#$" |
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.
string 1234
has 4 occurrences, but such constant nums
already exists (from goconst
)
algo := Secp256k1 | ||
|
||
n1, n2, n3 := "some dude", "a dudette", "dude-ish" | ||
p1, p2, p3 := "1234", "foobar", "foobar" |
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.
string foobar
has 3 occurrences, but such constant foobar
already exists (from goconst
)
var keyhash []byte | ||
keyhashStored := false | ||
|
||
if _, err := os.Stat(lkb.dir + "/keyhash"); err == nil { |
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.
ifElseChain: rewrite if-else to switch statement (from gocritic
)
|
||
algo := Secp256k1 | ||
n1, n2, n3 := "personal", "business", "other" | ||
p1, p2 := "1234", "really-secure!@#$" |
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.
string 1234
has 4 occurrences, but such constant nums
already exists (from goconst
)
algo := Secp256k1 | ||
|
||
n1, n2, n3 := "some dude", "a dudette", "dude-ish" | ||
p1, p2, p3 := "1234", "foobar", "foobar" |
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.
string foobar
has 3 occurrences, but such constant foobar
already exists (from goconst
)
Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>
Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>
var keyhash []byte | ||
keyhashStored := false | ||
|
||
if _, err := os.Stat(lkb.dir + "/keyhash"); err == nil { |
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.
ifElseChain: rewrite if-else to switch statement (from gocritic
)
buf := bufio.NewReader(os.Stdin) | ||
_, err = fmt.Fprintf(os.Stderr, "\nEnter Amino-encoded signature:\n") | ||
if err != nil { | ||
return |
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.
File is not goimports
-ed (from goimports
)
return | |
return |
algo := Secp256k1 | ||
|
||
n1, n2, n3 := "some dude", "a dudette", "dude-ish" | ||
p1, p2, p3 := "1234", "foobar", "foobar" |
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.
string foobar
has 3 occurrences, but such constant foobar
already exists (from goconst
)
|
||
algo := Secp256k1 | ||
n1, n2, n3 := "personal", "business", "other" | ||
p1, p2 := "1234", "really-secure!@#$" |
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.
string 1234
has 4 occurrences, but such constant nums
already exists (from goconst
)
var keyhash []byte | ||
keyhashStored := false | ||
|
||
if _, err := os.Stat(lkb.dir + "/keyhash"); err == nil { |
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.
ifElseChain: rewrite if-else to switch statement (from gocritic
)
buf := bufio.NewReader(os.Stdin) | ||
_, err = fmt.Fprintf(os.Stderr, "\nEnter Amino-encoded signature:\n") | ||
if err != nil { | ||
return |
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.
File is not goimports
-ed (from goimports
)
return | |
return |
|
||
algo := Secp256k1 | ||
n1, n2, n3 := "personal", "business", "other" | ||
p1, p2 := "1234", "really-secure!@#$" |
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.
string 1234
has 4 occurrences, but such constant nums
already exists (from goconst
)
algo := Secp256k1 | ||
|
||
n1, n2, n3 := "some dude", "a dudette", "dude-ish" | ||
p1, p2, p3 := "1234", "foobar", "foobar" |
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.
string foobar
has 3 occurrences, but such constant foobar
already exists (from goconst
)
var keyhash []byte | ||
keyhashStored := false | ||
|
||
if _, err := os.Stat(lkb.dir + "/keyhash"); err == nil { |
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.
ifElseChain: rewrite if-else to switch statement (from gocritic
)
buf := bufio.NewReader(os.Stdin) | ||
_, err = fmt.Fprintf(os.Stderr, "\nEnter Amino-encoded signature:\n") | ||
if err != nil { | ||
return |
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.
File is not gofmt
-ed with -s
(from gofmt
)
return | |
return |
|
||
algo := Secp256k1 | ||
n1, n2, n3 := "personal", "business", "other" | ||
p1, p2 := "1234", "really-secure!@#$" |
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.
string 1234
has 4 occurrences, but such constant nums
already exists (from goconst
)
algo := Secp256k1 | ||
|
||
n1, n2, n3 := "some dude", "a dudette", "dude-ish" | ||
p1, p2, p3 := "1234", "foobar", "foobar" |
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.
string foobar
has 3 occurrences, but such constant foobar
already exists (from goconst
)
@@ -176,7 +179,8 @@ $ %s tx %s burn cripto-kitties d04b98f48e8f8bcc15c6ae5ac050801cd6dcfd428fb5f9e65 | |||
Args: cobra.ExactArgs(2), | |||
RunE: func(cmd *cobra.Command, args []string) error { | |||
cliCtx := context.NewCLIContext().WithCodec(cdc) | |||
txBldr := authtypes.NewTxBuilderFromCLI().WithTxEncoder(utils.GetTxEncoder(cdc)) | |||
inBuf := bufio.NewReader(cmd.InOrStdin()) |
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.
undeclared name: bufio
(from typecheck
)
buf := bufio.NewReader(os.Stdin) | ||
_, err = fmt.Fprintf(os.Stderr, "\nEnter Amino-encoded signature:\n") | ||
if err != nil { | ||
return |
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.
File is not gofmt
-ed with -s
(from gofmt
)
return | |
return |
var keyhash []byte | ||
keyhashStored := false | ||
|
||
if _, err := os.Stat(lkb.dir + "/keyhash"); err == nil { |
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.
ifElseChain: rewrite if-else to switch statement (from gocritic
)
|
||
algo := Secp256k1 | ||
n1, n2, n3 := "personal", "business", "other" | ||
p1, p2 := "1234", "really-secure!@#$" |
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.
string 1234
has 4 occurrences, but such constant nums
already exists (from goconst
)
algo := Secp256k1 | ||
|
||
n1, n2, n3 := "some dude", "a dudette", "dude-ish" | ||
p1, p2, p3 := "1234", "foobar", "foobar" |
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.
string foobar
has 3 occurrences, but such constant foobar
already exists (from goconst
)
@@ -176,7 +179,8 @@ $ %s tx %s burn cripto-kitties d04b98f48e8f8bcc15c6ae5ac050801cd6dcfd428fb5f9e65 | |||
Args: cobra.ExactArgs(2), | |||
RunE: func(cmd *cobra.Command, args []string) error { | |||
cliCtx := context.NewCLIContext().WithCodec(cdc) | |||
txBldr := authtypes.NewTxBuilderFromCLI().WithTxEncoder(utils.GetTxEncoder(cdc)) | |||
inBuf := bufio.NewReader(cmd.InOrStdin()) |
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.
undeclared name: bufio
(from typecheck
)
…smos-sdk into kristi/keyringKeybase2
var keyhash []byte | ||
keyhashStored := false | ||
|
||
if _, err := os.Stat(lkb.dir + "/keyhash"); err == nil { |
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.
ifElseChain: rewrite if-else to switch statement (from gocritic
)
buf := bufio.NewReader(os.Stdin) | ||
_, err = fmt.Fprintf(os.Stderr, "\nEnter Amino-encoded signature:\n") | ||
if err != nil { | ||
return |
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.
File is not gofmt
-ed with -s
(from gofmt
)
return | |
return |
algo := Secp256k1 | ||
|
||
n1, n2, n3 := "some dude", "a dudette", "dude-ish" | ||
p1, p2, p3 := "1234", "foobar", "foobar" |
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.
string foobar
has 3 occurrences, but such constant foobar
already exists (from goconst
)
|
||
algo := Secp256k1 | ||
n1, n2, n3 := "personal", "business", "other" | ||
p1, p2 := "1234", "really-secure!@#$" |
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.
string 1234
has 4 occurrences, but such constant nums
already exists (from goconst
)
@@ -176,7 +179,8 @@ $ %s tx %s burn cripto-kitties d04b98f48e8f8bcc15c6ae5ac050801cd6dcfd428fb5f9e65 | |||
Args: cobra.ExactArgs(2), | |||
RunE: func(cmd *cobra.Command, args []string) error { | |||
cliCtx := context.NewCLIContext().WithCodec(cdc) | |||
txBldr := authtypes.NewTxBuilderFromCLI().WithTxEncoder(utils.GetTxEncoder(cdc)) | |||
inBuf := bufio.NewReader(cmd.InOrStdin()) |
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.
undeclared name: bufio
(from typecheck
)
@@ -7,6 +7,7 @@ import ( | |||
"io/ioutil" | |||
"net/http" | |||
"net/http/httptest" | |||
"os" |
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.
"os" imported but not used (from typecheck
)
@@ -1,6 +1,7 @@ | |||
package common | |||
|
|||
import ( | |||
"os" |
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.
"os" imported but not used (from typecheck
)
I started to break this down in smaller pieces: #5029 |
Introduce new Keybase implementation that can leverage operating systems' built-in functionalities to securely store secrets. This chunk is extracted from @poldsam's original PR: - #4754 Thanks: @alexanderbez
Add new command to assist users migrate their keys from the legacy on-disk keybase to the new OS keyring-based implementation. Ref #4754
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
ADR: adr-006-secret-store-replacement
gaiacli keys migrate
gaiacli keys add <key_name> --legacy-secret-store
Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/
)Added a relevant changelog entry:
clog add [section] [stanza] [message]
rereviewed
Files changed
in the github PR explorerFor Admin Use: