From 03a8d1268a748615724f598a8f1e3ad2a1b5d250 Mon Sep 17 00:00:00 2001 From: hc-github-team-secure-vault-core <82990506+hc-github-team-secure-vault-core@users.noreply.github.com> Date: Thu, 8 Jun 2023 14:59:55 -0400 Subject: [PATCH] backport of commit 8931e4790b46df81cca615865e1f33a127276e1d (#20972) Co-authored-by: akshya96 <87045294+akshya96@users.noreply.github.com> --- changelog/20964.txt | 3 +++ vault/identity_store_groups.go | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 changelog/20964.txt diff --git a/changelog/20964.txt b/changelog/20964.txt new file mode 100644 index 000000000..8bd9563c1 --- /dev/null +++ b/changelog/20964.txt @@ -0,0 +1,3 @@ +```release-note:bug +identity: Fixes duplicate groups creation with the same name but unique IDs. +``` \ No newline at end of file diff --git a/vault/identity_store_groups.go b/vault/identity_store_groups.go index 3ba22abeb..5355a5d13 100644 --- a/vault/identity_store_groups.go +++ b/vault/identity_store_groups.go @@ -69,8 +69,11 @@ func groupPaths(i *IdentityStore) []*framework.Path { }, Fields: groupPathFields(), - Callbacks: map[logical.Operation]framework.OperationFunc{ - logical.UpdateOperation: i.pathGroupRegister(), + Operations: map[logical.Operation]framework.OperationHandler{ + logical.UpdateOperation: &framework.PathOperation{ + Callback: i.pathGroupRegister(), + ForwardPerformanceStandby: true, + }, }, HelpSynopsis: strings.TrimSpace(groupHelp["register"][0]),