mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 02:57:59 +00:00
Re-add stored-shares for init and spit out a warning (#6677)
This commit is contained in:
committed by
Brian Kassouf
parent
cf2bdaaec4
commit
252aa1c528
@@ -30,6 +30,7 @@ type OperatorInitCommand struct {
|
||||
flagRecoveryShares int
|
||||
flagRecoveryThreshold int
|
||||
flagRecoveryPGPKeys []string
|
||||
flagStoredShares int
|
||||
|
||||
// Consul
|
||||
flagConsulAuto bool
|
||||
@@ -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")
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user