diff --git a/changelog/16487.txt b/changelog/16487.txt new file mode 100644 index 0000000000..cbf2a2a586 --- /dev/null +++ b/changelog/16487.txt @@ -0,0 +1,3 @@ +```release-note:improvement +identity: Prevent possibility of data races on entity creation. +``` diff --git a/vault/identity_store.go b/vault/identity_store.go index 8114d1e928..506553f752 100644 --- a/vault/identity_store.go +++ b/vault/identity_store.go @@ -1094,7 +1094,7 @@ func (i *IdentityStore) CreateEntity(ctx context.Context) (*identity.Entity, err nsLabel, }) - return entity, nil + return entity.Clone() } // CreateOrFetchEntity creates a new entity. This is used by core to