mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 19:47:54 +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
|
flagRecoveryShares int
|
||||||
flagRecoveryThreshold int
|
flagRecoveryThreshold int
|
||||||
flagRecoveryPGPKeys []string
|
flagRecoveryPGPKeys []string
|
||||||
|
flagStoredShares int
|
||||||
|
|
||||||
// Consul
|
// Consul
|
||||||
flagConsulAuto bool
|
flagConsulAuto bool
|
||||||
@@ -139,6 +140,13 @@ func (c *OperatorInitCommand) Flags() *FlagSets {
|
|||||||
"key.",
|
"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
|
// Consul Options
|
||||||
f = set.NewFlagSet("Consul Options")
|
f = set.NewFlagSet("Consul Options")
|
||||||
|
|
||||||
@@ -220,6 +228,10 @@ func (c *OperatorInitCommand) Run(args []string) int {
|
|||||||
return 1
|
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
|
// Build the initial init request
|
||||||
initReq := &api.InitRequest{
|
initReq := &api.InitRequest{
|
||||||
SecretShares: c.flagKeyShares,
|
SecretShares: c.flagKeyShares,
|
||||||
|
|||||||
Reference in New Issue
Block a user