Skip to content
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

Re-add stored-shares for init and spit out a warning #6677

Merged
merged 1 commit into from
May 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions command/operator_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type OperatorInitCommand struct {
flagRecoveryShares int
flagRecoveryThreshold int
flagRecoveryPGPKeys []string
flagStoredShares int

// Consul
flagConsulAuto bool
Expand Down Expand Up @@ -139,6 +140,13 @@ func (c *OperatorInitCommand) Flags() *FlagSets {
"key.",
})

f.IntVar(&IntVar{
Name: "stored-shares",
Target: &c.flagStoredShares,
Default: -1,
Usage: "DEPRECATED: This flag does nothing. It will be removed in Vault 1.3.",
})

// Consul Options
f = set.NewFlagSet("Consul Options")

Expand Down Expand Up @@ -220,6 +228,10 @@ func (c *OperatorInitCommand) Run(args []string) int {
return 1
}

if c.flagStoredShares != -1 {
c.UI.Warn("-stored-shares has no effect and will be removed in Vault 1.3.\n")
}

// Build the initial init request
initReq := &api.InitRequest{
SecretShares: c.flagKeyShares,
Expand Down