backport of commit d2b78318ef (#23694)

Co-authored-by: Scott Miller <smiller@hashicorp.com>
This commit is contained in:
hc-github-team-secure-vault-core
2023-10-17 09:03:49 -04:00
committed by GitHub
parent 39b6c45769
commit 9c3e0fd6fe
2 changed files with 6 additions and 1 deletions

5
changelog/23573.txt Normal file
View File

@@ -0,0 +1,5 @@
```release-note:bug
* Seal HA (enterprise/beta): Fix rejection of a seal configuration change
from two to one auto seal due to persistence of the previous seal type being
"multiseal".
```

View File

@@ -194,7 +194,7 @@ func (d *autoSeal) BarrierConfig(ctx context.Context) (*SealConfig, error) {
barrierTypeUpgradeCheck(d.BarrierSealConfigType(), conf)
if conf.Type != d.BarrierSealConfigType().String() && conf.Type != "multiseal" {
if conf.Type != d.BarrierSealConfigType().String() && conf.Type != SealConfigTypeMultiseal.String() && d.BarrierSealConfigType() != SealConfigTypeMultiseal {
d.logger.Error("barrier seal type does not match loaded type", "seal_type", conf.Type, "loaded_type", d.BarrierSealConfigType())
return nil, fmt.Errorf("barrier seal type of %q does not match loaded type of %q", conf.Type, d.BarrierSealConfigType())
}