1
0

Add HSMAutoDeprecated for ent upgrade (#5704)

This commit is contained in:
Calvin Leung Huang 2018-11-06 09:42:03 -08:00 committed by GitHub
parent 895076403c
commit c4b31d5bda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -21,7 +21,7 @@ func adjustCoreForSealMigration(ctx context.Context, core *vault.Core, coreConfi
}
var existSeal vault.Seal
var newSeal vault.Seal
if existBarrierSealConfig != nil &&
if existBarrierSealConfig != nil && existBarrierSealConfig.Type != vaultseal.HSMAutoDeprecated &&
(existBarrierSealConfig.Type != seal.BarrierType() ||
config.Seal != nil && config.Seal.Disabled) {
// If the existing seal is not Shamir, we're going to Shamir, which

View File

@ -14,6 +14,10 @@ const (
GCPCKMS = "gcpckms"
AzureKeyVault = "azurekeyvault"
Test = "test-auto"
// HSMAutoDeprecated is a deprecated seal type prior to 0.9.0.
// It is still referenced in certain code paths for upgrade purporses
HSMAutoDeprecated = "hsm-auto"
)
// Access is the embedded implemention of autoSeal that contains logic