From c2d9215d1d6f10edb73f80df53d0f60401dbd5e9 Mon Sep 17 00:00:00 2001 From: Nick Cabatoff Date: Tue, 16 Nov 2021 14:56:34 -0500 Subject: [PATCH] Fix startup failures when aliases from a pre-1.9 vault version exist (#13169) * Add AllowMissing to local_bucket_key schema, preventing startup failures in post-unseal when aliases from an older version exist. --- changelog/13169.txt | 3 +++ vault/identity_store_schema.go | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelog/13169.txt diff --git a/changelog/13169.txt b/changelog/13169.txt new file mode 100644 index 000000000..5b2236e18 --- /dev/null +++ b/changelog/13169.txt @@ -0,0 +1,3 @@ +```release-note:bug +identity: Fix regression preventing startup when aliases were created pre-1.9. +``` \ No newline at end of file diff --git a/vault/identity_store_schema.go b/vault/identity_store_schema.go index 2fdb38a87..186f99c5a 100644 --- a/vault/identity_store_schema.go +++ b/vault/identity_store_schema.go @@ -71,7 +71,8 @@ func aliasesTableSchema(lowerCaseName bool) *memdb.TableSchema { }, }, "local_bucket_key": { - Name: "local_bucket_key", + Name: "local_bucket_key", + AllowMissing: true, Indexer: &memdb.StringFieldIndex{ Field: "LocalBucketKey", },