mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 11:38:02 +00:00
OSS fixes (#24200)
This commit is contained in:
@@ -2567,10 +2567,16 @@ func setSeal(c *ServerCommand, config *server.Config, infoKeys []string, info ma
|
|||||||
Priority: 1,
|
Priority: 1,
|
||||||
Name: "shamir",
|
Name: "shamir",
|
||||||
})
|
})
|
||||||
case 1:
|
default:
|
||||||
// If there's only one seal and it's disabled assume they want to
|
allSealsDisabled := true
|
||||||
|
for _, c := range config.Seals {
|
||||||
|
if !c.Disabled {
|
||||||
|
allSealsDisabled = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// If all seals are disabled assume they want to
|
||||||
// migrate to a shamir seal and simply didn't provide it
|
// migrate to a shamir seal and simply didn't provide it
|
||||||
if config.Seals[0].Disabled {
|
if allSealsDisabled {
|
||||||
config.Seals = append(config.Seals, &configutil.KMS{
|
config.Seals = append(config.Seals, &configutil.KMS{
|
||||||
Type: vault.SealConfigTypeShamir.String(),
|
Type: vault.SealConfigTypeShamir.String(),
|
||||||
Priority: 1,
|
Priority: 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user