From 967263be29d881849702d82d1abba783a5115da0 Mon Sep 17 00:00:00 2001 From: Nick Cabatoff Date: Fri, 22 Apr 2022 12:12:46 +0000 Subject: [PATCH 1/2] backport of commit b0bcfd0d81b52388823316af6dcd4b2b1e787dda --- vault/identity_store_entities.go | 2 +- vault/identity_store_util.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vault/identity_store_entities.go b/vault/identity_store_entities.go index 6d90dcbdb723..cc85d0179b50 100644 --- a/vault/identity_store_entities.go +++ b/vault/identity_store_entities.go @@ -786,7 +786,7 @@ func (i *IdentityStore) mergeEntity(ctx context.Context, txn *memdb.Txn, toEntit return errors.New("to_entity_id should not be present in from_entity_ids"), nil } - fromEntity, err := i.MemDBEntityByID(fromEntityID, false) + fromEntity, err := i.MemDBEntityByID(fromEntityID, true) if err != nil { return nil, err } diff --git a/vault/identity_store_util.go b/vault/identity_store_util.go index f026412fc74c..5f9e891e7c96 100644 --- a/vault/identity_store_util.go +++ b/vault/identity_store_util.go @@ -667,7 +667,7 @@ func (i *IdentityStore) processLocalAlias(ctx context.Context, lAlias *logical.A return nil, fmt.Errorf("mount accessor %q is not local", lAlias.MountAccessor) } - alias, err := i.MemDBAliasByFactors(lAlias.MountAccessor, lAlias.Name, false, false) + alias, err := i.MemDBAliasByFactors(lAlias.MountAccessor, lAlias.Name, true, false) if err != nil { return nil, err } From 08b60565437ed6a56db2ffa021f0dacbdf5baed5 Mon Sep 17 00:00:00 2001 From: Nick Cabatoff Date: Fri, 22 Apr 2022 16:24:40 +0000 Subject: [PATCH 2/2] backport of commit 6afe38b9785af51b6acdb73a91ee25b205e17f32 --- changelog/15123.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog/15123.txt diff --git a/changelog/15123.txt b/changelog/15123.txt new file mode 100644 index 000000000000..51223e400e50 --- /dev/null +++ b/changelog/15123.txt @@ -0,0 +1,3 @@ +```release-note:improvement +core: Fix some identity data races found by Go race detector (no known impact yet). +```